#robotics Logs
Jan 25 2013
#robotics Calendar
17:56 RifRaf 2xdistance sensors, 4line lcd, 2x10A motors drivers that have voltage and current draw feedback i think
17:57 RifRaf should be able to make a small robot with those bits hopefully
18:02 RifRaf woah these motors are tuff with new driver, and lots of new data on lcd that needs formating now
18:32 Tom_itx Triffid_Hunter, how can i load a regular .hex file using the arduino environment?
18:35 RifRaf have not used it much yet, think i just used it with usbtiny programmer
18:51 RifRaf tom got bar graphs working now too on the lcd
18:51 RifRaf 20x4 isn't enough space , might have to hook up the 40x4, or try a graphic one
19:22 RifRaf any progress Tom_itx?
19:23 Tom_itx yeah i got the lcd working with the arduino 2560, now i'm trying to get my program working on it
19:29 Tom_itx i think i know what the problem was now
19:38 Tom_itx nope nothing
19:54 RifRaf got all the stuff hooked up here, values are still to be worked out for the adc inputs but all hardware doing something
19:54 RifRaf gonna hotglue all the joints will good
20:09 Tom_itx farking arduino pin mapping!!!
20:09 Tom_itx those dumbasses should be shot
20:11 Triffid_Hunter Tom_itx: yeah it's pretty wild
20:11 Tom_itx just trying to get some standard lcd code working on it
20:12 Tom_itx nothing major
20:12 Tom_itx i know the code is good, i just used it on another µC
20:12 RifRaf i wrote the whole lot on a bit of paper to make hooking stuff up to arduino things easier, since i am not using the arduino ide
20:12 RifRaf Tom_itx try webbotlibs, you will be impressed, and have it going pronto
20:13 Tom_itx nope not yet
20:13 Triffid_Hunter Tom_itx: https://github.com/triffid/Teacup_Firmware/blob/master/arduino_1280.h may help perhaps?
20:14 Tom_itx i was looking at the pin map
20:14 Tom_itx i went to the schematic
20:20 Tom_itx ok i'm gonna wire the new lcd on the working controller
20:20 Tom_itx see if that works
20:20 RifRaf good idea
20:21 Tom_itx gotta find some more jumpers first
20:21 RifRaf am so happy with todays project, will fix the code a little then take a picture
20:58 RifRaf need to learn how to add a delay while keeping rest of program going
21:13 Triffid_Hunter RifRaf: request a flag from timer interrupt, run main loop until the flag asserts then continue doing your thing
21:14 Tom_itx mmm this is buggin me
21:15 Tom_itx pretty sure the pinout is ok now
21:15 Tom_itx lcd works with marlin firmware
21:15 Tom_itx i load the test lcd hex, change the bootloader fuse so it will run at 0x0000 and nothing happens
21:18 Tom_itx the arduino 2560 runs at 16mhz right?
21:19 RifRaf depends on the xtal but sounds standard
21:19 Tom_itx well the schematic says it is
21:20 RifRaf Triffid_Hunter heh, ok, :/ , could i maybe show you what i have at the moment, the problem is the ultrasonic sensors mess up if its polled to often, so would like to slow down to 500ms or so between checking them
21:21 RifRaf at the moment have 200ms delay after each one but it makes the motors jump a little
21:22 RifRaf here is current project http://www.youtube.com/watch?v=wf4-AMQWl6g
21:24 RifRaf current code for that http://pastebin.com/Y8C9va3m
21:27 RifRaf Tom_itx wats your board called?
21:45 Tom_itx i've got an arduino 2560
21:48 RifRaf are you trying 4bit mode or 8bit?
21:49 Tom_itx 4
21:49 Tom_itx i know this code works
21:50 RifRaf most code wants you to use the high bits on 1 port, do like D4 to PB4, D5 to pb5 and for the other two, then use another port for RS RW and E , have you got anything on the lcd?
21:51 Tom_itx nope
21:51 RifRaf not even black squares?
21:51 Tom_itx it clears the dark squares but that's it
21:51 Triffid_Hunter Tom_itx: arduino has a bootloader in the first couple of k
21:51 Tom_itx Triffid_Hunter i think i erased it
21:51 Tom_itx and reset the boot fuse
21:51 Tom_itx so it should be a normal avr
21:51 Triffid_Hunter Tom_itx: ah, no bootloader?
21:51 RifRaf Triffid_Hunter wat does it do? this nano arduino is supposed to have one as well
21:52 Tom_itx i kept it
21:52 Tom_itx i can reload it just fine
21:52 Tom_itx i've done it a few times
21:52 Triffid_Hunter fwiw the bootloader is super helpful
21:52 Tom_itx but how to upload a hex with the bootloader in place
21:52 Triffid_Hunter RifRaf: the bootloader allows you to load new programs over uart instead of SPI
21:52 Tom_itx the ardweenie environment won't allow you to load a hex file
21:53 Triffid_Hunter Tom_itx: flash bootloader, use bootloader to load hex. your linker script should have origin set appropriately
21:53 Tom_itx i've been uploading with the isp
21:53 RifRaf ah ok, it recogised a new serial port when i plugged a usb cabled
21:53 Tom_itx Triffid_Hunter, avrdude doesn't work on this pc
21:53 RifRaf and been using it for rx/tx testing, but have not used the bootloader
21:53 Tom_itx i've been using studio to upload
21:53 RifRaf thats odd tom
21:54 Tom_itx no
21:54 Tom_itx the libusb driver borks jungo
21:54 Triffid_Hunter Tom_itx: well, studio uses avrdude so it must work somehow.. may just need a different incantation
21:54 Tom_itx so right now jungo is working
21:54 RifRaf oh
21:54 Triffid_Hunter Tom_itx: hm, studio or arduino IDE? I know the ide uses avrdude
21:54 Tom_itx Triffid_Hunter, i've never used avrdude with studio
21:54 Tom_itx either
21:54 Tom_itx i have both
21:55 Tom_itx where's arduino's copy of avrdude located?
21:55 Tom_itx maybe i can try that
21:55 Triffid_Hunter Tom_itx: buried deep in its directory structure somewhere
21:56 Tom_itx they seem to hide stuff which irritates me
21:56 Tom_itx like the generated hex for one
21:56 Triffid_Hunter Tom_itx: yeah they hide all sorts of stuff, it's very annoying once you've moved beyond kindergarten grade programming
21:56 RifRaf arduino-1.0.3\hardware\tools\avr\bin
21:57 Tom_itx it's definitely a step back in time for me
21:57 Triffid_Hunter Tom_itx: it sticks the hex in your temp directory somewhere
21:57 Triffid_Hunter Tom_itx: fwiw I generally avoid it completely, use a Makefile instead
21:57 Tom_itx i found the hex but when you close the environment it erases the hex file
21:57 RifRaf webbotlibs seems several steps ahead of arduino ide
21:57 Tom_itx i was just using that for marlin
21:58 Tom_itx and i went to the schematic to find the actual port pins for the lcd
21:58 Triffid_Hunter Tom_itx: basically something like %.cpp: %.ino \n ( cat $<; echo 'int main() { setup(); while (1) loop(); }'; ) > $@
22:01 Tom_itx dude is in hardware\tools\avr\bin
22:01 RifRaf yep typed that a while back :)
22:05 RifRaf does this look like a good thing to read? http://www.scriptoriumdesigns.com/embedded/interrupts.php
22:06 Tom_itx did you see dean's articles?
22:07 Tom_itx i'd read them if i were you
22:07 zhanx https://lh6.googleusercontent.com/-_H727_nMEKw/UQNR9hwUXSI/AAAAAAAADm0/VQAO9dO8LEE/s640/2013-01-25%2022.47.39.jpg
22:07 zhanx parts came in
22:07 zhanx attiny 45's
22:07 zhanx rgb and white leds with needed resistors
22:08 zhanx good news to end my day on. The ended 50 minutes ago at the court house
22:08 Tom_itx RifRaf, http://tom-itx.dyndns.org:81/~webpage/abcminiuser/articles/avr_interrupts_index.php
22:08 zhanx dude got 17 years in prison
22:08 Tom_itx for what?
22:08 zhanx premeditated attempted murder 3 counts, (5 years each) and several minor charges
22:09 Tom_itx does that happen quite a bit in your line of work?
22:10 zhanx Tom_itx, the details are mainly stupid and basically its over a woman that cheated on her husband and got pregtent
22:11 Tom_itx i was thinking like an overseas incident involving civilians
22:11 Tom_itx but i guess not
22:11 zhanx promised to marry the guy and decided to go for the third opinion of another guy entirely
22:11 zhanx but still lead on the first guy
22:11 zhanx all the while the husband is deployed
22:12 Tom_itx i hear stuff like that happens quite a bit during deployment
22:12 zhanx yep just not that bad normally
22:12 Tom_itx there's a name for those guys.. i forget what it is
22:12 zhanx and the first guy (the one that made her prego ) was crazy
22:12 Tom_itx slang term
22:12 Tom_itx for them
22:12 zhanx stabbed them all
22:13 zhanx mutlipul time
22:13 zhanx can't type tonight
22:14 Tom_itx i can't code tonight
22:14 Tom_itx don't feel bad
22:14 zhanx true
22:14 RifRaf i can never type or code
22:17 Tom_itx Triffid_Hunter, what port do you use with avrdude using the bootloader?
22:18 Tom_itx got a cmd line i could see?
22:30 Triffid_Hunter Tom_itx: /dev/arduino, I have a udev rule
22:31 Triffid_Hunter Tom_itx: github.com/triffid/Teacup_Firmware/Makefile works, as do the makefiles for sprinter and marlin
22:32 Tom_itx ok thanks
23:15 rue_bed RifRaf, check it out
23:15 rue_bed http://designerthinking.com/fingers.html
23:21 Simotek hey all
23:21 rue_bed hey
23:21 RifRaf will do
23:22 RifRaf rue did you see wat i made today?
23:22 Simotek im thinking about making a robot on tank tracks
23:22 RifRaf here is current project http://www.youtube.com/watch?v=wf4-AMQWl6g
23:22 RifRaf [14:07] <RifRaf> current code for that http://pastebin.com/Y8C9va3m
23:23 RifRaf Simotek cool, how far have you got?
23:23 Simotek very much initial design stage
23:23 shuggans ... yo
23:23 shuggans :P
23:24 Simotek i want to control it with a avr or arduino which in turn ill probably control with a raspberry pi
23:24 rue_bed you do ribbon cable connectors like me
23:24 RifRaf hey shuggins
23:25 RifRaf yep, and then hotglue them
23:25 shuggans rue is on eye are see from bed?
23:25 shuggans O_O
23:25 Simotek analog electronics isn't a strong point though so i was wondering if anyone knows of any good tank track kits that are easly controlable from a avr or arduino
23:25 shuggans Get some off a snow blower
23:26 rue_bed _I_ hot glue them
23:26 rue_bed Simotek, last time I looked I coulnd't even find cheap toy to convert
23:26 Simotek damn
23:26 RifRaf well we have worked out the same methos then rue
23:27 shuggans Simotek: http://www.ebay.com/itm/Ariens-Snow-Blower-Compact-Track-24-Sno-Thro-New-Model-920020-Track-Drive-/181048966778?pt=LH_DefaultDomain_0&hash=item2a275bfe7a <- look for something like this around for sale signs or local auctions
23:27 RifRaf shuggings got some bigger motor drivers going today, i got them as 10A each but have seen them elsewhere as 50A/100A max
23:27 shuggans nice!
23:28 Simotek im guessing they won't come up often in australia
23:28 RifRaf 1 pwm pin and 2 for direction each
23:28 shuggans Ah ur in AU too?
23:28 shuggans Sorry <- Midwest USA here
23:28 rue_bed rif and bear are in australia
23:28 RifRaf shuggans you just missed me youtube link to it http://www.youtube.com/watch?v=wf4-AMQWl6g
23:28 shuggans I could keep my eyes peeled for you
23:29 RifRaf and its australia day as well today so we are extra special
23:29 shuggans Well - gongrats :P
23:29 shuggans that's sweet Rif
23:30 Simotek and a long weekend
23:30 shuggans I wish I was as good at the electronics peice as you :(
23:30 RifRaf yes but now stuck at the codeblock again :)
23:30 shuggans It WILL happen. Oh yes. Oh yes, it WILL happen.
23:30 shuggans lol, what do you have going on now?
23:31 rue_bed RifRaf, you have cygwin installed?
23:31 shuggans Rue: If I build my motor drivers as drawn: will I have to modify them in any way for PWM?
23:32 RifRaf rue nope, only 1/2 downloaded
23:32 rue_bed did you get devc++ from bloodshed?
23:32 rue_bed shuggans, show me what you have now
23:33 RifRaf surely i can use the var stuff on here already rue? i just need to request a flag from timer interrupt, run main loop until the flag asserts then continue doing me thing
23:33 rue_bed you have to learn how to code proper rif
23:33 RifRaf not the bloodshed thing, how big is it, i have a dvd with 3gb of cygwin files on it, maybe it have some parts, but i'd rather have the lot incase i miss something
23:34 rue_bed bloodshed is like 25M download
23:34 RifRaf yes i know rue, am about to go read some tutorials
23:34 RifRaf ok i can get that now then
23:35 rue_bed it sounds like cygwin is larger than a linux install (under 256M)
23:35 RifRaf yep and bigger than windows
23:35 rue_bed stuff cygwin
23:36 rue_bed not worth it just for compiling
23:36 Simotek download virtual box and run a linux vm
23:36 rue_bed no
23:36 shuggans rue: http://www.visuafusion.com/robotics/IMAG0048.jpg
23:36 rue_bed get foxy going or install devc++
23:37 RifRaf yes might try that again soon rue
23:37 RifRaf need a caffiene topup i think, started early making that motor thing
23:38 rue_bed shuggans, you can remove the three parallel transistors if you dont want speed control now
23:38 shuggans rue: Did you make those drivers or buy them?
23:38 rue_bed shuggans, I have to show you how to add the flyback diode for hte three transistors
23:38 shuggans those are easily enough added in....
23:38 rue_bed make which drivers?
23:38 shuggans meant rif about the drivers
23:38 shuggans sry
23:38 shuggans from the source to the gathe right? under the board?
23:39 rue_bed if they are green he prolly bought them
23:39 RifRaf ebay, $25 each, have seen em cheaper
23:39 rue_bed shuggans, I can help ya more tommorow, the relay circuit will get your motors going
23:39 RifRaf but they just worked, i like things like that, added them into webbotlib as 3 wire pwm drivers and they worked
23:40 shuggans Ok. So.. PWM - done in software?
23:40 RifRaf http://www.ebay.com/itm/New-50A-Single-H-bridge-motor-driver-module-PID-Arduino-intelligent-car-/300722330780
23:40 rue_bed shuggans, I would like to introduce you to the 'rifraf' robot test. you sit on it and drive it around
23:40 RifRaf using a hardware pwm pin on the avr
23:41 rue_bed dont start with that tho
23:41 shuggans xD
23:41 rue_bed shuggans, pwm (speed control) is done later with a microcontroller
23:41 rue_bed I can teach you later
23:41 shuggans I see.
23:41 RifRaf i bought the same thing as only 10A though, the fets are 55A, so i would say more like 10A
23:41 shuggans rue: kk
23:42 shuggans rue: off to bed?
23:42 rue_bed or you could be like rif, race off and try to do it on your own, blow up half your stuff, get almost to the quitting point and ask for help
23:42 rue_bed :P
23:42 rue_bed I AM in bed
23:42 RifRaf :P
23:42 shuggans nah- im good :P
23:42 RifRaf this time i am going slower
23:42 shuggans I NEVER would have guessed :P
23:43 rue_bed I want you all to know that I admire rifs process infinitly more than people who always talk about making stuff and never actually build anything
23:43 shuggans I can use pretty thin wire for the relay coil circuit right?
23:43 rue_bed do'ers ALWAYS beat talkers
23:44 rue_bed yes
23:44 shuggans sweet - I got these seet relay harnesses off ebay
23:44 shuggans sweet*
23:44 rue_bed little known fact rif is also a damn good artist
23:45 rue_bed shuggans, you had the old relays?
23:45 shuggans but they are pretty thin wire... like 24 or 22 gauge
23:45 shuggans Im goign to use the old relays still, yes
23:45 rue_bed ok, those relays use 1/4" spade connectors, just like the crimp-on ones
23:45 shuggans I bought some 40amp relays bc they came with the socets to plug into
23:46 shuggans just make it cleaner. these have those connectors in them - need to pull the ones for the driver circuit though + use some 10 or 8g wire.
23:46 rue_bed ok
23:46 shuggans IF I can find a damn solder gun thatll solder that...
23:51 RifRaf dev c++ installed
23:51 shuggans Di I NEED to solder with the crimp connectors?
23:51 shuggans like the wire into it? or just crimp?
23:51 RifRaf not if yu crimp them properly
23:52 RifRaf if you can pull on the wire without it coming out its crimped well
23:55 shuggans OH
23:55 shuggans breadboard came in :D
23:56 shuggans smaller than I thought itd be... but hey
23:56 shuggans I have a couple FDP3632's
23:56 shuggans cant find a clear data sheet I can tell what the yare though...
23:57 shuggans As I only need 2 for the relay coil circuit - will these work?
23:57 shuggans ah foudn a good datasheet.
23:57 shuggans not logic level :(
23:58 RifRaf http://www.fairchildsemi.com/ds/FD/FDP3632.pdf
23:59 RifRaf this is wats on the drivers i am using today http://www.irf.com/product-info/datasheets/data/irlr2905.pdf