#robotics Logs

Mar 30 2013

#robotics Calendar


00:15 Jak_o_Shadows Been meaning to watch that video.
00:16 Jak_o_Shadows also, rue, I see a deceptive lack of DANGER in that picture
00:31 RifRaf i think i might be asking too mmuch from these servos
00:32 RifRaf the bot weighs 1.2kg, will try a lighter frame, also have a frame designed for some much stronger 200rpm gear motors
00:43 Triffid_Hunter RifRaf: MG996R
00:44 Triffid_Hunter RifRaf: usually $10-12/ea at hobbyking/aliexpress/ebay/etc, 10kg.cm torque
00:47 RifRaf Triffid_Hunter, thats what i am using
00:47 RifRaf blew the fets out on one this morning
00:49 Triffid_Hunter hm ok
00:49 Triffid_Hunter yeah will need something fancy then
00:50 RifRaf dc geared motors, got a nice set of 2A ones, 200rpm
00:50 RifRaf hrm they have no encoder though
00:51 RifRaf and will try even bigger wheels maybe
00:52 RifRaf or lighten frame a little
00:52 RifRaf am sure i can get this thing to balance
00:52 RifRaf best is about 5 seconds now
00:53 MrCurious Jak_o_Shadows: i was able to get the notebook + simplecv + many optional installs going on a chromebook today
00:54 RifRaf just started using max resolution on this ultrasonic sensor, is need to redo pid values again'
01:57 MrCurious which ultrasound sensor?
01:57 RifRaf hc-sr04
01:59 gwty Hello
02:00 RifRaf hi gwty
02:00 gwty is it safe to power motors directly from the arduino?
02:01 RifRaf no
02:02 dunz0r gwty: You want to look up H-bridges for powering motors
02:03 Triffid_Hunter gwty: get L293D for small motors
02:03 gwty i have l298p
02:03 Triffid_Hunter gwty: for larger stuff, go check out sparkfun, pololu, adafruit motor driver range
02:04 gwty my motor is a 12V 56mA one
02:04 Triffid_Hunter gwty: L298 eh.. that's a larger version of L293 from memory or something
02:04 Triffid_Hunter gwty: 56mA? must be tiny.. pager vibration motor or something?
02:05 dunz0r Triffid_Hunter: It's another H-bridge chip
02:05 gwty Triffid_Hunter:its a geared DC motor
02:06 Triffid_Hunter gwty: http://www.nhpa40.org/b2b/pics/6V_Micro_DC_Motor.jpg <-- even these motors which are extremely common can take 300-500mA
02:06 MrCurious RifRaf: nice. i made a array of 10 of them
02:07 gwty The problem is, I have only 4 output ports from the L298p. I don't know how to give power externally
02:07 MrCurious RifRaf: i was planning on using a Arduino ping lib that supports more than one of them
02:07 RifRaf MrCurious, with the newping lib or you made your own?
02:07 MrCurious newping
02:07 Triffid_Hunter gwty: datasheet will tell you
02:07 RifRaf yes am using it, is very stable compared to a few others
02:07 MrCurious i think it lets you use 1 pin per ping
02:07 RifRaf i use 2 for these currently
02:08 MrCurious i think i got 10 off ebay for 20 ish
02:08 RifRaf yep i got 4 for 10
02:08 RifRaf or 5 maybe
02:10 gwty Triffid_Hunter:ok. Also, I connected arduino board with 12V 500mA supply. I get high-pitched hissing sound from the L298p at times. Is it normal?
02:10 Triffid_Hunter gwty: only if you're PWMing it and constantly changing the duty cycle
02:11 RifRaf MrCurious, do you know of any versions of newping that will work outside of adruino ide?
02:11 RifRaf was starting to convert it but i really don't know enough
02:12 MrCurious havent looked
02:14 MrCurious i am planning on dedicating a iudino nano to the task and just using arduino software
02:14 gwty Triffid_Hunter:ok. Thanks.is it dangerous or something?
02:15 Triffid_Hunter gwty: for good motor drivers, no. for L298, not sure.. check datasheet as it's pretty old and may not like to run fast
02:18 gwty Triffid_Hunter:ok. I also got sparks near the Arduino power input once. I'm trying to find what I did wrong.
02:19 Triffid_Hunter yikes that's not good
02:20 RifRaf so close to balancing now
02:25 gwty Triffid_Hunter: can it be a fault with the power source?(i used a very bad AC to DC Adapter)
02:27 Triffid_Hunter gwty: sparks mean medium to high current and poor contact
02:27 Triffid_Hunter neither of which you should have with your arduino
02:36 gwty Triffid_Hunter: how does one control the speed of the motor?( I thought of changing the duty cycle continuously)
02:40 MrCurious finally OCR ins simplecv working
02:44 rue_house Tom_itx, thats your pwm queue
03:03 Triffid_Hunter gwty: yep change the duty cycle
03:13 Jak_o_Shadows Framerate can suffer I think
03:13 Jak_o_Shadows My netbook, with an amd 450, is reasonably slow
03:14 Jak_o_Shadows Course, my algorithm for filling up from the bottom is horrid
03:14 Jak_o_Shadows Plus, I have the most terrible noise problem.
04:19 rue_bed prolly from the cmos sensor
04:37 Jak_o_Shadows Perhaps. I am doing a bit of filtering beforehand, blurring, edge detect, etc
12:41 rue_house can a usb keybaord be used on a tablet?
12:42 GargantuaSauce if the tablet is a usb host
12:42 dunz0r rue_house: I think it depends on the tablet
12:43 dunz0r rue_house: My girlfriends Samsung Galaxy Tab can use keyboards.
12:44 rue_house its a chinese knockoff android tablet
12:44 rue_house I CANT CODE WITH ALL THIS DAMNED DRIPPING, SNEEZING AND COUGHING
12:44 dunz0r rue_house: Hmm... I think the best way to find out is try it :)
12:44 R0b0t1 TIAS
12:45 R0b0t1 Most tablets do have USB host, though
12:45 rue_house its got a usb device thingle
12:45 R0b0t1 A lot of phones have OTG as well, but it's not enabled by default because who expects their phone to be a host?
12:46 dunz0r Hmm... I need to try it on that tablet with a "proper" keyboard.
12:46 dunz0r I hope I have a female to female USB connector at home :)
12:46 rue_house that said, i cant find a descent free code editor app
12:46 dunz0r The current keyboard for it is integrated in a docking station.
12:46 dunz0r rue_house: Vim?:)
12:46 rue_house just an office word package
12:47 rue_house the terminal app I found sucks
12:47 rue_house no arrow keys
12:47 dunz0r https://play.google.com/store/apps/details?id=net.momodalo.app.vimtouch&hl=en Maybe
12:47 rue_house which vim gets around fine, but its annoying as hell
12:48 R0b0t1 >coding on a tablet
12:48 rue_house in the sun, on the lawn
12:48 rue_house on a nice sunny day
12:48 dunz0r rue_house: Can you get it to upload to an AVR?:)
12:49 rue_house ooo think there is a avrdude app for android?
12:49 rue_house use a usb programmer
12:49 dunz0r I shouldn't be impossible... you might have to run it in a chroot or something though.
12:49 rue_house (I dont think my tablet has bluetooth)
12:49 dunz0r But I'm just guessing atm
12:49 rue_house how would one compile tho..
12:50 dunz0r There is a build of AVR-gcc and avrdude for andriod it seems http://code.google.com/p/andavr/
12:50 rue_house oh well there ya go
12:50 nz0r is totally bookmarking that for later
12:51 rue_house I need to set up a wifi access point so I can load these damn things direct
12:51 dunz0r Now I want to get a cheapo tablet and build a "laptop" out of it :D
12:51 rue_house $66 china
12:51 rue_house mine is fine
12:51 rue_house (screen is soft plastic tho)
12:53 Tom_itx speaking of...
12:53 Tom_itx http://www.electronicproducts.com/Packaging_and_Hardware/Device_Packaging/Why_sapphire_displays_could_replace_glass_in_future_generation_of_mobile_devices.aspx
12:53 dunz0r rue_house: Where'd you buy it from?
12:54 rue_house ebay
12:54 rue_house cant remember the seller
12:55 dunz0r Ah. Ebay <3 :)
12:57 rue_house onfine2008
12:57 rue_house apparentl
12:57 rue_house y
12:57 rue_house $66 8G tablet
12:57 rue_house its not top of the line, but what I was looking for as a robot remote
13:00 dunz0r Damn. I would love some wheelchair-motors. Too bad shipping is about the same as the price of motors :|
13:01 rue_house if you go to a disability shop you can prolyl get them used for almost free
13:01 rue_house sales shops do the repairs
13:01 rue_house lots of scooters have problems with not-the-motor that lead to scrapping the whole scooter cause of cost
13:02 rue_house and as the costs are usually subsidized, they are also usually insanely inflated
13:03 dunz0r Ah. I just need to find a "disability shop" then... I wonder where those are hiding.
13:04 dunz0r Disabilities 'r Us ?:)
13:04 rue_house they usually call themselfs something like 'independence, ability, freedom, access"
13:05 TELunus|2 http://www.disabilities-r-us.com/
13:05 rue_house trying to simulate a castor wheel
13:06 rue_house TELunus|2, did you catch last nights question?
13:06 TELunus|2 Hmm?
13:06 rue_house for a vector, what letters are usually used for amplitude and direction
13:06 rue_house I assume direction is theta
13:08 TELunus|2 Magnitude is r
13:09 TELunus|2 I'm assuming we're using 2D vectors, since technically polar is a 2D co-ordinate system. There are multiple ways of extending polar to 3D.
13:11 TELunus|2 Despite disibilities r us actually existing, they aren't a disibility shop.
13:13 rue_house yea
13:13 rue_house ok R and what for magnitude?
13:14 rue_house haha
13:14 rue_house sorry, head cold
13:14 TELunus|2 Theta, as you had thought.
13:14 rue_house ok so r and theta
13:15 TELunus|2 Ya.
13:15 rue_house trying to simulate a castor
13:15 rue_house but the sample rate is too high on the window loop and I only get +-1 on mouse xy movements, so I only get a few angles
13:16 rue_house I'm gonna go lie on the shop roof and think about this
14:48 Rif dunz0r, you can also get little android computers for about $50, and plug in usb keyboard and mouse, have alot of avr stuff on mine plus its me webserver
15:01 Rif rue_house, have you tryed droid edit, ok editor
15:13 Rif root
15:24 rue_house I didn't give it wifi acces, I was limited to packages I couldput on sd card
15:26 rue_house "batteries are at 40% what they would be if I didn't have this big led sign attached to me reporting what the battery levels are at"
15:33 rue_house $50 is a lot for something I can make tonnes from the free stuff I have
15:37 rue_shop2 tobbor, STAY!
15:37 rue_shop2 STAY!
15:37 rue_shop2 if he dosn't, I cant blame the 1G switch
15:48 rue_house "guy sees an interview by IKEA for a carpenter, goes, for interview, sent to interview room and asked to wait. Guy enters interview room, empty except for 3 boxes in the middle of the floor. A while later the interviewer walks into the room, sits down on the chair opposite side of the table from him, says "Your hired" "
16:05 Rif just ripped a leg of the 7805, silly falling over bots
18:59 rue_house Rif, a 3 pin servo connector will fit a 78xx regulator, to facilitate remote mounting to a heatsink and strain releif
19:05 Rif is ok, i mounted it flat this time
19:05 Rif and mounted sensor between wheels so it does not get knocked off all the time
19:05 Rif and is a better place for it
19:09 Rif these breadwires are great, not one has popped out with impacts yet
19:09 Rif breadboard wires
19:24 rue_house I bought some on my christmas splurge
19:25 rue_house the std 24 gua tel wire is a bit small , nice to have a 22 or so
19:25 Rif got several packets now, but do have a few projects going
19:27 Rif rue_house, btw, my balancing bot uses 3.8k on a mega168, 5k with lcd enabled for debugging
19:27 Rif thats not really bloated
19:28 Rif was 3k without the floating point values
19:28 Rif go arduino :)
19:28 rue_house sounds fine
19:29 Rif using a very old boarduino i dug up, handy for breadboarding
19:40 Rif experience with kalman filters anyone?
19:42 Rif is this feasable? use 3 pots to be able to adjust P I and D dynamically while bot running, to fine tune it
19:43 Rif i reckon that could be awesome way to perfect it
19:43 Rif i want values between 1 and 10, so thats would make licely to adc inputs
19:43 Rif map8
19:44 Rif oh yeah
19:44 f looks for free adc in
19:47 Rif i need a bigger desk, this has the keyboard on top of things, hence my typos
19:48 Rif its not the beer
21:27 Tom_L http://robotiq.com/en/products/industrial-robot-hand
21:28 Rif has been around for a while
21:29 Rif have tryed to emulate it but there is still some cleverness i cannot work out
21:30 Rif tom what dod your balancing bot use for sensors?
21:30 Rif am gonna use the uSonic for obstacle avoidance next and try use a imu for better balancing
21:31 Tom_L sonar, ir and the pot for balance
21:31 Rif pot for balance?
21:31 Tom_L because i didn't buy a gyro
21:32 Rif did it work well?
21:32 Tom_L yeah
21:32 Rif nice, so does mine yay
21:32 Tom_L the motors were a bit weak
21:32 Rif but i wanna control it more , i reckon these pots will find a sweet point
21:32 Rif but yeah it changes as the batteries get flatter
21:33 Rif but some of the best balancing has been with near flat batteries
21:33 Rif i guess when i tweak it right and then put in new batts and is all fucked up again
21:33 Rif so with the pots can hopefully get it right fatser
21:34 Rif faster as well
21:34 Tom_L sounds like you're getting closer
21:34 Rif but an imu will fit this, just had to do it basic to learn a bit
21:34 Rif fix
21:34 Tom_L PID isn't so easy to get right
21:34 Rif nope its not plug and play for sure
21:35 Rif but with floats alot better, i kept going past the good point before
21:35 Tom_L before you go past it, add I
21:36 Tom_L I adds in the 'remainder' of the calculations
21:36 Rif yeah, have been doing the P then I, and adjusting P a bit, then doing D
21:36 Rif and all sorts of other ways
21:37 Tom_L start with P
21:37 Tom_L get it to oscillate then back it off
21:37 Tom_L add in D then
21:37 Tom_L get it close
21:37 Rif been good learning, using excel as well to try out the settings that work and see what the motors are getting
21:37 Tom_L THEN add I
21:37 Rif yes i hate the occilations
21:37 Tom_L D will cause it to snap to setpoint quicker than with just P
21:37 Tom_L without overshoot
21:38 Rif ok then, have not added I last for a while will try again
21:38 Rif but am using the pots next
21:38 Tom_L I is the 'fine tune' of it
21:38 Rif so can try lots of stuff and see it on lcd
21:38 Tom_L some systems don't even use I
21:38 Tom_L just PD
21:39 Rif oh, well without a decent I the servos going correct fast enough
21:39 Rif don't*
21:39 Tom_L mine didn't have the torque to overcome big erors
21:39 Tom_L errors*
21:39 Rif the D balances out the overshoot of the I in this app anyway
21:41 Tom_L I shouldn't cause any overshoot unless you have the constant set too large
21:41 Rif with this kind of stability from a sr04 sensor should be alot easier with a gyro and accel
21:41 Rif well I = 3 and I = 4 was a huge deal till today
21:42 Rif but I = 3.75 or so is making alot of difference
21:42 Rif well Ki
22:39 Rif got pots attached for Ki Kd and Kp now as well as balance point http://imagebin.org/252299
22:40 Tom_itx you're using separate sensors for each term?
22:41 Rif nope. just different vars
22:41 Rif so i can start with them all at 0 and work up
22:41 Rif is way cool
22:42 Rif so yeah i guess different sensors
22:42 Rif but a pot for each
22:42 Rif with value displayed on lcd so i can note good ones
22:42 Tom_itx i guess i see what you mean
22:44 Rif values were good around Kp=2 Li=4 and Kd=5 but never correct, no i can vary from 0 to 10.24 for each value
22:44 Rif and is great to see what differing things do
22:44 Rif this is how i learn
22:46 Tom_itx Kp=3 was too much?
22:46 Tom_itx with the others zero
22:52 Rif well not quite enough
22:53 Rif in the morning will be able to do some proper testing
22:53 Rif now that i can see results in real time
22:53 Tom_itx get P as high as you can without being too much first
22:54 Tom_itx then back it off slightly and add D
22:54 Rif just recharging batteries again, uses alot less battery too now that i can start in 000
22:54 Rif ok
22:54 Rif i was adding I after P was at that point
22:54 Tom_itx add I last
22:54 Rif yep
22:55 Rif maybe thats where i kept goin wrong
23:11 Triffid_Hunter Rif: using arduino pid library?
23:12 Rif Triffid_Hunter, nope just some other equation from an example, will show you
23:12 Rif is arduino code though, cause i needed the newping lib
23:13 Rif Triffid_Hunter, scroll down to the PID function http://pastebin.com/YKgfpJpC
23:14 Rif the lcd functions are just there for current debugging but enabled at moment
23:14 Rif the slow the loop down a bit
23:16 Rif in //Ping PID constants were the values i had that were working ok, but now changed to pots, to experiemtn
23:17 Triffid_Hunter Rif: you should take D from sensed value rather than error
23:17 Triffid_Hunter Rif: may also want to cap the integrator to prevent it winding up too far
23:19 Rif heh i wish i had someone like you here to test it Triffid_Hunter , it would be right in a few minutes :)
23:20 Rif but i have to do it the hard way, but at least knw alot more than i did 2 days ago, and in a few weeks what you just said will make sence, ot maybe even when i sober up
23:20 Triffid_Hunter Rif: http://brettbeauregard.com/blog/2011/04/improving-the-beginners-pid-introduction/ is a great read
23:20 Rif ok will open
23:20 Triffid_Hunter sobriety is overrated