#robotics Logs
Mar 05 2013
#robotics Calendar
00:47 RifRaf testing new 1mm bit
00:48 rue_house GEEZ rif! could you get a bigger ruler!?
00:48 rue_house ;)
00:50 RifRaf ok will try next time
00:53 rue_house (looks cool rif, cant wait to see it assembled)
00:53 RifRaf thats not real though
00:54 RifRaf just scaled down an existing part to test
00:54 RifRaf but am gonna make a real one when i get the 2.5g servos
00:55 RifRaf that was 4.5mm plexi machined down to 1mm then cut with 1mm bit
00:56 RifRaf and need to get some m1 nuts and bolts for it
00:57 RifRaf rue_house any pics of the progress on your arm?
00:58 rue_house I jus put on a sprocket, its not worth much
00:58 rue_house but remind me tommrow maybe and I'll snap new ones
01:08 ocei3ko Need help understanding transistors.
01:08 ocei3ko What book should I be reading?
01:11 RifRaf http://openbookproject.net/electricCircuits/
01:24 RifRaf is this , X=(-0.14282)*red+(1.54924)*green+(-0.95641)*blue;
01:24 RifRaf same as , X=((-0.14282)*red)+((1.54924)*green)+((-0.95641)*blue);
01:24 RifRaf for an avr, cause does not seem correct
01:25 RifRaf this is the datasheet version, X = (-0.14282)(R) + (1.54924)(G) + (-0.95641)(B)
01:26 theBear no
01:26 theBear BIMDAS suckah foo'
01:26 RifRaf theBear so the first version matches the datasheet?
01:26 theBear oh wait
01:26 theBear i dunno
01:26 theBear i just woke up
01:26 theBear i can't focus
01:26 RifRaf he ok
01:27 RifRaf i know the feeling
01:27 theBear either way you can't assume a compiler will follow the rules for math, better to explicitly bracket stuff that should be done first
01:27 RifRaf theBear my code has the second version, so wondering if that could be the issue
01:27 RifRaf but its not explicitly bracketed in the datasheet
01:28 RifRaf is it implyed though i am wondering
01:28 theBear depends what it sposed to do
01:28 RifRaf calculate x
01:28 theBear and wtf does the datasheet version bracket single letters, stupid datasheet
01:28 theBear hehe
01:29 RifRaf its an app note, will find link
01:29 theBear if you just wanna calculate x you can use my formula... x = 5+3 ... won't help tho :)
01:29 theBear seriously, i'm seein double, i aint reading no datasheets
01:29 RifRaf k :)
01:30 RifRaf i need to calculate x and y, these help find the colour temp on this other chart
01:30 theBear and this is my last smoke ! i didn't even pay attention if i could walk when i made my coffee... sure hope so
01:30 theBear yeah, i remember that bit
01:31 theBear and pretty sure you wanna do 3 seperate things and add them together
01:31 theBear you been referring to those links i found, they all looked solid and matched other links info wise
01:31 RifRaf yeah, i am gonna test the calcs with the example data i got the other day
01:31 RifRaf http://www.ams.com/eng/content/view/download/145158
01:32 RifRaf i am at the bottom of page 4
01:32 theBear i am on my chair
01:32 RifRaf its was not for you
01:33 RifRaf hopefully someone else like datasheets and app notes at the moment
01:34 theBear web doesn't work, that's not good.. i behind on my bill, i got money now, but i would need the web to put it on the card so they can charge it
01:34 theBear oh wait, i just disconnected
01:35 RifRaf http://pastebin.com/ARF7zHd1 was the test data, i have killed the nanoduino at moment
01:35 RifRaf so cannot use em
01:35 theBear wot you do
01:35 RifRaf well just disabled with bad soldering
01:35 theBear my head hurts
01:35 RifRaf the usb headers fell off, and they are so tiny and my iron tip too big
01:36 RifRaf so rx and tx are on all the time
01:36 theBear iron tips can't be too big ! my hobby these days is soldering things 1/10th or smaller the size of my tip and solder
01:37 Gargantuasauce_ RifRaf: your two c lines are the same
01:37 RifRaf well i cannot see as well
01:38 Gargantuasauce_ http://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B#Operator_precedence
01:38 RifRaf GargantuaSauce ok thanks, so avr does all the * before the + ?
01:38 Gargantuasauce_ it has nothing to do with the architecture
01:38 Gargantuasauce_ you are writing c
01:39 RifRaf damn, so thats not the issues then
01:39 RifRaf maybe the arduino maths lib is messed up?
01:40 Gargantuasauce_ i would advise you to graduate from the arduino software stack asap
01:40 Gargantuasauce_ but in any case what types are X, red, green, blue?
01:40 RifRaf i need to test out some values with a calulator i guess
01:40 RifRaf GargantuaSauce i will as soon as this code works correctly
01:40 RifRaf i never use it
01:41 theBear he graduated from it 5 years before it existed !
01:41 theBear tut tut tut
01:41 RifRaf GargantuaSauce see the link http://pastebin.com/ARF7zHd1 for example values, and you will see that the CCT is messed up
01:42 RifRaf especially for RED
01:42 RifRaf and luminence is off as well
01:43 RifRaf oh damn, that has no x and y, will repost
01:43 Gargantuasauce_ you did not answer my question
01:44 RifRaf oh sorry, i read it as values
01:44 RifRaf brb
01:44 Gargantuasauce_ well i am going to sleep
01:44 RifRaf 30 sec
01:44 Gargantuasauce_ remember that the maximum value of a char is 127
01:45 RifRaf they all appear to be floats
01:45 RifRaf unsigned int TCS3414values[4]; // [Clear,Red,Green,Blue]
01:45 RifRaf float TCS3414medium[4]; // [Clear,Red,Green,Blue]
01:45 RifRaf float TCS3414mediate[4]; // [Clear,Red,Green,Blue]
01:45 RifRaf float ColorTemperature = 0;
01:46 theBear i thought the other day it was ints for a float output
01:46 RifRaf float CCTCalc(unsigned int allcolors[]){
01:46 RifRaf float TCS3414tristimulus[3]; // [tri X, tri Y, tri Z]
01:46 RifRaf float TCS3414chromaticityCoordinates[2]; //chromaticity coordinates // [x, y]
01:46 RifRaf is the same as other day theBear
01:47 RifRaf i know i get values upto 65550 odd
01:47 theBear yeah, but what are r g b and X and Y
01:47 RifRaf with super bright LED on sensor
01:48 theBear actually NONE of those things you just pasted are in that formula you pasted 10 mins ago
01:48 RifRaf an int from a float?
01:49 RifRaf sorry :( , this is the code http://pastebin.com/5KfBLQ3b
01:49 RifRaf am still trying to work it all out
01:50 RifRaf did not worry out them yet because the returned values seem reasonable for red green and blue
01:51 theBear what about the X (first thing generated from r/g/b) ? did you do the maths manually with the same values like someone suggested the other day ? that's a good way to prove the variable types or syntax of the math isn't breaking anything
01:51 RifRaf am about to
01:52 RifRaf thats why i needed to know the operator precedence
01:52 RifRaf so i could put it into the calc correctly
01:56 theBear try to understand what the maths are doing... for example memory from last week tells me you are 'weighting' the red green and blue values, therefore i guess you need 3 sepearate multiplies and then add them
01:57 theBear and that datasheet is STILL the ONLY place in the wide wide world of web that there are any negative values, and remember when we made them not negative suddenly that stage of the maths started making reasonable looking outputs
01:59 RifRaf well better looking, but still off, have added in the - values again because they appear everywhere
01:59 RifRaf calulated X, now Y and Z, then can get x
01:59 RifRaf long sums
02:00 theBear define everywhere
02:00 RifRaf in the datasheets, appnotes and 3 example code snippits i have found
02:01 RifRaf the same weird values, that are doing some kind of compensation for the sensor
02:01 RifRaf to smooth out the values, its shows it on a graph in the appnote posted earlier
02:02 theBear mmm... i like to understand what code is doing, which is why i found generic fact-based pages instead of anything applying specifically to this chip... they all suggested positive values, that those values are standard sub-rgb colourspace adjustment, and that they are positive
02:02 RifRaf hrm, i will find the datasheets reasoning for you
02:02 theBear remember the tables i showed ? lists of 10 or 20 sets of similar numbers depending on what rgb standard you wanted to convert to
02:02 theBear oooh, do that, cos it was bugging me all that day
02:03 theBear still can't see good, but my head seems to be a bit less sore and a bit more smarterer
02:03 RifRaf Equations 1-3 can be used to correlate the RGB and XYZ values. These equations are the result of a
02:03 RifRaf transformation matrix composed of correlations at different light sources.
02:03 RifRaf lots of big words :)
02:04 theBear that doesn't explain negatives, that's just the concept of the rgb -> xyz values, which every other reference i could find ANYWHERE said were all positive... even the wiki page re: colourspaces agrees
02:05 RifRaf ok, once i get this calculated will try the links you posted before, they are still open
02:06 theBear re: what i said about personal approach and understanding what code is doing, i find it makes this part of things way quicker, cos you aren't just messing around testing other peoples formulas, but you know what you want to achieve and how it is achieved, then you just gotta make the code match your understanding
02:06 theBear then again, colourspaces and coversions like that have always ruined my head
02:08 RifRaf all the formulas in that code appear to relate directly to the datasheet though, but i agree with you and am doing manual maths
02:08 theBear the manual maths prove that the code is doing what it looks like it should, but you still gotta know what it is supposed to be doing <grin>
02:09 theBear that's why i didn't have anything for the next XYZ -> blah transformation, cos i couldn't understand what you needed to do for that one
02:11 RifRaf its to relate it to this graph http://www.ecse.rpi.edu/~schubert/Light-Emitting-Diodes-dot-org/chap18/F18-03%20Chromaticity%20diagram%20-%20planckian.jpg
02:11 RifRaf Chromaticity Diagram with Planckian Locus
02:11 theBear yeah, and notice that whatever tables or values you find for that are ALL positive
02:13 RifRaf yep, my returned x and y are NOT all positive
02:14 theBear and i'm pretty sure they should be
02:14 RifRaf but trying to conform this at moment with calculator, but am sloow
02:14 theBear afaict removing those negatives made THAT stage of conversion all make sense.. suggesting that the XYZ -> whatever maths further down the line are also broken in a different way
02:15 RifRaf yes i'll be happy if x != -0.02 like it is for these values
02:15 RifRaf Red LED 100% Illuminance: -315.37 x: -0.02 y: 0.22 CCT: 851993.06K -- Clear: 2252 Red: 2008 Green: 248 Blue: 75
02:16 theBear i mean, without the tables of common multiplier values for this first conversion, just looking at the graph pretty much proves everything should be positive
02:16 theBear both before and after the conversion
02:16 RifRaf yes if this is wrong then illuminence and cct are both gonna be wrong
02:17 theBear exactly, and remember how when we (think we) fixed this the illuminence which is a direct product of it became right
02:17 theBear which suggests the next conversion to colourtemp was still broken somehow
02:18 theBear but as you might understand re: what blackbody colourtemp actually MEANS, like where the concept came from, this is a abstract and tricky thing to achieve, so once you sure the conversion to XYZ is right, you gotta lookup how to turn that into temp
02:19 theBear do yer know ? like how it relates directly to a metal workers colour table (cherry red, bright red, yellow, etc)
02:19 theBear or more accurately how a metal workers colour table relates directly to it
02:23 theBear i suppose that table shows why it's abstract too, for all those colours not on that curvy line, you can only draw an imaginary right angle at any given value, or follow those curvey dotted lines
02:24 RifRaf damn i got the answer -0.0135 , which i guess rounds up to -0.02 , so got the same
02:25 theBear cool, so we're basically sure it's a formula problem not a syntax one
02:25 theBear syntax/variable type
02:25 theBear err, it should round up to .01, but still close
02:25 RifRaf but if the datasheet is wrong then the whole worlds colour sensing code must be wrong for people using this chip
02:26 RifRaf i though they just went up in c, or avr,
02:26 RifRaf to the next value, not the closest
02:26 RifRaf when you change a float to an int
02:27 RifRaf er forget that , up for a - number would be -0.01 you are right
02:28 RifRaf unless up is down when its negative, or i am confused as usual
02:28 theBear you might be right, but up in a negative number is closer to 0 <grin>
02:28 theBear you might be right twice
02:28 RifRaf yep :)
02:29 RifRaf time a for a port, i don't think this V has had the desired effect
03:00 RifRaf my maths was wrong before, i got -0.018 this time :/
03:00 RifRaf weird that i get - values, am gonna study datasheet some more
03:02 theBear multiplying by negative makes negative
03:02 theBear and we still aint seen ANY theory suggesting that the negatives shouldn't just be positives
03:05 RifRaf Note that the calculated CCT becomes less meaningful as the source moves further away from the
03:05 RifRaf planckian locus. For instance, it would be possible to generate a CCT for a green LED, but the value
03:05 RifRaf would be meaningless as the point on the chromaticity diagram would be too far from the planckian
03:05 RifRaf locus. In other words, the CCT is only meant to characterize near white lights.
03:05 RifRaf doh
03:05 RifRaf but even still the white readings were still out
03:05 RifRaf and i should still not have -x and -y values i believe
03:07 theBear yeah, but red should still look like somewhere in the low thousands
03:07 RifRaf yep
03:09 theBear on that note, you understand the metalworker colour chart stuff i mentioned earlier ?
03:13 RifRaf yep
03:14 theBear cool
03:14 RifRaf i think my green is too green , same for red and blue, should use more natural colours, page 6 of this explains how you can do different maths
03:14 theBear kinda awesome concept, lets all that stuff like ir temp sensors and heat cameras work
03:14 RifRaf http://www.ams.com/eng/content/view/download/145158
03:15 theBear you can always use a incandescant until you at least get "white" right
03:16 RifRaf they got the values for that formula using 3 different known white light sources
03:19 RifRaf have about 15 type of 'white' led at work, will try get datasheets for a few good ones and try make my own values, i mainly wanna test white led, and white flouros, white incandesant, so may may need to have 3 different settings
03:20 RifRaf have about 15 type of 'white' led at work, will try get datasheets for a few good ones and try make my own values, i mainly wanna test white led, and white flouros, white incandesant, so may may need to have 3 different settings
03:21 theBear no white led is a good source, look at the graphs on the datasheets, they're all peaks and troughs, just enough to fool us to think white
03:21 theBear and i'd expect that while somewhat better, your sensors have similar characteristics
03:21 theBear in the sense of non-flat, not same peaks/troughs
03:22 RifRaf the highest K white in there sample 3 was 6500K, i got some new leds that are supposed to be 11500k yesterday, thats the highestk i have access to
03:22 RifRaf is pretty white blue
03:23 theBear that's VERY blue, then again, i don't see red like normal people, but that's way beyond "blue" hid car headlights
03:24 RifRaf yep, i want to be able to confirm these values
03:24 theBear oh, that was the same doc as before, why didn't you just say :) between the connection hiccup earlier and this, i got 6 copies now :)
03:25 RifRaf heh yep sorry
03:25 theBear erg, my ass hurts (stupid back)... i think i might have to treat myself, spend what little money i got on a burger or hotdog and a longneck
03:26 theBear got one of them casks of wine-cordial last week, not bad, dunno if i could handle it every week tho, it's like ribena, gets old real quick
03:26 RifRaf yep am enjoying me cordial at the moment
03:27 theBear nobbad, 2 liters for 12 bucks i think, just what i needed at the time
03:27 RifRaf only about 30% port is how i like it these days
03:27 RifRaf or else i get all sorts of sick
03:27 theBear meh, that much water doesn't agree with my blood, gotta keep the alcahol % up
03:28 RifRaf but i do use schooner glasses
03:29 theBear heh, i guess that helps a little... temporary house-monkey brought home a couple pint glasses the other day
03:29 RifRaf am sure you would have slept well though, i don't recall seeing you online for many hours after you started drinking it
03:29 theBear you weren't around much, i commented on it here muchly
03:30 RifRaf yep i read it later
03:30 RifRaf i had already passed out by that point
03:30 theBear :)
03:30 theBear i got weird hours between the pain and painkillers at the moment, it's only cos you get up at stupid times you see me so much
03:31 RifRaf yep you got up as i got home from work today
03:32 RifRaf ok so i guess after reading all that the news is good, and if i was to test my household lamps and lights should get much better readings
03:32 RifRaf cause the returned rgb values all seem dandy
03:32 RifRaf just the matrix is wrong for these high value leds
03:34 RifRaf will try see whats wrong with this avr board, i cannot see bridges but will put undermicroscope so i can see it better
03:34 RifRaf theBear did you see the tiny parts i cut today?
03:35 theBear nup
03:35 RifRaf http://imagebin.org/249022
03:35 theBear oooh pretty :)
03:35 RifRaf they weigh nothing
03:36 RifRaf almost
03:36 theBear i was gonna say, they don't seem to be floating away :)
03:36 RifRaf 0.1g for 2 of them
03:36 theBear wow, that is almost nothing
03:37 theBear that's less than a single match !
03:37 theBear hehe, why would you have scales that accurate ? <grin>
03:37 RifRaf can't find a match to test
03:37 theBear from memory they about 1/4 gram
03:37 RifRaf for robotics sir
03:37 theBear heh, that's what they all say
03:42 RifRaf well i found a microscopic bridge already
03:42 theBear c'mon man !
03:42 RifRaf i think i'll try soldering under the scope
03:43 theBear you used to solder like a ninja ! i got proof in the other room
03:43 theBear hehe, silently and under the cover of darkness
03:44 RifRaf yes eyes let me down now mainly now, as was trying to fix it amongst 50 breadboard wires
03:44 theBear ahh, breadboard wires will confuse any brain
03:44 RifRaf but can see it well now, is good scope i found at garage sale, stereo one
03:45 RifRaf bolonged to a botanist, i added a ring of bright leds and is awesome to use now
03:45 theBear hehe, you said ring
03:45 RifRaf yeah a macro ring for cameras, can adjust the brightness
03:50 RifRaf omg soldering under a microscope is awesome
03:50 RifRaf at least the fingers are still steady ninjas when i can see
03:51 RifRaf should work now
03:51 theBear "are you ready to operate doctor ?" "sure, but first i gotta perform surgery" :)
03:52 RifRaf too coll, the leds look normal
03:52 RifRaf cool*
03:52 RifRaf time to rebreadboard it after a quich serial test
03:55 RifRaf yay it lives
04:02 RifRaf have not trying detecting the colour of ojects before but its working
04:02 RifRaf using an smd white led on breadboard, it reads the reflected light off an object
04:10 RifRaf breabboard setup for sensor http://imagebin.org/249028
04:11 RifRaf white led has no ground cause its to bright for photo
12:55 GuShH_Lap theBear: ugh... 1900kwh or so for this month, that's nuts!! I'm going to check the meter asap to see if there's anything funny going on, there's no way I'm consuming more than before when I'm using less power than ever!
16:20 MrCurious_ woo hoo. stepper motors when run with easystepper drivers @ 5v have more than enough torque
16:37 GuShH_Lap yey Chavez is dead, one less asshole.
16:37 MrCurious_ srsly?
16:38 MrCurious_ wow
17:22 MrCurious_ can anyone recommend a stepper driver for 4 steppers thats cost effective featuring step/direction
18:02 Tom_itx gecko
18:02 Tom_itx 540
18:08 MrCurious_ tom_itx: way over th top on price. trying to get under $60 for 4 axis for a robot
18:09 MrCurious_ now if i were driving a sherline, i would like this choice
18:15 GargantuaSauce how much current
18:16 MrCurious_ < 2a
18:16 MrCurious_ works fine with the easystepper boards
18:16 MrCurious_ think they are only ~70 oz-in steppers
18:17 GargantuaSauce maybe those pololu drivers or a clone?
18:17 GargantuaSauce they are like 10 bucks each
18:18 MrCurious_ easydriver clones are ~10. just checking if i could get under that price easily
18:18 GargantuaSauce probably not as far as ready-made things go
18:18 Curious_
18:20 GargantuaSauce now that said you can get TB6560s for like <4 dollars apiece
18:22 MrCurious_ thats not a bad deal on ebay
18:24 RifRaf what are we getting?
18:25 MrCurious_ where did you see the < $4 for the tb6560
18:25 MrCurious_ i see em on ebay for ~$12 buy it now $4 current bid
18:26 MrCurious_ totally lusting after that board now
18:27 MrCurious_ decay scaling...
18:27 GargantuaSauce i mean just the IC
18:27 GargantuaSauce there's a couple sellers in that range on aliexpress
18:27 MrCurious_ i would want the pre-made board
18:28 GargantuaSauce wuss :P
18:28 MrCurious_ yeah
18:28 MrCurious_ i have a shit load of bare components i was gonna make into boards
18:28 GargantuaSauce you want your stuff to WORK?!
18:29 GargantuaSauce reprehensible
18:29 MrCurious_ then i found i could get 10DOF sensor boards working for $15
18:29 MrCurious_ and it just works
18:36 GargantuaSauce so what are you building stark
18:38 MrCurious_ who is stark?
18:39 GargantuaSauce http://www.youtube.com/watch?v=MtntTvuv8Aw
18:39 MrCurious_ nice
18:39 MrCurious_ 4 omni wheel bot
18:39 GargantuaSauce where are you getting your omnis
18:40 MrCurious_ got em about 2 years back
18:40 MrCurious_ cant remember where
18:40 GargantuaSauce i see...i looked for awhile and couldnt find a supplier that wasnt obscenely expensive
18:40 MrCurious_ i think they are vex
18:40 GargantuaSauce mechanum wheels are even worse :(
18:40 MrCurious_ they were obscene
18:40 MrCurious_ but that pain is faded and in the past
18:41 MrCurious_ robotshop has a nice kit with 4 for $29
18:41 MrCurious_ and it includes some non-omni wheels for good measure
18:41 MrCurious_ vex-wheel-kit-5
18:42 MrCurious_ i think i paid more, and didnt get the extra wheels :(
18:43 MrCurious_ omni wheels are expensive, mecanum wheels blow my mind
18:43 GargantuaSauce i just got a bunch of cheap bearings so maybe i'll try making some
20:40 Lola8088
21:04 MrCurious_ pro tip. when buying grommets, realize there is a id, od, and THICKNESS before purchasing
21:11 rue_shop2 :)
22:39 orlok hey zhanx
22:39 orlok i needed to ask you a question about AC systems
22:39 orlok but i just pulled it apart and fixed it
22:39 orlok :)
22:39 orlok (drainage hose came out from drip tray! easy fix!)
23:17 shuggans hey all - just popping in to say hello. All moved and just about set up in the new house!
23:18 rue_house ah
23:18 rue_house wondered where you went
23:18 rue_house channel just isn't the same
23:18 shuggans bwahaha
23:21 shuggans How are projects coming along?