#robotics Logs

Mar 09 2013

#robotics Calendar


02:49 RifRaf 0x72 maybe
02:54 theBear that doesn't sound right.. oh, left
02:55 RifRaf omg it works theBear
02:55 RifRaf !!
02:55 theBear zomfg !
02:55 RifRaf Turned On TCS3414
02:55 theBear you just rub it underneat for that or ?
02:55 RifRaf someones suggesting in another forum
02:56 theBear tassles on your nipples ?
02:56 RifRaf heh
02:56 theBear i know a forum like that too :)
02:56 chxane wha
02:57 RifRaf now i have to port the code away from arduino
02:57 theBear good boy :)
02:57 RifRaf thats gonna take some time
02:58 RifRaf but i know how to read and write bits to the i2c registers now
02:58 theBear nah, all the maths and stuff stay the same, you just skip the silliness
02:58 RifRaf so just gonna find the write commands to replace the arduino ones
02:58 theBear and if ya need a real i2c lib/functions, a ton of them exist, but yeah, it's pretty simple
02:58 RifRaf yes yes, but there are alot of lines that use this wire. command
02:58 theBear pfft wire
02:59 RifRaf yes i am pfftting it away sir
02:59 RifRaf replacing with stuff like TCS3414.writeRegister(80, 3)
02:59 RifRaf ok glass full, here we go
03:03 RifRaf theBear colour sensor knows 48 colours now
03:03 theBear that's more than me
03:04 RifRaf including skin tone, 2 shades of cardboard, 25 LED colours
03:05 theBear hehe, there's more than one shade of cardboard ? :)
03:05 RifRaf yep there is when you try separate it from the flouro lights
03:05 RifRaf funny how they are all close
03:38 RifRaf ok first issue, arduino has this pow function, as in,
03:38 RifRaf float CCT = ( (449*pow(n,3)) + (3525*pow(n,2)) + (6823.3 * n) + 5520.33 );
03:39 RifRaf is it easy to rewrite that in more standard code or do i need to make a pow function?
03:39 RifRaf http://arduino.cc/en/Reference/Pow
03:42 zap0 i have a problem; its mostly a mechanic engineering problem; but i want to control it electronically.. i need something i can control that will apply resistance to a rubber wheel.. the amount of resistance controlled electronically... what should i use?
03:47 RifRaf is (3525*pow(n,2) == (3525*(n * n) ??
03:51 RifRaf yep seems so
03:58 theBear yep.... yet another example of arduino unnecaserily shielding/blinding people to what they are actually doing :)
04:05 RifRaf more to go still :/
04:06 RifRaf only about 1000 more errors
04:08 RifRaf actually its a single page now, will whittle away the ones i can
04:08 RifRaf but none of the main code in yet, just setting up hardware
04:17 Hukka zap0: Springs, maybe?
04:17 Hukka Depends what kind of resistance you need
04:18 zap0 something to slow a bicycle tyre
04:22 rue_house like a bicycle brake?
04:36 RifRaf rue_house could you maybe help me for a bit tomorrow, have some compiling errors
04:38 RifRaf got a few of these and dunno why 40: error: 'TCS3414Start' was not declared in this scope
04:48 RifRaf these are the main error i have left, if someone could just help me fix one i could work out the rest
04:48 RifRaf was not declared in this scope
04:48 RifRaf for every function
04:49 RifRaf arduino is c or c++ ?
04:51 zap0 C i think.
04:52 zap0 my problem: yes... like a bibcycle break, but i don't need so much pressure as to break, just adding more resistance to simulate a load being carried by the simulated bicycle.
05:42 theBear cheap exercise bikes use a strap tensioned around a 'tube', more expensive ones do some inductivey thing
05:52 Triffid_Hunter zap0: if you're making an exercise bike, you'd be best off connecting it to a treadmill motor with a bank of big mosfets on a heatsink as an electronically controlled load.. alternatively, a switcher charging a battery to do something useful with the power
05:58 zap0 Triffid_Hunter, this is good idea. a treadmilll motor can be controlled to add more/less resistance
05:58 Triffid_Hunter zap0: I'm told that many of them are large brushed DC motors
05:58 zap0 seems like a very specific item; as in, hard to acquire a cheap/2nd hand one.
05:59 zap0 maybe any CD motor will do
05:59 Triffid_Hunter zap0: side of road during council chuckout
05:59 zap0 yes.. in januarary!
06:00 Triffid_Hunter zap0: sure, just be aware that smaller DC motors will burn out really damn fast if you use them for this. you can generate 300w on a bicycle, maybe 400-450w in short sprints
06:00 zap0 mmm... ok.. so i need something with 500W rating
06:01 Jak_o_Shadows Do you need a continuous range of simulated loads, or would intervals work?
06:01 Triffid_Hunter zap0: most cities have many during the year in different suburbs.. last time I checked brisbane council website, they had a javascript thing to find out when your next one is, view source allowed access to the whole list, looked like there was one every couple of weeks for the whole year
06:02 Triffid_Hunter zap0: ooh just had the best idea, when you find a suitable motor, connect it to a big capacitor.. should feel very inertial
06:02 Triffid_Hunter drain power out with your mosfets to simulate hill climbs
06:06 zap0 out local council stopped publishing the dates cause the contractors that do the pickups were not getting any of the "good stuff". too many people were out collecting. now there is just some mysteries beginning to it, and suddenly everyone gets the impression its on, and starts piling stuff up on the curb. i have no idea how it actually starts;
06:06 zap0 or how anyone is supposed to know when they are on.
06:07 Triffid_Hunter lol
06:07 Triffid_Hunter maybe they just randomly start when someone's moving in or out, then the council sees that there's crap everywhere and sends the contractors out to grab it?
06:12 zap0 im back
06:12 zap0 our modem had a spazzy
06:13 zap0 lost all the scrollback, did anything get said after my council rant?
06:23 RifRaf ok i mived all my functions to the top of the file and got rid of the decraration errors, shouldn't have to do that should i?
06:42 Triffid_Hunter zap0: last line we saw from you was [22:53] <zap0> or how anyone is supposed to know when they are on.
06:42 Triffid_Hunter zap0: nothing of consequence happened after that
06:42 zap0 , did you say anything after that. i lost all my scroll back
06:43 zap0 oh ok
06:43 zap0 thanks.
06:43 zap0 what was that last big thing you said?
06:44 zap0 an idea?
06:47 Triffid_Hunter [22:48] <Triffid_Hunter> zap0: ooh just had the best idea, when you find a suitable motor, connect it to a big capacitor.. should feel very inertial
06:47 Triffid_Hunter [22:49] <Triffid_Hunter> drain power out with your mosfets to simulate hill climbs
06:49 zap0 mmm... how big of a capacitor
06:49 RifRaf ok it compiles :)
06:49 zap0 a few farads
06:50 RifRaf and sends text to serial port, but no data yet, sensor still turned off, but good start for today
06:50 RifRaf will bug you all with the debugging in morning
06:50 zap0 you making something with a micro processor
06:50 RifRaf yeah microcontroller
06:50 zap0 i am starting to learn arduino next week
06:51 RifRaf atmega328p, colour detection thing
06:51 zap0 i know C already, so i am told it should not be too difficult.
06:51 RifRaf yes am trying to port arduino code to what i am more used to
06:51 zap0 are... i saw the colour detection sheild module on the interwebs this meorning
06:51 RifRaf no shields
06:51 Triffid_Hunter zap0: yeah, >1F
06:52 zap0 its an RGB LED and a LDR receiver
06:52 RifRaf just sample arduino code and breadboard
06:52 RifRaf this is a RGBC sensor
06:52 zap0 impressive!
06:53 RifRaf and using a white led for colout detection, for the reflection, or no led to detect different colour light
06:53 zap0 is this for an autonomous robot?
06:53 RifRaf yep it knows 50 colours now
06:54 RifRaf well yes, but for now is just another sensor i am trying to master
06:56 RifRaf http://imagebin.org/249028
06:57 zap0 ah... i see.
06:57 zap0 i've seen those boards too. somewhere.
06:57 zap0 http://www.robotgear.com.au/Product.aspx/Details/340
06:58 zap0 reading from an SD card.. cool
07:04 RifRaf saving to it
07:05 zap0 http://www.robotgear.com.au/Product.aspx/Details/686 colour camera
07:05 RifRaf yes they are good boards to use
07:07 RifRaf that sparkfun one does not have the usb chip
07:07 RifRaf er robotgear sorry
13:21 RifRaf morning
13:24 GargantuaSauce afternoon
13:27 RifRaf hi GargantuaSauce, i am having trouble understanding how to correctly read from i2c device, its all simple according to the docs :/
13:27 GargantuaSauce it is simple but fiddly
13:28 RifRaf yes, this library seems to make it simple, but once again i don't know how to use the supplied commands
13:28 GargantuaSauce do you mean the device's i2c registers?
13:28 RifRaf like i wish there was an example on this guide http://webbot.org.uk/WebbotLibDocs2/46942.html
13:29 RifRaf i think i can write to a register ok, it the recieving part
13:31 RifRaf TCS3414.receive(1,response); // in that i don't know what response should be
13:31 GargantuaSauce an array
13:31 GargantuaSauce more specifically, a pointer to an array
13:32 RifRaf ok well thats a clue, so pointers and arrays stump me once again :/
13:32 GargantuaSauce this is why i said you should nail down the fundaments of c before delving into this stuff!
13:32 RifRaf :(
13:33 theBear diving in my ass ! he was doing this 5 years before you even considered coming here... we all forget our fundamentals when we get outta practice
13:33 RifRaf theBear but it never sticks in
13:34 theBear i was just thinking re: micro vs modern 'normal' c programming, the pointer stuff always screwed with me, i cant' even remember the character that makes it a pointer instead of a var
13:34 GargantuaSauce uint8_t * 'response' The memory address to store the returned the values
13:34 GargantuaSauce i don't think you can chalk up not being able to parse that to being out of practice
13:34 RifRaf yes but how do i know what the memory adress will be?
13:35 theBear you don't, and that sounds somewhat wrong, but nevertheless, you use a pointer disguised as a variable with a character next to it
13:35 theBear maybe a % or something
13:35 GargantuaSauce 'disguised as'
13:35 RifRaf sorry for being stupid, i get get the code to compile without all the i2c read and write stuff, had to get through alot of errors
13:35 GargantuaSauce yeah that's really going to help him understand what's going on
13:35 GargantuaSauce jesus
13:36 theBear it looks like a variable, and for all intents and purposes WITHIN THE PROGRAM it is
13:36 theBear if you think about it, at this level all variables are more or less pointers
13:37 theBear we aren't inside an os here
13:37 GargantuaSauce ugh
13:37 theBear you explain it then
13:37 theBear c'mon
13:38 theBear don't just exclaim, be useful
13:38 GargantuaSauce it is somewhere between difficult and pointless to explain something while another person is just talking out their ass
13:39 RifRaf yeah i'd love to get this code working without arduino ide today
13:39 GargantuaSauce so a pointer is just a variable that contains an address instead of an actual value
13:39 theBear go on then, i'll be quiet, you just help rif
13:39 RifRaf :) i'll read carefully
13:41 GargantuaSauce pointer variables are declared with a * after the type
13:42 GargantuaSauce the * operator is also used to dereference a pointer, turning what it represents in an expression to a variable of the declared type, at the location of the address the pointer contains
13:42 GargantuaSauce the & operator does the opposite, producing a pointer containing the address of a variable
13:43 RifRaf oh
13:43 GargantuaSauce so if you have
13:43 GargantuaSauce int a = 10;
13:43 GargantuaSauce int *b = &a;
13:43 GargantuaSauce b will contain the address of a, which is set by the compiler
13:43 GargantuaSauce *b in an expression will be 10
13:43 GargantuaSauce setting *b = 9;
13:43 GargantuaSauce will also set a to 9
13:46 GargantuaSauce now if you declare an array, char b[10], b is actually a pointer
13:46 GargantuaSauce containing the address of the start of 10 bytes the compiler has allocated for you
13:47 GargantuaSauce the [] operator is equivalent to a dereference(*) and an addition
13:47 GargantuaSauce anyway so that function requires a pointer to an array for it to fill with its results
13:48 RifRaf ok thanks, will get strong coffeee and reread till it makes sence, it is sounding familiar
13:49 GargantuaSauce i am not very good at teaching this stuff, am quite sure tcpl does a better job
13:50 GargantuaSauce in any case all you need to do is declare an array with a size greater than or equal to the length parameter, pass that into the receive function, and then read it to get your results
13:52 GargantuaSauce just remember that a pointer has to actually contain the address of something sane before you can dereference it
13:52 RifRaf GargantuaSauce i know where to look in tcpl at least now, you make it sound so easy
13:53 GargantuaSauce it is quite simple once you understand it well
13:54 GargantuaSauce and tie it in with how memory and addressing and so on work in the von neumann architecture
14:21 RifRaf cannot get it right, is this far off?
14:21 RifRaf uint8_t response[1];
14:21 RifRaf TCS3414.receive(1, &response[1]); //I2cDevice. receive(responseLen,response)
14:22 GargantuaSauce remember that arrays start at 0
14:23 GargantuaSauce when you pass &response[1] you are telling it to write to the byte AFTER the 1-byte array you've declared
14:23 GargantuaSauce just response is all you need
14:23 GargantuaSauce response and &response[0] are equivalent
14:26 RifRaf k still not working :/
14:26 GargantuaSauce perhaps you should be looking at the return value
14:27 GargantuaSauce also make sure the device is actually only sending 1 byte
14:33 RifRaf ok appear to have got past that line, but now the next line has errors
14:33 RifRaf tcs3414.h:143: error: ISO C++ forbids comparison between pointer and integer
14:34 RifRaf line 13 in here,, http://pastebin.com/JX3w6WqN
14:34 rue_house uint8_t* receivedVal = response; //0001 (ADC valid) 0001 (Power on)
14:34 rue_house rprintf("TCS3414 is now \n"); //rprintf(receivedVal);
14:34 rue_house if(receivedVal == 1 || receivedVal == 17){ //0000 0001 || 0001 0001
14:34 GargantuaSauce remember that a pointer variable contains only an address
14:35 rue_house recievedval is a pointer to a uint8
14:35 GargantuaSauce you want to look at the value AT that address
14:35 rue_house it just points to one
14:35 RifRaf hi rue_house
14:35 rue_house its pointing to responce
14:35 RifRaf how do i fix it though
14:35 GargantuaSauce uint8_t receivedVal = *response;
14:35 RifRaf ok will try that
14:35 GargantuaSauce or just response[0]
14:35 rue_house so to compare the value of the memory its pointing to, you use to use *recievedVal == 1
14:36 RifRaf we have complilation :)
14:36 RifRaf ok will upload that and see what happens
14:36 rue_house int rifraf;
14:37 rue_house &rifraf is the address that rifraf is located in, in memory
14:37 rue_house int *freyed;
14:37 rue_house freyed is a pointer to an int
14:37 rue_house not the int itself
14:37 rue_house *freyed is the value at the memory location pointed to by freyed
14:38 rue_house &freyed is the memory address of the variable freyed
14:38 RifRaf ok it still tells me to sensor is off, something still up
14:39 rue_house int welthy[1];
14:39 rue_house welthy is a pointer to 1 integer
14:40 rue_house welthy[0] is the integer
14:40 rue_house &welthy is the address of the integer
14:40 rue_house *welthy is the value of the integer
14:41 rue_house int Rif[3];
14:41 rue_house RifRaf, how many integers is that?
14:41 RifRaf 3
14:42 rue_house and how you you set the value of the 3rd integer to 5
14:42 RifRaf omg it says its on now
14:43 RifRaf and rprintf("response %d\n", *response); returned a 1
14:43 rue_house and how you you set the value of the 3rd integer to 5
14:43 RifRaf um um
14:44 rue_house hint: ___________ = 5;
14:44 rue_house :)
14:44 rue_house take a wild guess, I dont mind if your wrong
14:44 RifRaf *Rif[] = 5;
14:45 rue_house nope, you dont need the *
14:45 RifRaf sorry i was not following close enough, too exitited that it appears to be on
14:45 RifRaf Rif[] = 5;
14:45 rue_house closer
14:45 RifRaf Rif = 5
14:45 rue_house you need to tell is which of the 3 ints to set to 5
14:46 RifRaf omg sorry rue_house, i have to reread all that you have being saying, am lost
14:48 rue_house oh damn I have to get to the screw store!
14:48 RifRaf ok it may sink in by the time you get back
15:32 RifRaf this is the code that starts the tcs3414 http://pastebin.com/s3fr4r0g
15:33 RifRaf appears to work, now to try and read values
15:51 RifRaf am stuck again on same kind of thing, how should this be written please,
15:51 RifRaf TCS3414.send(1,0xB6); // I2cDevice. send(writeLen,writeData)
15:52 RifRaf uint8_t * 'writeData' The memory address of the data to be written.
16:34 RifRaf am down to 2 issues, how to send a command, like above, and it kepts reseting the avr after this function that is meant to get the values
16:35 RifRaf am getting the same wrong values returns because i am not sending the command first
16:36 RifRaf am so close
17:04 RifRaf rue_mohr what you up to?
17:06 Tom_itx &writeData
17:07 RifRaf tried that and it gives another error
17:08 RifRaf error: lvalue required as unary '&' operand
17:08 Tom_itx where is the function prototype?
17:08 RifRaf the help file?
17:09 RifRaf http://webbot.org.uk/WebbotLibDocs2/46972.html
17:10 RifRaf am assuming this works by sending the device a command and it bounces values back
17:12 RifRaf this is how the arduino does it. Wire.write(0xB6); //1011 0110 //read Clear register
17:34 RifRaf well fuck, nothing works anymore :/
17:41 Tom_itx the first var is a value, the 2nd var is a pointer
17:45 Tom_itx The unary operator & gives the address of an object
17:45 Tom_itx uint8_t *
17:45 Tom_itx
17:45 Tom_itx 'writeData'
17:45 Tom_itx
17:45 Tom_itx The memory address of the data to be written.
17:46 Tom_itx x = &writeData
17:46 Tom_itx pass x in the i2c function
17:46 RifRaf have got somewhere again, will show you what i have
17:47 Tom_itx page 83 of the K&R book
17:47 Tom_itx read it
17:48 RifRaf k
17:48 RifRaf this must be close http://pastebin.com/EmTaVYk3
18:00 RifRaf finally getting some changing results
18:07 RifRaf can someone please see if this is done correctly http://pastebin.com/nggXKVDG
18:07 RifRaf appears to return values, gonna do same for rgb channels and see what happens
18:10 Tom_itx you probably don't need sizeof
18:10 Tom_itx you know how big it is
18:10 RifRaf i don't really
18:11 RifRaf how big is it?
18:11 Tom_itx 2 bytes
18:11 Tom_itx uint8_t clear[2]
18:12 Tom_itx print sizeof(clear)
18:12 Tom_itx and see
18:13 Tom_itx or at least evaluate it once before the function then pass that var to it
18:13 Tom_itx x = sizeof(clear);
18:13 Tom_itx then pass x
18:13 RifRaf somethings wrong :/
18:17 RifRaf getting results and even colours determined but all way off
18:20 RifRaf oh well am getting there i guess, can compare values to the arduino results to try see where things are starting to go wrong
18:24 RifRaf here are some results if anyone wants to have a crack at wats wrong
18:24 RifRaf http://pastebin.com/AfTG08ph
18:24 RifRaf way different
18:44 rue_shop2 ok I have to try to remmeber what to do today
18:44 fRaf falls on the f
18:44 RifRaf i did it
18:45 rue_shop2 it works?
18:45 rue_shop2 clean the deck, thats one thing
18:45 RifRaf it says my hand is a light skin tone \
18:45 rue_shop2 make boiler tube cleaner
18:45 RifRaf fucking incredible, w00t!!
18:47 RifRaf short lived elation, is wrong on most colours :(
18:48 RifRaf rue_shop2 list = list + fix rifraf;
19:00 RifRaf well results for green paper seem close with both codes, http://pastebin.com/L39rYmeH
19:15 RifRaf Tom_itx got rid of all the sizeof() things
19:22 GuShh3 RifRaf: why would you get rid of sizeof()
19:22 GuShh3 improves code readability and in cases where different platforms are used, resolves to the correct size.
19:23 GuShh3 it's also better than storing the size on a variable and using it every time.
19:24 Tom_itx takes time to execute each iteration
19:26 RifRaf GuShh3 tom didn't appear to like it
19:26 RifRaf oki'll put em back then
19:26 Tom_itx it's not my code now is it?
19:26 Tom_itx it's not his either
19:27 RifRaf yes but i am very easily swayed by advise
19:27 GuShh3 Tom_itx: you must be joking. it's pre-compiled
19:28 GuShh3 it's the same as if you were to place the actual number.
19:28 Tom_itx so sizeof evaluates at compile time?
19:28 GuShh3 unless it's an interpreted platform, in which case sizeof is the least of your worries.
19:29 Tom_itx just seemed like a waste to call a function every time when you could evaluate it once and use the var
19:29 Tom_itx but i don't know c that well either
19:30 GuShh3 it's not really a function, it's an operator that gets pre-compiled to whatever size it equates to, the actual number is put in place (think MOV EAX, 2 for an x86 short)
19:30 RifRaf ok i put em back, compiled size is identicle
19:30 GuShh3 unless there's something fishy going on, you can always check by looking at the compiled output
19:31 GuShh3 otherwise think of it as a macro where the pre-compiler stage looks for instances of the keyword and replaces it with the content of the macro
19:31 GuShh3 RifRaf: the only reason I mentioned it is because sizeof improves code readability, if you had a 1 instead of sizeof(byte) (whatever) you'd wonder where that 1 came from at some point, even if it's entirely obvious.
19:31 RifRaf Tom_itx you should make some more C AVR projects, good way to learn
19:32 Shh3 doesn't want to upset anyone, he's too sad for
19:32 RifRaf GuShh3 yes and thats what the docs mentioned as well, i like readable
19:33 GuShh3 RifRaf: consider the case of x86 vs x64, sizeof(integer) resolves to 4 on x86 and 8 on x64.
19:33 GuShh3 well, INT, whatever your headers say.
19:34 RifRaf yeah
19:34 GuShh3 now think about structures...
19:34 RifRaf is it easy to rprintf a number as binary?
19:35 GuShh3 it wouldn't make sense if you put 37 instead of sizeof(mystructure); (assuming 37 is it's size)
19:36 GuShh3 RifRaf: on your own? you can perform the conversion quite easily, or use existing code.
19:37 RifRaf the arduino has Serial.println(ID, BIN);
19:37 RifRaf there must be a function in webbotlibs, will have to search
19:38 GuShh3 I took the time it takes to research for functions on libraries vs the time to write them, sometimes writing them takes less time, but people argue it's the other way around.... must depend a lot on the task at hand of course.
19:38 GuShh3 but I mostly mean small helper routines
19:39 RifRaf yep, but when you write as well as me thats always the longer option
19:39 RifRaf there does not appear to be an option scanning the manual, will look for some sample code
19:40 GuShh3 pfft
19:40 GuShh3 my mind is somewhere else right now...
19:40 GuShh3 it's in a red place.
19:41 RifRaf something bad happen?
19:42 GuShh3 just life
19:44 GuShh3 So consider what it takes to convert binary to decimal... you have a representation of a byte 10101100
19:44 GuShh3 1*2^7 + 0*2^6 + 1*2^5 + 0*2^4 + 1*2^3 + 1*2^2 + 0*2^1 + 0*2^0
19:44 GuShh3 What would be the logical step to perform the opposite?
19:45 GuShh3 Not worrying about the ascii portion, since you can perform an additive operation to obtain the correct values
19:46 GuShh3 (Say you start at 48 for ascii 0, any number added to 48 gives you the ascii equivalent number, for instance 56 is 8)
19:46 Shh3 bl
19:50 GuShh3 Hint: you can traverse bit by bit checking whether it's one or zero and setting the ascii value accordingly ( 48, 49 ) then increasing your string pointer by one, until you've reached 8 iterations. Unrolling the code would make it faster, but do you really need to optimize at this point? heh
19:50 RifRaf um ok, not sure, was off getting confused by lots of other code and gave up
19:53 RifRaf have an issue, my code returns ID as 4, which is b100 , and the old code returns b10001 which is 17
19:53 RifRaf thats what i needed the binary for, to confim that
19:53 RifRaf now to find out why
19:54 GuShh3 o.O
19:56 RifRaf i am only reading the revision number it seems, not the part number
19:56 RifRaf nope thats not it :/
20:05 RifRaf i was reading a different register, but i think mine was right
20:05 jennie hi
20:05 tobbor jennie! like, totally tell us about the project!
20:05 RifRaf hi jennie, whats happening?
20:06 jennie h RifRaf , I am working at hard disk motor driver circuit, would you like to see PIC code ?
20:07 RifRaf heh i would go nuts if i tried to look at pic code right now
20:07 RifRaf am neck deep in avr c at moment
20:07 jennie oh
20:07 RifRaf does this make sence? Wire.write(0x84); //1000 0100 //get information from ID register (04h)
20:08 RifRaf i would have thought Wire.write(0x04); ???
20:10 RifRaf jennie what are you driving with the harddrive?
20:11 jennie I have connected PIC and L293D and trying to drive hard disk motor having 3 wires coming out of motor ( 3 phase motor)
20:12 jennie I am driving nothing with motor, just want to make it spin :D
20:12 RifRaf ok, its a brushless motor right? have no idea on then, but others here will have experience in time
20:13 jennie yes brushless
20:13 Tom_itx 3 phase
20:15 jennie hi Tom_itx
20:15 Tom_itx you need a driver for each phase
20:16 jennie :O
20:17 jennie I looked at this and followed his suggestion at of the page http://letsmakerobots.com/node/2898
20:17 jennie and then code PIC
20:17 jennie so only PIC and L293D wont drive the motor ?
20:17 Tom_itx not sure what a 293 is
20:18 Tom_itx quad half hbridge
20:21 jennie www.electrojoystick.com/tutorial/?p=759 is L293D with Arduino
20:24 Tom_itx must be the same pinout as a 754410
20:25 Tom_itx i have a few of those
20:25 Tom_itx that example is a simple dc motor though
20:25 Tom_itx not BLDC
20:26 rue_house jennie, you the one working on the 3 phse motor?
20:26 Tom_itx yep
20:26 rue_house still here?
20:27 Tom_itx do those hdd motors run at 12v?
20:27 Tom_itx or 5
20:27 rue_house no they run about 1.something, cause tis current control
20:27 jennie the R between all three wire of motor is 6ohms
20:27 rue_house which is why I told him to put a 10 ohm resistor on the motor supply voltage to the chipp
20:27 rue_house ah, there you are
20:28 rue_house jennie, did you find a resistor to use?
20:28 jennie yes
20:28 rue_house jennie, did you get it working yet/
20:28 jennie :'-( No
20:29 rue_house ok did you try the new pattern I gave you?
20:29 jennie yes, I have written the code too for that pattern please have a look http://codepad.org/P97O5QUT
20:29 RifRaf my solution for decimal to binary,
20:29 RifRaf if (*getID == 17) { rprintf("Part and rev ID: b0001 0001 \n", *getID); }
20:29 RifRaf works great
20:30 rue_house jennie, then we need to chnage the driver cirucit more
20:30 rue_house jennie, acutally, did you power it with 12V or just with the 5?
20:31 jennie I power with 5 V
20:31 rue_house jennie, let me try to find a datasheet
20:32 jennie datasheet for ?
20:32 rue_house a chip that runs a 3 phase motor
20:32 jennie ohk
20:32 rue_house it shows the sequence
20:32 jennie what is this L293D then ?
20:33 jennie http://letsmakerobots.com/node/2898 runs HDD motor with L293D and at the last he suggested to use PIC
20:34 rue_shop2 HA13605
20:34 rue_shop2 rohm 6AE11
20:36 rue_shop2 upc1246 or td62503 or TC9142
20:37 jennie ok, I copied and made a note , I will buy any one from above, ok ?
20:37 rue_shop2 upc1246
20:37 rue_shop2 no
20:37 rue_shop2 i will find you the document so you can use the same method as that chip does :)
20:37 rue_shop2 you cant buy those chips anyhow
20:37 rue_shop2 please wait for mw to find the document
20:38 jennie ok
20:40 Shh3 wonders if there's any beer in rue_shop2's
20:40 rue_house perfect!
20:41 rue_house jennie, hold on
20:41 jennie ok
20:41 rue_house oh not quite please wait
20:42 RifRaf ok, my code was upto 120% of the avr
20:42 RifRaf sp i ticked enable code optimisation, and it drops to 96%, is this for real?
20:43 RifRaf er, enable compiler optimisation
20:43 RifRaf i just added a bunch of new devices for the heck of it
20:43 RifRaf gonna make the avr speak the colours out loud
20:43 RifRaf and added lcd
20:44 rue_house at some point your gonna need a computer to do all these things RifRaf
20:44 RifRaf i have a computer
20:44 rue_house jennie, please wait, I am finding your document
20:44 RifRaf i am enjoying seeing wat avrs can do these days
20:45 RifRaf but yes will have to get some chips bigger than 32k
20:45 jennie yes
20:45 RifRaf have some but not on little usefull pcbs
20:46 RifRaf GuShh3 why would one not want to use compilier optimisation? does it just slow down compiling or?
20:48 rue_house !assist datasheets/HA13605A.pdf
20:48 tobbor Possibly http://eds.dyndns.org/~ircjunk/datasheets/HA13605A.pdf
20:48 RifRaf 404 rue
20:49 rue_house no its not its a 403
20:49 RifRaf yes 403 even
20:49 rue_house 403 is different
20:49 RifRaf ok now
20:49 rue_house jennie, http://eds.dyndns.org/~ircjunk/datasheets/HA13605A.pdf please open this document
20:51 jennie ok
20:52 rue_house please go to page 5
20:53 rue_house then go to page 7
20:53 rue_house see table at top of 7?
20:54 rue_house Z means off, not high, not low
20:54 rue_house PWM means low, not high, not Z :)
20:55 rue_house jennie, your using an L293?
20:55 Tom_itx why don't they say L then?
20:56 rue_house because its current control, they use pwm for the current control
20:56 rue_house the L293 cant really do this right...
20:56 Tom_itx not easily
20:56 rue_house not enough enable pins
20:56 rue_house you can do it with 2 of them
20:58 rue_house I lost him again
20:58 rue_house I have to move on with my eveing
20:58 rue_house its passing my by quickly
20:58 RifRaf rue_house have a quick look at this
20:58 jennie I have two of them
20:59 jennie I have two L293D
20:59 jennie http://users.ece.utexas.edu/~valvano/Datasheets/L293D_ST.pdf datasheet
20:59 rue_house ok
20:59 rue_house jennie, you need 6 bits to control this
21:00 RifRaf i'll wait
21:01 rue_house jennie, your table needs to be: U UE V VE W WE where U V and W are the driver inputs, and UE VE and WE are enables for them
21:01 rue_house one chip can do two of the wires, the 3rd wire needs to be done with another chip
21:01 rue_house U UE V VE W WE
21:02 rue_house 0 1 1 1 0 0
21:02 rue_house 0 1 0 0 1 1
21:02 rue_house 0 0 0 1 1 1
21:02 rue_house 1 1 0 1 0 0
21:02 rue_house 1 0 0 0 0 1
21:03 rue_house 0 0 1 1 0 1
21:03 rue_house thats your control table
21:03 jennie ok, many many thanks
21:03 rue_house motor connections
21:03 jennie but I have a confusion
21:04 rue_house U UE V VE W WE
21:05 rue_house 3a - 11a - 3b -
21:05 rue_house microcontroller connections:
21:05 rue_house U UE V VE W WE
21:05 RifRaf ok does this look like a proper code file, have separated the functions into other files http://pastebin.com/Vv6zhnJ1
21:05 rue_house 2a 1a 10a 9a 2b 1b
21:06 RifRaf because it could not find the functions when they were in the same file, does that make sence?
21:06 rue_house where a is for pins on the first 293, and b is pins on the second 293
21:06 rue_house RifRaf, you have to learn how to prototype your functions, which is something you shoudl always do
21:06 rue_house RifRaf, we need to do hello world again
21:07 RifRaf yes it was telling me they were not declared
21:07 RifRaf hello world seems like we are going backwards
21:08 rue_house jennie, you also need to put a resistor from the l293 pin 8 to positive, or there will be too much current and the chip will burn out
21:08 RifRaf i just ported code
21:08 RifRaf with lots of port
21:08 RifRaf having a glass to celebrate now
21:08 rue_house RifRaf, you havn't learned how to write a function proper, we can do this in hello world so you know
21:08 jennie ok rue_house I am following you now am I correct that microcontroller output will go in rue_house 2a 1a 10a 9a 2b 1b , as you wrote above
21:09 RifRaf rue_house correct, i have not
21:09 RifRaf was trying to find examples but had none
21:09 RifRaf but i managed to make functions and include them somehow
21:10 rue_house RifRaf, write me a hello world and post one a code site, I'm gonna try to have supper and get to an appointment soon
21:10 RifRaf well i will open an old one
21:11 RifRaf am brain fryed from this mornings effort
21:11 rue_house no, I wan tto you to make it from scratch, you shoule know how
21:11 RifRaf but i forget, but will try
21:11 RifRaf #include "stdio.h" is how it starts i think
21:12 rue_house yes
21:12 rue_house RifRaf, dont try to write it from top to bottom
21:12 rue_house start anywhere and work out
21:14 jennie also rue_house what delay in ms or us should i keep for this motor ? http://www3.picturepush.com/photo/a/12377031/img/Anonymous/drive-motor.jpg
21:14 RifRaf rue_house i really did it without any cheating
21:14 RifRaf wow
21:14 RifRaf will paste
21:15 RifRaf http://pastebin.com/w3S1hzM1
21:15 RifRaf does that mean i can code a little now?
21:16 rue_house jennie, 33ms
21:16 fRaf is happy with his hello w
21:16 rue_house RifRaf, see! good work
21:16 rue_house RifRaf, now, would you like to make a fuction called hello for me?
21:16 RifRaf yep first time i ever did it without cheating at all
21:16 RifRaf ok
21:16 RifRaf while i am on a roll
21:16 rue_house take a stab, I will help you correct anything
21:17 Shh3 stabs Ri
21:17 GuShh3 Did I do it right?
21:17 GuShh3 I wonder what exactly is RifRaf drinking right now
21:17 GuShh3 whatever it is, keep drinking it.
21:18 GuShh3 awww work related mail on a sunday, what the hell
21:20 RifRaf tawny port, by the schooner glass
21:20 RifRaf rue_house http://pastebin.com/H7UmbLHL
21:20 RifRaf its not working
21:20 RifRaf with water
21:20 rue_house ok good!
21:20 rue_house two things
21:20 rue_house a) the fuction hello needs to have a reutrn type
21:21 rue_house if your not returning anyhing, it can be void
21:21 rue_house so, how would you modify line 9 ?
21:21 rue_house (technically, you should make main return an int)
21:21 RifRaf hello(0){ maybe?
21:21 GuShh3 void hello(){ ... }
21:21 GuShh3 do I get cookeh?
21:21 RifRaf oh the void, der
21:21 rue_house nope, its like a variable, you want to say what type it is
21:22 GuShh3 wait, maybe it's a poisoned cookie... after all people hate me!
21:22 rue_house so, make hello void, and make main int
21:22 rue_house then repaste, k?
21:23 GuShh3 RifRaf: however if you use int, you have to return an int, you can't not return anything.
21:23 GuShh3 so if it's int main(void){
21:23 rue_house you can, it'll complain bitterly ;)
21:23 GuShh3 you have to return 0; for example
21:23 RifRaf http://pastebin.com/3B5VwuTC
21:24 GuShh3 rue_house: it would complain with any of what RifRaf was doing too :p
21:24 RifRaf am still missing unquanified-id
21:24 GuShh3 strictly speaking you must do what you say you're gonna do!
21:24 GuShh3 this is why politicians can't write code.
21:24 Shh3 r
21:25 RifRaf oh maybe i need a 0
21:25 GuShh3 "But I don't understand it! this envelope full of money should make the compiler not complain, shouldn't it?"
21:27 RifRaf well it does not like my void hello(){
21:30 rue_house RifRaf, yes, post what you have we will fix th next things
21:31 rue_house RifRaf, your idea about the #define is close, but wrong syntax
21:31 RifRaf lol i have reached my pastebin limit for 24 hours
21:31 RifRaf http://pastebin.ca/2330467
21:32 rue_house oh, well use debian
21:32 RifRaf yes it didn't work for me last night either
21:32 rue_house that looks good
21:32 RifRaf am using.ca
21:33 rue_house cool!
21:33 rue_house .ca rocks!
21:33 RifRaf does not compile
21:33 rue_house (and trees and water)
21:33 rue_house no
21:33 rue_house ok, when the compiler is reading it, it gets up to line 06 and has never heard of hello() before
21:33 rue_house (I'm ignoring the #define)
21:33 rue_house so it dosn't know how to work it
21:34 RifRaf yep
21:34 rue_house to PROTOTYPE a fuction, copy the definition of it, up to and not including the { and put it where your #define is
21:34 rue_house void hello();
21:34 RifRaf same as when i had the functions below main loop, but they were ok at the top of the file
21:34 rue_house and that gets a semicolon on the end
21:34 rue_house do this first
21:34 RifRaf oh
21:35 rue_house #define is a macro replacement, not a prototype
21:36 rue_house RifRaf, did what I say make sense?
21:36 rue_house then I want to show you another way
21:37 RifRaf well this is what i think you said http://pastebin.ca/2330470
21:37 RifRaf still no compile
21:38 RifRaf oh wait
21:38 RifRaf removed a ; and compiled, testing now
21:38 RifRaf ok works
21:39 RifRaf http://pastebin.ca/2330471
21:40 RifRaf so i need to put a void line at the top of file for the functions to work
21:41 RifRaf but is it better to keep it like it is now, a separate 'library' file for sensor calculations and colour calculations
21:41 RifRaf and keep the main file simple
21:48 rue_house sorry supper
21:48 RifRaf all good, adding lcd to breadboard
21:48 rue_house RifRaf, the decleration tell the compiler what to expect before it has to use it
21:48 RifRaf yep
21:49 rue_house RifRaf, ok, now, I want you to make two new files, hi.c and hi.h
21:51 RifRaf done
21:51 rue_house in hi.c put the hello fuction
21:52 rue_house in hi.h put the prototype
21:52 RifRaf k
21:52 rue_house in the program thats left, add #include "hi.h"
21:55 RifRaf ok did it all, still has an error
21:55 RifRaf [Linker error] undefined reference to `hello()'
21:56 rue_house did the program make you make a project?
21:56 RifRaf no i manually made the files
21:56 RifRaf i need to tell devc about them?
21:56 rue_house it has to compile them hi.c and the file with main as part of the same project
21:57 rue_house I dont know if you can do it without adding both files to a common project
21:59 Sypheren Anyone know what a quadrotor is?
22:00 RifRaf a 4 bladed heli
22:00 RifRaf prop in each quadrant
22:00 RifRaf i tryed to make a project, still have isses
22:03 RifRaf now getting silly errors like [Linker error] undefined reference to `WinMain@16'
22:04 RifRaf to measure colour from reflections,, would you use a white or black chamber to house the sensor in?
22:05 Sypheren I'm thinking about making one for "Funzies" or educational purposes. I cant decide whether I want to use a created source or make my own
22:05 rue_house RifRaf, the file with main() needs to be in the project
22:06 RifRaf yeah it is
22:06 RifRaf thats the one i am compiling
22:07 RifRaf hello2.cpp
22:07 RifRaf should i be in c?
22:09 rue_house it should be c
22:09 rue_house I have to go rifraf :/
22:09 Sypheren Wait, what does the function main() fo?
22:09 Sypheren do*
22:10 Sypheren I know its like the startup, but is it just a general purpose?
22:10 RifRaf the main loop
22:10 rue_house when the program is run, it starts at main
22:10 RifRaf ok rue thanks for lesson
22:11 RifRaf ima breadboard for a while, wanna get lcd and tts working
22:35 Sypheren How hard would it be for me to start coding software for a quadrotor?
22:36 Sypheren And get informationf from barometers and gps systems to keep the quadrotor from losing stability?
22:36 RifRaf how well can you code?
22:36 Sypheren Not well
22:36 RifRaf in that case hard
22:37 RifRaf i would recomment you look at webbotlibs to make interfacing with the sensors eaier
22:37 RifRaf it has support for all those
22:37 Sypheren I mean, how simple is it to get information from a sensor, and in turn make the quadrotor do something? In a logical sense: If gps position is greater than previous amount make x motor do y
22:38 Sypheren or; if ir distance sensor 2 is 4 inches away from an object, make motors 2 and 1 increase speed by 4 rpm for 2.5 seconds
22:38 Sypheren But I dont understand how I will be making all the rotors spin the same rpm's
22:39 RifRaf well this took me a few days, and i cannot code wvery well http://www.youtube.com/watch?v=AalBO4x4K5s
22:39 RifRaf is interaction in the way you mention, using accel to move servos
22:41 Sypheren well, the rotors need to spin at high speeds to make the quadrotor fly
22:41 Sypheren so the servos or motors need to be light and fast
22:41 GuShh3 quadfail
22:41 Sypheren i have three that are heavy and cant do 360 turns
22:42 Sypheren What I'm trying to do is make a quadrotor that simply uses sensors to avoid objects, stay a set distance from things on top and below it, and fly with stability
22:43 Sypheren so ir or sonar sensors on the top, bottom, and sides
22:43 Sypheren a barometer and gps
22:43 GuShh3 and a c4 charge just in case
22:43 RifRaf well start making it, and fix issues as the arise is my approach
22:43 Sypheren Thats how I do it!
22:44 GuShh3 that's why you are on square 0
22:44 RifRaf so have you made it already?
22:44 RifRaf lol
22:44 Sypheren But I need to know something first, will I need special libraries to communicate with most sensors?
22:44 Sypheren or can you simply get a integer on pin X
22:44 RifRaf no but they help
22:44 Sypheren In what way do they help
22:44 Sypheren ?
22:45 RifRaf they help get the hardware working so you can focus on actually using the sensors
22:45 RifRaf instead of weeks trying to get the hardware going and then being over the whole thing
22:45 Sypheren So I would need to find a library for a certain sensor?
22:46 Sypheren And #include it?
22:46 GuShh3 an integer on pin X.... now that would be... too.... arduinian
22:46 RifRaf yes pretty much
22:46 Sypheren I'm using arduino (forgot to mention that
22:46 GuShh3 hahaaaaaaaaaaaaaaaaaaaaaaaaa
22:46 RifRaf lol
22:46 GuShh3 Aaaaaaah
22:46 Shh3 co
22:46 pheren ushers GuShh3
22:46 GuShh3 RifRaf: I'm not an ass, but it's a clear indication that someone is using an arduino when they make such comments as "integer on pin x"
22:46 Sypheren Hey, let me learn
22:47 GuShh3 seriously. shows the lack of basics.
22:47 RifRaf yes, even i am lmao GuShh3
22:47 GuShh3 Sypheren: sure, and let me rant a bit too
22:47 Sypheren Fine
22:47 GuShh3 GREAT
22:47 Sypheren But remember
22:47 GuShh3 Tom_itx knows I gotta rant some.
22:47 Sypheren You cant have your rant and say it too
22:47 Sypheren Okay: Proceed
22:47 GuShh3 Sypheren: then you can't have your arduino!
22:48 Sypheren WELL I JUST CAN'T COME TO TERMS WITH THAT
22:48 GuShh3 "that's OK, I got tupperware full of arduinos, I'll just pull another one!"
22:48 Sypheren Exactly
22:48 GuShh3 Sypheren: So do you have anything built so far
22:48 Sypheren Without arduinos I don't know what I would do
22:48 GuShh3 software aside
22:48 Sypheren I do not
22:48 GuShh3 You'd drool on the keyboard, possibly
22:48 Sypheren I'm in the theorizing stage
22:49 GuShh3 Ah, so when you get to the design phase may I suggest hot pink for the paint finish?
22:49 Sypheren No you may not
22:49 GuShh3 Black and orange?
22:49 Sypheren Yes
22:49 Sypheren Black and red
22:49 RifRaf i habve spent the last 24 hours getting off arduino, had to use it because i found software for a sensor
22:50 GuShh3 Red is just an orange after I beat it to death.
22:50 RifRaf but once it worked how i wanted made it work without arduino and i am free again :)
22:50 GuShh3 Sypheren: I'm sure you'll find libraries to use your sensors....
22:50 GuShh3 for one you'll probably buy the shields
22:50 Sypheren For now- I'm quite new and find arduino a very easy way to learn
22:50 GuShh3 and your quadcopter will weigh so much you'll need a small nuclear reactor to power it
22:50 GuShh3 tehehe
22:50 RifRaf its not really learning
22:50 Sypheren I'm sure I'll become like you can find arduino limiting
22:51 Sypheren where did that 'can' come from...
22:51 GuShh3 I never owned an Arduino, possibly never will, unless someone sends me one, in which case I've promised to shoot it.
22:51 Sypheren I meant to type and
22:51 Sypheren Oh
22:51 Sypheren In that case, I'll use arduino until I find it limiting
22:51 GuShh3 That's great
22:51 Sypheren I saw this one person use a quatrotor to lift a brick.
22:52 GuShh3 Extra points if you get it to throw the brick against a lawyer or something
22:52 Sypheren I'm sure I wont achieve that power, but I will definately try to have it lift itsself
22:52 GuShh3 That would be a good use of technology right there.
22:52 Sypheren GuShh3, I can't tell if your
22:52 GuShh3 serious or joking?
22:52 Sypheren trying to ridicule me or help me by pointing out logical flaws
22:52 GuShh3 which logical flaws?
22:52 pheren contempl
22:52 Sypheren I see
22:52 GuShh3 I'm saying lawyers suck.
22:52 Sypheren It must be the former
22:53 GuShh3 And should be brain damaged with bricks.
22:53 Sypheren My dads a defense attorney.
22:53 GuShh3 Sypheren: hes a liar
22:53 Sypheren Actually, most people in my family are attorneys
22:53 Shh3 shakes
22:53 GuShh3 BRICKS FOR YA'LL
22:53 GuShh3 Sypheren: Don't worry, so was my dad
22:53 Sypheren He kinda got forced to work as one, previously he was a chemist, but when he started a family, working in labs couldnt support one
22:54 GuShh3 That's why I get to joke about it.
22:54 Sypheren Heh
22:54 Sypheren Back to robots
22:54 Sypheren This quadrotor
22:54 GuShh3 Why stop at 4? why not moar?
22:54 GuShh3 Quite frankly I would only build one for video purposes
22:54 GuShh3 ie aerial shots
22:55 GuShh3 can't find other actual use for one.
22:55 RifRaf Sypheren if you wanna learn try this course http://www.youtube.com/user/mouhknowsbest/videos?flow=grid&view=0
22:55 GuShh3 go-pro as a payload would be a good start
22:55 RifRaf it even uses a quadrotor as example
22:55 Sypheren Just for educational purposes, how do I go from including a library to getting information from the sensor in the code? And four because it's stable enough to run without falling, and powerful enough to lift cameras, which are useful for aerial photographs
22:56 Sypheren Woah
22:56 GuShh3 Sypheren: your biggest concern right now is knowing how much power you can have and how much power you plan to spend
22:56 Sypheren I didnt even read that
22:56 Sypheren And we both got photography out of somewhere
22:56 Sypheren Thanks RifRaf!
22:56 Sypheren Yes it is
22:56 Sypheren I might want to keep this under 80$ unless I can come up with more money
22:56 Sypheren I have a myriad of mechanical tools
22:57 RifRaf start with http://www.youtube.com/watch?v=aSwCMK96NOw and keep going
22:57 Sypheren So making a body is limited by weight
22:57 GuShh3 then, based on your maximum payload you can start looking for motors and props
22:57 GuShh3 carbon fiber is ideal, otherwise aluminum rods
22:57 Sypheren I need a fast, light motor that can keep track of rpm's
22:57 Sypheren I have more aluminum than you can shake a stick at
22:57 GuShh3 brushless
22:58 Sypheren Can a brushless motor be told to spin at x rpms, or would it simply be told voltages?
22:58 GuShh3 why would I shake a stick at ANY aluminum?
22:58 Sypheren To make it tell you where the treasure is
22:58 Shh3 facep
22:58 RifRaf aerogel is where its at
22:58 GuShh3 not if it's made out of egg whites
22:59 Sypheren Locig
22:59 Sypheren If you know where the muffin man lives, he can tell you
23:00 Sypheren might have to pay him some carrots first though
23:00 GuShh3 I'M THE MUFFIN MAN
23:00 Sypheren I'm betting waspinator is so confused right now
23:00 Shh3 points at his beer b
23:00 Sypheren waspinator, trust me, there is a logical background to this
23:00 Sypheren albeit long, but logical
23:00 GuShh3 No there isn't, RUN FOR YOUR LIFE
23:01 waspinator ya...ok
23:01 GuShh3 Sypheren: http://www.goodluckbuy.com/index.php?target=products&mode=search&subcats=Y&type=extended&avail=Y&pshort=Y&pfull=Y&pname=Y&pkeywords=Y&cid=0&q=brushless&x=-1020&y=-135
23:01 Sypheren See- we tried to talk about arduino, but seeing how any disagreement here turns into illogical jargon to prevent flaming, this happened
23:01 Sypheren So we can stay friends
23:01 Sypheren And get along
23:01 GuShh3 But no crossing swords k
23:01 Sypheren AX-2810Q-750KV 900KV Brushless Quadcopter Multi-Rotor Motor
23:01 RifRaf Sypheren no one here knows how to use arduino
23:02 GuShh3 I don't want to explain what KV is right now
23:02 RifRaf i can get something going with it, and thats more than most would even dare try
23:02 GuShh3 I've had to do that in other channels way too many times
23:02 GuShh3 I'm frustrated.
23:02 RifRaf GuShh3 maybe you should go chat with flyback, someone let him back
23:03 GuShh3 OK then the simplest possible explanation is K stands for 1000 (RPM) and V for volts, so 1k rpm per volt.
23:04 GuShh3 You'll then ask "oh so what's the catch?" thermal limitations!
23:04 RifRaf heh
23:04 GuShh3 so 900KV motor at 10VDC is 9.000RPM
23:05 RifRaf 900kv motor, wow
23:05 GuShh3 not kilovolts.
23:05 GuShh3 1200KV at 20VDC = 24.000RPM
23:06 RifRaf i have avoided brushless thus far, and think i will for the next few weeks at least
23:06 GuShh3 in an open-loop configuration you couldn't give 6 flying dicks about the RPMs each motor is actually running at, you'd just base your flight off your accelerometer and other instrumentation
23:07 RifRaf true
23:07 RifRaf open-loop, hrm ok, i just thought that was closed-loop
23:07 GuShh3 RPMs can come in handy for other purposes. But to trully detect prop failure or a stall you'd use an optical encoder or hall effect sensor per motor
23:08 GuShh3 RifRaf: closed would involve a feedback path of some degree
23:08 RifRaf yes i thought that the sensors were doing the feedback, like the accelerometer uyu mentioned
23:08 GuShh3 for instance, a cheap 40W soldering iron is open loop and self regulates due to thermal loss
23:08 RifRaf ok
23:09 GuShh3 a proper soldering station has a thermocouple or other means of temperature sensing by the tip and uses this on a closed loop to maintain the preset temperature by applying current pulses
23:09 GuShh3 (unless it's RF based.... like the metcal station I never had)
23:10 RifRaf wondered how they did it, this one keeps a pretty good temp, and turns on as soon as you draw heat from it
23:10 GuShh3 Sypheren: So aside from the KV rating, the W (watt) rating is important to know how much power can be dissipated safely
23:10 GuShh3 you can peak them for a small period of time without much harm, but you can't sustain them at 150% for long
23:11 GuShh3 heat just destroys the windings.
23:12 GuShh3 I don't think you can build a useful quad for under 100 bucks
23:12 GuShh3 unless you make it all from scratch yourself
23:12 Sypheren I actually already knew what kv was for
23:12 GuShh3 lol
23:13 Sypheren I have the mechanical side down, its the coding side that I'm new to
23:13 GuShh3 So you know how to drive a 3-phase motor too?
23:13 Sypheren Yes, signal wire is sent pulses to determine speed
23:13 GuShh3 Because most of that is software.
23:13 Sypheren I havent done this stuff in too long
23:13 Sypheren I know =/
23:14 GuShh3 There's no signal wire, just windings, unless it's got an integrated sensor in which case it's got nothing to do with the actual driving of the windings!
23:14 Sypheren So the brushless motor (three wires) operates the same way a regular servo motor does? With the yellow wire carrying a signal to determine angle or speed of rotation?
23:14 GuShh3 no
23:14 Sypheren Then this is new content to me
23:14 GuShh3 a servo has a small circuit board inside that translates (in case of analog servos) the pulse width to a position
23:15 Sypheren Which was the part that I understood
23:15 Sypheren But the brushless motors with three wires
23:15 GuShh3 except 3 phase motors (brushless) are driven by AC
23:15 GuShh3 that's why a driver is required.
23:15 RifRaf brushless is way different to a servo operation
23:15 Sypheren Okay
23:16 GuShh3 and this is why I think you can't build a fully functioning quad for under 100 bucks unless you build it all yourself, that excludes arduinos and shields.
23:16 Sypheren Driver being hardware? Or a software translator?
23:16 GuShh3 http://www.goodluckbuy.com/r-c-fly-model-mini-helicopter-204g-quadcopter.html
23:16 GuShh3 Sypheren: it can be both.
23:17 GuShh3 because you'll most likely end up using a microcontroller to generate the waveforms
23:17 GuShh3 and that involves software.
23:17 Sypheren So an output could send a certain frequency to determind speed?
23:17 Sypheren determine*
23:18 Sypheren R/C distance:30m
23:18 Sypheren bullshit
23:18 Sypheren to the highest degree
23:19 GuShh3 what did you expect for 50 bucks
23:19 Sypheren No, I mean theyre lying
23:19 Sypheren that wont do 30 meters
23:19 GuShh3 I wouldn't know
23:20 GuShh3 But hack it and it will.
23:20 Sypheren Yeah
23:20 Sypheren So, a brushless motor can be sent certain frequences to determine speed of rotation, meaning rpms can be known.
23:20 Sypheren Am I correct?
23:21 GuShh3 not quite
23:21 Sypheren Correct me
23:21 GuShh3 this is why I'm frustrated with the topic
23:21 GuShh3 it reminds me of ##electronics
23:22 Sypheren Oh god
23:22 Sypheren Can most brushless motors have their speed known?
23:22 GuShh3 sure
23:22 GuShh3 focus on generating the phase shifted waveforms (120 degrees out each)
23:23 Sypheren So in a chip, find a way to create that signal and drive it to the motor?
23:23 GuShh3 and before that, focus on h-bridges, half bridges namely.
23:23 pheren goo
23:23 GuShh3 which are going to be the doing the grunt work.
23:24 GuShh3 then you'll read on pulse width modulation
23:24 GuShh3 and fall asleep
23:25 GuShh3 Sypheren: it gets oh so fun with these cheap rc brushless motors, the only way you have to know the position of the rotor is by analyzing the EMF returned by the windings
23:25 Sypheren Why are h bridges necessary?
23:26 Sypheren I don't see a time when I would need to spin the rotor backwards?
23:26 GuShh3 to, in a way, convert your signal to a high current capable "channel"
23:26 zhan evening
23:26 Sypheren OH
23:26 GuShh3 you want to drive the winding and you need a device that can handle the power
23:26 Sypheren Hey zhan
23:27 zhanx opps typo on the nick
23:27 Sypheren GuShh3, why not use a transistor, then?
23:27 GuShh3 that's what they're made of
23:28 Sypheren Oh
23:28 GuShh3 you can either build your own discrete bridges
23:28 GuShh3 or buy monolithic ones
23:28 GuShh3 Sypheren: so 3 waveforms are required, that's 3 PWM channels per motor
23:28 zhanx is rue_bed, rue_house, rue_shop2, rue aka grue about
23:28 Sypheren So we have a large battery to power the rotors, and carrier signals to tell them how fast the phase is?
23:28 GuShh3 this is when you might want a small mcu on a module called a "brushless driver" to do all the work via a serial interface with your main processor
23:29 Sypheren Serial interface?
23:29 pheren goo
23:29 GuShh3 phase has nothing to do with speed
23:29 zhanx true
23:29 Sypheren Whoops
23:30 Sypheren By phase I mean frequency
23:30 Sypheren Why are 3 waveforms needed?
23:30 GuShh3 getting your phase shift at 120 degrees might be one of the biggest challenges without an oscilloscope at first
23:30 Sypheren But a brushless driver can automatically do ti?
23:30 Sypheren it*
23:31 GuShh3 yes
23:31 GuShh3 but they cost $$
23:31 GargantuaSauce what
23:31 GuShh3 and you don't learn shit by buying modules
23:31 GuShh3 I think I proved that many times.
23:31 Sypheren Okay..
23:31 Sypheren So three channels per motor?
23:32 Sypheren I dont understand what constitures as a chanel
23:32 RifRaf GargantuaSauce got the colour sensing code converted and working :)
23:32 Sypheren Can all of these be carried through a single wire?
23:32 Sypheren channel*
23:32 GargantuaSauce http://www.ebay.ca/itm/Brand-New30A-Speed-Controller-RC-ESC-For-Brushless-Motor-Part-RC22-/181092786778
23:32 GuShh3 Sypheren: 3 phase provides an efficient, even flow of current and makes it easier for the motor to start on it's own.
23:33 GargantuaSauce you are not going to make your own motor controllers that are cheaper or lighter than that
23:33 GuShh3 Sypheren: actual single phase motors require auxiliary windings to mimic a secondary phase for this very purpose
23:33 Sypheren Oh
23:33 GuShh3 GargantuaSauce: maybe not him
23:33 GargantuaSauce and building one would be enough of a project on its own without the quadrotor on top
23:34 GargantuaSauce who are you giving advice to then?
23:34 GuShh3 GargantuaSauce: it would be something that would help him understand the technology better
23:34 Sypheren The same way industrial motors for large cutting tools use three sine waves so that they dont lose force every 1/60 of a second
23:34 GuShh3 I don't tell people to buy and hook things up
23:34 GuShh3 any retard can do that, look at #arduino, wait... no they can't, sorry.
23:34 GuShh3 they're beyond retard.
23:34 Sypheren =/
23:35 GuShh3 Sypheren: same principle, but smaller scale.
23:35 Sypheren I see!
23:35 Sypheren So they can be carried through one wire, with different grounds
23:35 GuShh3 except in industrial operations (minus power factor correction, filtering, etc) the waveforms are kindly generated by the electrical company
23:35 Sypheren or through different sources
23:35 GuShh3 except for some cases.
23:35 Sypheren Yes
23:36 Sypheren So, to completely and utterly clarify things, what defines how fast it travels?
23:37 GuShh3 GargantuaSauce: such modules also impose limits you may not want to live with, such as maximum voltage, current, etc.
23:37 GuShh3 I agree the price is awesome for what it is though.
23:37 GuShh3 And you could get away with some clever use
23:38 GuShh3 Sypheren: the voltage it "sees"
23:38 GargantuaSauce anyway assuming you approach this quadcopter in a sane manner (using off the shelf hobby hardware which is super cheap and made specifically for this purpose), the hardest part of the ordeal would be making the control loop
23:38 GuShh3 which is proportional to the current across the windings
23:38 GuShh3 the way you control the "voltage" is thanks to the PWM
23:38 GargantuaSauce the logical link between the sensory input and motor controller output
23:38 GuShh3 GargantuaSauce: might as well buy a quadcopter for 50 bucks
23:39 GuShh3 or why bother, watch one fly on youtube.
23:39 GargantuaSauce ok then, why buy transistors when you can grow and dope your own silicon crystals
23:39 Sypheren So the voltage defines rpm speed, then how do you measure it?
23:39 GargantuaSauce who needs wire, dig copper ore out of your back yard and put it in your foundry
23:39 GuShh3 because you could possibly get high off the fumes?
23:40 GuShh3 GargantuaSauce: and you would learn heaps by doing it
23:40 GuShh3 Sypheren: back emf or sensors
23:40 Sypheren What wire would put out the emf?
23:40 GuShh3 for example, hall-effect sensors
23:40 GuShh3 the actual windings do
23:40 GuShh3 as the field collapses
23:40 Sypheren OH
23:41 Sypheren Okay
23:41 GuShh3 you use this feedback to know where the rotor is at
23:41 Sypheren How do you measure that
23:41 Sypheren ?
23:41 GuShh3 but do as GargantuaSauce says... I'm not going to be responsible for your failure.
23:41 Sypheren And in turn- regulate speed?
23:41 Sypheren Er..
23:41 GuShh3 Sypheren: depends, can be a clamp +adc or you can buffer with an opamp and use a regular gpio
23:41 Sypheren Many of those words I need to understand
23:42 GuShh3 depends because of what may be available for you and what your goals are.
23:42 GuShh3 see, that's why it's complicated.
23:42 GuShh3 adc is analog to digital converter
23:42 Sypheren Okay
23:42 Sypheren I understand that part
23:42 GuShh3 by clamping I mean a circuit that keeps voltages in check, up to a certain limit.
23:42 Sypheren Its mostly acronyms that ge tme
23:42 GuShh3 opamp = operational amplifier
23:42 GuShh3 seriously, hear GargantuaSauce out
23:43 GuShh3 I'm just going to make you lose your hair
23:43 GargantuaSauce you are increasing the project's scope by two orders of magnitude
23:43 GuShh3 I told him I don't use modules, I like to learn how stuff works
23:44 GuShh3 Some people are builders, others are designers.
23:44 Sypheren So the loop between "getting rotary speed -> increasing or decreasing speed -> getting rotary speed..."
23:44 GargantuaSauce if you wish to bake a quadrotor from scratch, you must first invent the universe
23:44 GuShh3 you literal prick
23:44 GuShh3 Sypheren: it's a closed loop system, per motor.
23:44 Sypheren Argh
23:44 GuShh3 you can count edges from the back emf of each wire and figure out the RPMs that way
23:45 GuShh3 or measure your equivalent output voltage and assume a certain RPM based on the KV of your motors
23:45 GuShh3 cool huh? the latter doesn't really work very well...
23:45 Sypheren I would assume that assuming rpms wouldnt work well
23:45 Sypheren hmm..
23:45 GuShh3 well, it's an estimate.
23:45 Sypheren Indeed it is
23:46 GuShh3 you can't do that to know where the rotor is at though, you have to use sensors or the emf
23:46 Sypheren but with four rotors on estimates, it would fly off in random directions XD
23:46 GuShh3 I'm not positive you need to care about the specific RPM
23:46 GuShh3 as GargantuaSauce says the control loop is the tricky bit
23:46 Sypheren Well, I thought that you would need to know specific RPM to be able to completely controll all four rotors
23:47 GuShh3 you already know the threshold or position of each "throttle", based on your sensory input you can adjust each.
23:47 GuShh3 how you go about integrating all that is up to you, I'm not going to talk about that, I bet I'll make even more enemies if I do.
23:47 Sypheren Argh
23:48 GuShh3 Sypheren: it's not simple at all
23:48 Sypheren I see htat
23:48 Sypheren that*
23:48 Sypheren And I feel I've made you too frustrated for your' own well being
23:49 GuShh3 That's only because GargantuaSauce doesn't like it when I go too low level
23:49 RifRaf Sypheren you are stuck on a concept but do not need to be
23:50 GargantuaSauce well i mean really you're taking it to an absurd level
23:50 Sypheren Darn
23:50 GargantuaSauce i am all for the approach of understanding the fundaments of each component of a system
23:50 Sypheren As am I
23:50 RifRaf the feedback will control the rpm for you when you can use it correctly
23:50 GargantuaSauce but building your own motor controllers as a beginner is just ridiculous
23:50 GuShh3 GargantuaSauce: it's not absurd for a lot of people
23:51 GuShh3 you have different interests
23:51 Sypheren Feedback being emf?
23:51 GuShh3 "I want to have these motors spinning tomorrow and I don't want to learn how to do it myself"
23:52 GuShh3 whereas I'd be cheating myself if I were to buy modules to do it for me, unless I wanted to cut time and costs for a reason, but only after I've prototyped it myself.
23:52 RifRaf i'd think more velocity angles and distance to ground
23:52 GuShh3 because it's part of engineering to understand how and why it works and in the process you can enhance it or find better ways to do it.
23:53 Sypheren So if it sees 'Hey, I'm not balanced, I should probably increase rotors 3 and 4 by X volts to keep me from spinning out of control!;
23:53 RifRaf you'd want a PID loop
23:54 Sypheren PID Loop?
23:54 GuShh3 The actual way in which you interpret the relative values of an accelerometer may well be in it's own a big challenge.
23:54 RifRaf and for that you need to start with studying what PID is
23:54 GuShh3 And you'd be inclined to GargantuaSauce your way out of it by looking up someone's code or library
23:54 GuShh3 again, might as well go buy a commercial unit for all I care, dammit.
23:55 RifRaf well i dunno, its just what i think, but getting anebriated here
23:55 GargantuaSauce yeah, go ahead and fight that strawman
23:55 Shh3 wonders if GargantuaSauce needs some of RifRaf's b
23:56 GuShh3 I'd be ranting about PIDs right now if I were drunk...
23:56 GargantuaSauce you are talking about doing things more optimally as part of the engineering process
23:56 GargantuaSauce the absolute #1 concern in an aircraft is mass
23:56 RifRaf lol, ima go mow the lawn or something
23:56 GuShh3 You think I can't design nor assemble smt?
23:57 GuShh3 And how is a prototype a final product
23:57 GargantuaSauce yeah this is a waste of time, back to my coding
23:57 GuShh3 For all you know the prototype ESC will never make it to the quadcopter
23:57 GuShh3 Yeah go write some more pasta boy
23:57 theBear what are you going on about ? building motor controllers is easy ! i've never even considered buying one
23:57 GuShh3 theBear: it's just some people hate me wherever I go whatever I say, what can ya do...
23:58 Sypheren theBear, thank god your here!
23:58 Shh3 hugs the
23:58 theBear heh, who are you ?
23:58 Sypheren I'm new
23:58 GuShh3 he's an arduinian, I'm the gushhlet
23:58 theBear aahh, thank god i'm here then
23:58 GuShh3 we were coexisting until GargantuaSauce brought his elitism home
23:59 GargantuaSauce you are suggesting that someone you call an arduinian build a motor controller from scratch to build a quadcopter
23:59 GargantuaSauce and you call ME the elitist
23:59 GuShh3 shit, you might want to shed off that heatshrink sleeving if you are concerned about weight.
23:59 theBear heh yeah, he's having a day
23:59 GuShh3 GargantuaSauce: because I think they can be more than arduinians
23:59 GuShh3 PAINT ME NAIVE
23:59 Shh3 pokes Sypheren's b
23:59 eBear paints GuShh3 in a dark mauve ("nai
23:59 GuShh3 There ought to be some potential there