#robotics Logs
Mar 28 2013
#robotics Calendar
03:21 rue_mohr RifRaf, what ARE you making now?
03:37 Jak_o_Shadows1 Any tips on colouring copper multi-strand wire? I have 8 fets, which is 24 wires, so I want a little organization
03:38 rue_mohr black ground
03:38 rue_mohr red 5V
03:38 rue_mohr orange 12V
03:38 rue_mohr er, sorry, orange is 3.3V
03:38 rue_mohr yellow is 12V
03:38 rue_mohr green is ground
03:44 RifRaf rue_mohr, balancing robot
03:44 RifRaf basic one to start and then a better one with accel and stuff
03:45 RifRaf starting with servos and then wanna use the faulhaber gear motors
03:46 Jak_o_Shadows1 er, I was more talking about colouring existing wire.
03:47 RifRaf paint?
03:51 Skwint servo controlled ball and socket mounted prism which carefully positions itself to refract the right colour onto the wire
03:51 Skwint then you could change the colour programatically
03:52 Jak_o_Shadows1 oooh, extensibility
03:53 Jak_o_Shadows1 well, yeah, paint. Would acrylic paint work? Or house paint be better?
03:53 RifRaf enamel
03:54 rue_mohr use all white wires, and use the resistor colour code to number them all
03:54 RifRaf if you already have white then you can use a texta
03:56 RifRaf you can also get heatshrink in many colours
03:56 Skwint you could dip them in coloured candle wax, then if the wax melts somethings wrong and you should turn it off
03:56 RifRaf heh
03:58 Jak_o_Shadows1 error notification, nice
07:13 ShH bears with the
09:11 aras hello , does anybody know about Raspberry Pi ?
09:12 theBear it's crunchy, but delicious
09:14 aras :) if you know , former version of Raspberry Pi is based on Atmega644 , and schematics and pcb layouts are available , but i cannot find them , can any boady help me ?
09:15 aras element14.com and http://www.raspberrypi.org/ support this project .
09:16 theBear if there are schematics available i think they'd be somewhere at the raspberrypi.org site
09:18 aras yes , schematics are available , see http://en.wikipedia.org/wiki/Raspberry_Pi , in the History section .
09:18 joga aras, you mean this page? http://www.raspberrypi.org/archives/264
09:19 aras joga , yes excatly !
09:19 aras joga , yes exactly !
09:19 joga googled for raspberry pi atmega644 :)
09:20 aras thank you , but , could you find schematics ?
09:20 aras oh ,, sorry
09:20 aras i found them
09:20 aras it is available in the mentioned page
09:21 aras Thank you Joga
09:21 aras http://www.raspberrypi.org/ABCMicro.zip
09:21 joga ye
10:49 ckkitten idly perches on top of theBear's h
14:02 Tom_L http://www.electronicproducts.com/Digital_ICs/Standard_and_Programmable_Logic/Digital_circuit_design_now_available_for_the_masses.aspx
15:48 GuShH mojo....
15:48 GuShH jeez.
15:55 Rif GuShH, how much experience do you have with arduino ?
15:56 GuShH Rif: why would you ask me that!
15:56 Rif because i want to know if you have experience or are just talking out your ass when you say how bad they are
15:57 Tom_itx the boards are fine
15:57 GuShH Rif: http://www.cafepress.es/dd/55803036
15:58 Rif Tom_itx, you would not have experience using them, am not talking about the boards
15:58 GuShH Rif: their code reminds me of everything that's wrong in this world
15:58 GuShH and the community behind it backs up the feeling
15:58 Tom_itx Rif, i have an arduino 2560 sir
15:58 GuShH if not, hang around #arduino
15:58 Rif i am sure you have some tom, what have you made with it though
15:59 Tom_itx was working on a reprap
15:59 GuShH Rif: you can hate a car after test driving it, you don't have to own it to hate it.
15:59 Tom_itx wired up the lcd to it along with a menu encoder
15:59 Rif Tom_itx, using the arduino ide?
15:59 Tom_itx you don't even have to test drive some to know they're fugly
16:00 Tom_itx yes
16:00 GuShH I also hate everything around Apple.
16:00 Tom_itx 1.0.1 and .23
16:00 Tom_itx both
16:00 GuShH Tom_itx: well, the physical aspect aside, you can hate the way it drives
16:00 GuShH or behaves under certain circumstances
16:00 Rif Tom_itx, you wrote the code or just fed it am example?
16:00 Tom_itx i modded some code
16:00 Tom_itx why the 20 questions?
16:01 Rif because i am struggling a bit, but learning
16:01 Tom_itx Triffid_Hunter could probably help you as much as anybody
16:02 Rif i have ultrasonic sensor woking rather accuratly and pid loop working, the servos are just not working
16:02 GuShH Ask in #arduino, make sure to mention LEDs and resistors while you're at it
16:02 Tom_itx right now i'm working on an asm file for somebody
16:04 Rif GuShH, not ready to ask yet, am not using a servo library, so is a timing issue, but i cannot measure any duty cycle on the servo output pin
16:05 GuShH it's all high level code, if it doesn't work there's some conflict within dependencies
16:05 Rif doing some testing to get expected duty cycle with servo tester
16:05 Rif no scope
16:05 GuShH at those frequencies you can use your soundcard
16:05 Rif am not using any dependancies for the servos
16:05 Rif is just c
16:05 GuShH so why did you mention arduino
16:05 GuShH it's mostly software.
16:06 Rif yeah have a sound card scope, but the duty cycle on this multimeter works as well in the past
16:06 GuShH if you are not using their bullshit, it's just an avr board
16:06 Rif i am using it for the lcd and sonic sensor though
16:06 Rif am in the ide working
16:06 Rif and using it to upload
16:06 GuShH use it for the servos too, then.
16:06 Rif well its this code you see
16:07 ShH waits for xcode to down
16:07 GuShH god damn you apple I hate you more every day
16:08 Rif i am also surprised that the code is not very bloaded at all, am using like 4k
16:08 Rif bloated*
16:08 ShH sh
16:10 Rif i just don't think you should be so anti, thinking people use it too, sure some people ask dumb questions, but they are generally at least having a go
16:11 GargantuaSauce__ the arduino API is an instrument of delusion
16:13 GargantuaSauce__ along with the culture of the userbase it promotes an approach of copypasted code and hammering systems together without understanding their components
16:14 Tom_itx it's the new policy
16:14 Tom_itx if something breaks though they usually end up in #avr
16:14 GargantuaSauce__ http://vimeo.com/35347197 i like this example
16:15 GargantuaSauce__ floated around the maker blogs as a cool new innovation, but look at the clip of him scrolling through the code
16:15 GargantuaSauce__ and you can see the same function being called hundreds of times in a row
16:16 GargantuaSauce__ that is what i would refer to as a dead-end design
16:16 GargantuaSauce__ and it's the sort of approach that is nurtured by the toolset
16:17 jumijoze facebook machine engineering?
16:19 Rif at least he made something, and i think its ok, i made pov stuff like that with leds many years back and it was dead end as well, but was something cool at the time
16:19 Rif self powered
16:20 Rif well powered by a human spinning the device which had a stepper motor to generate power, still have it somewhere
16:30 Rif damn my multimeter lead was plugged in the wrong hole, no wonder i was getting 0% duty cycle :/
17:25 GuShH Rif: you suuuuuuck!
17:52 Rif GuShH, you can hate, but i have 2 servos going backwards and forwards depending on the distance sensor
17:57 Rif i need help to understand how to make the pid loop better though
17:58 Rif but i think it time to assemble this into a robot then keep testing now that basic functions work
18:36 GuShH Rif: and?
18:38 Rif and what?
18:38 GuShH I think it took you longer using the arduino than it would've taken anyone without it
18:39 ShH facep
18:40 Rif while your down there lick my sweaty balls
18:43 GuShH That's what flyback is for
18:56 Rif http://imagebin.org/252027
18:56 Rif how high and far out the front would the ultrasonic sensor be best placed?
18:58 ace4016 spec sheets will tell you for the sonar sensor you're using
18:58 KimLaroux that ^
18:59 ace4016 some have a sloppy cone so you have to put them up higher or so
19:00 Rif it works great from about 2cm to 100cm , is pretty stable to a few mm
19:01 Rif ok, will try about 1/3 way up and out about 50mm
19:03 KimLaroux https://sites.google.com/site/birdbuggy109/
19:03 KimLaroux has to be one the weirdest bot I've seen
19:03 KimLaroux just so ironic
19:04 Rif pretty cool
19:08 Rif these $2 hc-sr04 sensors were working real bad till the other day, but using this arduino newping lib they are so muct more stable and accurate
19:11 Rif was impressed, amazing what a bit of refined code can do, thats why i thought there may be some merit to arduino
19:37 Rif this thing so has the potential to balance :)
19:39 rue_house library switcher
19:39 rue_house :)
19:41 Tom_itx i wonder if it has pid stuff in it :)
19:41 Tom_itx for the balanceer
19:49 Rif hey you wanna be helpful or just mock me
19:49 Rif it has pid stuff, i just cleaned my code up a bit
19:49 Rif i'll post if you don't laugh, i need help to make it more stable when there is a little error
19:51 Rif http://pastebin.com/D08nq9JP
19:52 Rif am sure the simple pid loop will make sence to some of you, i am still learning
19:53 rue_house how big is it rif?
19:54 Rif the frame is 300x150mm , you see the pic?
19:54 rue_house no
19:54 Rif http://imagebin.org/252027
19:54 Rif sensor is on side you cannot see there
19:55 rue_house nice rif
19:55 Rif lcd is for debugging, is disabled in the code i pasted
19:55 Rif thanks
19:55 rue_house are you planning to peel it?
19:56 Rif huh?
19:56 rue_house is it opaque or tan?
19:56 rue_house the protector plastic, you gonna peel it off?
19:56 rue_house not yet?
19:56 Rif thats off, its white
19:57 e_house squ
19:57 Rif is composite aluminium offcut from work, prepainted
19:57 rue_house is that metal coated plastic?
19:57 rue_house ah
19:57 rue_house cool
19:57 Tom_itx ok tiny13 code looks ok now
19:58 Rif yeah, i can cut grooves and fold it to any shape on router
19:58 rue_house is there an accel in there?
19:58 Rif nope, will show ya other side, brb
19:59 rue_house ah, wondered where that wire went
19:59 Tom_itx i hope the servos are quick enough to recover for balance
19:59 Rif ultrasonic, but next will be accel, starting simple to learn
19:59 rue_house theBear, rif beat ya...
19:59 Tom_itx i had trouble with that on mine because the motors didn't have quite enough torque
20:00 Rif Tom_itx, i have many other faster motors, but yes they are sluggish, don't be negative
20:00 rue_house I need some large bar stock for making hubs
20:00 rue_house I should cast some
20:00 Tom_itx i'll just shut up then. was trying to help
20:00 Tom_itx i've done a balancer
20:01 rue_house yea, but you did yours before theBear wanted to start his
20:01 rue_house when did everyone get so insecure?
20:01 Tom_itx who the fuck knows
20:01 Rif Tom_itx, i know you have
20:02 Rif fenchurchs one wasn't it?
20:02 Tom_itx no
20:02 Rif n-bot?
20:02 rue_house no tom made one a long time ago before robotics, that uses a motorola controller and a potentiometer tail sensor
20:03 rue_house wich I thought was really cute
20:03 Rif so did i
20:03 Tom_itx i had plans to get the $800 mems sensor for it but decided it was a waste of money
20:03 Rif and always wanted to make one
20:03 Rif now am starting, this is version 1, the final will be foxy
20:03 Tom_itx so the pot on the back took the place of the gyro/accelerometer combination
20:04 rue_house Tom_itx, is it still togethor?
20:04 Tom_itx not so much
20:04 rue_house repurposed components?
20:05 Tom_itx some of em
20:05 Rif rue_house, http://imagebin.org/252031
20:05 rue_house hehe
20:05 rue_house nice cnc work :)
20:06 rue_house it looks just like a consumer grade tray!
20:06 Rif the holes were done just befoe on kitchen bench with drill press
20:06 rue_house Rif, whats the resolution of the sensor?
20:06 Rif about 1.x mm
20:06 rue_house hmm
20:07 rue_house is it balancing ok yet?
20:07 Rif is a nice library stays within about 5mm if not moved on table
20:07 Rif kinda
20:07 Rif longest was about 3 seconds
20:07 rue_house k
20:07 rue_house spaz out, or not keep up?
20:07 Rif the servos spaz out
20:08 rue_house hmm
20:08 Rif they are fine when running
20:08 Rif but don't like lots of forwards backwards commands
20:08 rue_house hmm
20:09 Rif i'll keep changing a few variables and see if i can get it better
20:09 Rif i just made the error larger and it is more jumpy now
20:09 rue_house have you tried dialing down the gain to the pwm for the motors? keep the corrections smaller
20:09 Rif i will try lower
20:10 rue_house it would flip out if it started overreacting
20:10 rue_house Tom_itx, was yours pid?
20:10 Rif Drive = Drive / 5; // i had that about 20 before, will try 40 now
20:10 rue_house I wonder if that can be done with prop. only
20:10 Rif drive is the pid output
20:10 Rif so i am not changing P I or D yet
20:10 Rif cause not sure wat to touch yet
20:11 rue_house the pid parameters are hard to get right, to my experiance
20:11 rue_house there is a process for adjusting them
20:11 Rif yep, but is cool having a platform to test setting with :)
20:11 Rif i don't care if the servos explode, but they are handling it so far
20:11 rue_house it goes something like turing ID off, adjusting P till its just unstable, then dialing one up just to stable, then dialing the other
20:12 Rif hrm ok
20:16 Tom_itx make P oscillate, back it off and add D then add I for the overflow error
20:19 Rif so make Ki and Kd 1 for now? instead of Ki = 3 and Kd = 4 ?
20:20 Tom_itx no, you use the constants as a scale for your particular setup
20:20 Tom_itx i'm not sure how their lib is set up
20:22 Rif the pid code is not in a lib
20:22 Tom_L output = (p->Kp * Perror + p->Kd * (Perror - p->PrevErr) + p->Ki * p->Ierror)/p->Ko;
20:22 Tom_L p->PrevErr = Perror;
20:23 Tom_itx that's the main pid line
20:24 Tom_itx that's motorola c
20:26 Tom_itx the constants will vary depending on your encoder counts and your refesh rate etc
20:26 Tom_itx iirc i ran in a 20-30ms loop
20:27 Gargantuasauce for a control loop to have any chance of working consistently you need a constant timestep
20:27 Tom_itx i said 20-30 because i couldn't remember which it was
20:27 Tom_itx it was constant though
20:27 Gargantuasauce ie instead of a delay() in a loop you need something more robust that won't be affected by other operations taking varying amounts of time
20:28 Rif well am starting to get some better results just blindly changing settings
20:28 Rif Gargantuasauce, i know you hate that but its the only way i know still
20:28 Tom_itx use a timer interrupt for your rate
20:28 Gargantuasauce yes but they will likely be invalidated as soon as you add another sensor or whatever because the time will change
20:28 Rif not wasting a long weekend reading C manual
20:28 Tom_itx do the updates in the interrupt
20:29 Gargantuasauce it's not a question of me hating it, you'll be wasting your time chasing dragons
20:29 Tom_itx you can't tell him
20:30 Rif lol
20:31 rue_house http://www.ebay.ca/itm/1PCS-IC-TLC5940NT-TLC5940-LED-DRIVER-PWM-CONTROL-28-DIP-NEW-GOOD-QUALITY-/300882297312 I got 20 of these, enough pwm to be able to use it on both sides of H bridges and not care
20:31 Gargantuasauce but yeah you absolutely need to run the control loop in an interrupt triggered by a timer
20:31 rue_house 16 12 bit channels per chip
20:32 Rif Gargantuasauce, ok i will learn that in the next one, this time i just want to make a thing balance and will be happy
20:32 rue_house you input the pwm clock, so you can use them for whatever you want, there is a library for using them for hobby servos
20:32 Rif the sensor code uses timers and interupts i know
20:32 Rif it can do 15 sensors
20:33 Rif but i just want to get this one going
20:34 Rif rue_house, at the moment i am sending the servos the position in ms, with 1500 being stopped
20:34 rue_house yup
20:34 Rif so i add to 1500 the error
20:34 rue_house did put a pot into the servo to get the 0 right?
20:34 Rif yes have a pot on the breadboard to adjust it
20:34 rue_house cool
20:35 rue_house I'v seen people use fixed resistors and the zero ends up a bit out
20:35 Rif and have inbiult adjustable pots into the servos when i converted them yes
20:35 Rif can poke a screwdriver in to adjust, i like these conversions
20:35 Rif nope
20:35 Rif but the pot on breadboard is to adjust the balance position for the ultrasonic sensor
20:36 Rif and i calibrated with a servo tester i got on ebay
20:37 Rif it has a center centting, made servos stop on that, and they are stot on 1500ms in code now :)
20:37 Rif heh i am having good friday beers, can you tell
20:38 Rif so if i say 1500ms they are stopped
20:38 Tom_itx once they're set, put a dot of glue on them to keep them there
20:39 Rif could do, but they are pretty tight anyway
23:11 Jak_o_Shadows What do you think about this circuit, just for testing purposes. It's a mosfet h-bridge. At the moment, screw the uC control. http://imagebin.org/252053
23:14 KimLaroux what are the 100k across the mofets for?
23:15 Jak_o_Shadows Don't I have to have something there to drain the mosfets cap, so they turn off?
23:16 KimLaroux R2 and R3 do that, no?
23:16 Jak_o_Shadows To be honest, R2/R3 are only there because I know it's a bad idea to leave stuff floating.
23:17 KimLaroux never leave the gate of a FET floating
23:18 rue_house and always give a fet a flyback diode
23:18 Jak_o_Shadows yeah, hence R2/R3. In a different circuit rue showed me, there was a resistor between source and drain, so I put it in here.
23:19 KimLaroux that's interesting.
23:19 KimLaroux considering most fets already have an internal diode to drain this
23:19 Jak_o_Shadows This was a single fet. Otherwise, the fet stayed on when I removed the power from gate
23:19 Jak_o_Shadows that was tested in real life, that circuit.
23:22 Jak_o_Shadows Apart from that, is it safe enough to use?
23:40 rue_house http://ctms.engin.umich.edu/CTMS/index.php?example=Introduction§ion=ControlPID
23:56 Triffid_Hunter Jak_o_Shadows1: it'll never work. the high side mosfets won't turn on