#robotics Logs

Feb 14 2013

#robotics Calendar


00:24 RifRaf dammit forgot to get serial cable bits
00:31 rue_house oh
00:31 rue_house http://www.embedds.com/programming-avr-i2c-interface/
00:32 RifRaf got accelerometer in mail, needs to be instead an i2c master
00:32 rue_house bet you cant put that mess togethor :)
00:32 rue_house you dont need to tho, you got webbot libs
00:32 RifRaf yep
00:33 rue_house what was the timer solution?
00:33 rue_house I heard, but couldn't put it togethor from the scroll history
00:33 RifRaf i'll stay on the highway, you construct a path through the bush
00:33 RifRaf i was the problem, still not happy though
00:33 rue_house hey, its garunteed no toll!
00:33 RifRaf cause i still am the problem
00:33 rue_house well tell me about it
00:34 RifRaf ok, i was not calluing scheduleJob correctly, and still am not
00:34 RifRaf but can compile, so getting closer and no errors about not finding the function
00:34 rue_house case wrong?
00:35 RifRaf yes my syntax
00:35 rue_house hmm
00:35 RifRaf i am not interperating what variable to use correctly
00:35 rue_house there is an object fo the timer system, but I dont know what it is
00:35 RifRaf i have a new for statement working and making a delay, but stopps the wrole program
00:36 RifRaf because i have a 250ms delay each time i check sonar it only checks for button presses 4 times a second now
00:36 RifRaf which is kinda ok but not what i want once things bet more automated
00:37 RifRaf get*
00:37 RifRaf am dazzled my leds here, they gave me some to test and blow up to see the limits
00:37 RifRaf by*
00:38 RifRaf 1.5A @12v for 20 modules
00:38 rue_house you ahve to do your delays different
00:38 rue_house casue that function your in has to return
00:38 RifRaf well i need the scheduler, i could try it again
00:39 rue_house make a global variable, increment it every time the loop fn is called, and do the thing (toggle led, whatever) when the counter either hits a particlar number or when it is zero
00:39 RifRaf its just the command i am using that is not correct
00:39 rue_house with that library you dont have control of the main loop
00:39 RifRaf did you see current code? tom made a change today as well to it, gonna test that now
00:39 rue_house so you cant just do a for loop delay
00:40 rue_house nope
00:40 rue_house oh, I'm late for bed too
00:41 RifRaf http://pastebin.com/tFqTuZkq thats toms, gonna try now, but everything is closed from the BSOD this morning
00:41 rue_house ask microsoft to fix up your os
00:41 RifRaf the avr did it
00:41 rue_house oh, so it was nothing microsoft had any fault with
00:41 RifRaf confused the usb to serial adapter and killed the pc
00:42 RifRaf nope, the stupid usb to serial
00:42 rue_house must be an os feature
00:42 RifRaf computer is normally stable for weeks
00:42 rue_house 22:29:53 up 44 days, 9:21, 8 users, load average: 1.44, 1.73, 1.83
00:42 rue_house weeks.... ok
00:43 rue_house hmm the boiler controller has been up 56
00:43 rue_house 88 days on the router
00:44 rue_house fileserver is 88
00:44 rue_house I'm guessing 88 days ago there was a major power outage
00:44 rue_house need more reliable power }:(
00:45 rue_house RifRaf, you have my permission to tell me to just shut up about it :)
00:45 RifRaf silly Tom_itx, its not if( i >=500;) sir its if( i >=500);
00:46 RifRaf so his version compiles now
00:48 RifRaf but it counts to 500 in a few milliseconds so how will i know if its working
00:48 RifRaf i'll make it 1000000
00:52 rue_bed there should be no semicolon on that line...
00:54 RifRaf its compiling
00:54 rue_bed yes
00:54 rue_bed so will while(0); but it wont DO anyting
00:54 RifRaf yeah ok, i see what you mean, my other ifs don't have it
00:54 RifRaf is gone
00:55 rue_bed RifRaf, dude, you need to know more about WHAT your writing
00:55 RifRaf will upload soon, still getting organised again
00:55 rue_bed do you know WHY there is no semicolon on it?
00:55 RifRaf rue tom wrote that bit, i wrote the bit above
00:55 RifRaf from scratch, the commented out part, crazy code
00:56 RifRaf yes because if and for are special like that
00:56 RifRaf i forget the exact reason
00:56 rue_bed every command has a semicolon after it
00:57 rue_bed for, while, and if aren't commands,
00:57 rue_bed their program flow modifiers
00:57 RifRaf ah
00:57 rue_bed for, while, if and do
00:57 RifRaf yes that was it :)
00:57 RifRaf the old flow modifier
00:58 rue_bed RifRaf, write me a loop that always loops forever, and sets i=0 every time
00:58 RifRaf the pins on me accelerometer are a bit bent from transport, hope it was not too shaken up
00:59 RifRaf i think i did that this morn, was good at making loops that i get stuck in or do nothing
00:59 RifRaf desk is too messy rue, think i need to tidy up first
00:59 rue_bed yea, do you know what loop type to do
00:59 rue_bed I'm gonna fall asleep soon
01:00 RifRaf alright will make you a loop
01:01 RifRaf int i;
01:01 RifRaf for (i = 0; i < 5; i++) { i = 0; }
01:01 RifRaf i never gets past 1 i think
01:02 RifRaf i dunno, you know i cannot code
01:02 RifRaf need to very focused to code, 5am is about the best time
01:02 Ademan lol
01:03 RifRaf Ademan but i can make servos move, where are you up to?
01:03 Ademan It's time for the great circuiting
01:03 Ademan (I've been pissing away my evening til just now)
01:09 Ademan I don't have enough breadboards :-/ this circuit is going to have to bunk with my MSP430
01:11 RifRaf yeah does not use much space
01:11 rue_bed no
01:11 rue_bed I want one that loops forever
01:12 rue_bed your loop will loop 5 times
01:12 rue_bed er no
01:12 rue_bed hah
01:12 Ademan rue_bed: it resets the counter
01:12 rue_bed good one
01:12 rue_bed yea
01:12 rue_bed <---
01:12 rue_bed bed!
01:12 Ademan I... don't know why... but it does :-p
01:13 rue_bed RifRaf, use a while loop,
01:14 RifRaf Ademan he wanted me to be stuck in a loop
01:14 rue_bed it was my fault
01:14 RifRaf rue getting this other code to work at moment
01:14 rue_bed I said every time set i= 0
01:14 rue_bed but you only know to loop with i
01:14 RifRaf nah can use x or y too
01:15 rue_bed if you need to loop forever you use while(1)
01:15 rue_bed do you know how while(1) works?
01:15 Ademan for (int RifRaf = 0;; RifRaf++);
01:15 RifRaf oh i do recall that
01:15 Triffid_Hunter RifRaf: this chassis is takin its sweet time untwisting, got a car battery sitting on relevant corners with a bit of wood run along the other diagonal underneath
01:15 Ademan you'll overflow a few times but you'll never leave that loop :-p
01:15 Triffid_Hunter wondering if I should put it on the heated bed of one of my repraps and hit it with a few thermal pulses
01:15 SorcererX for(;;)
01:15 RifRaf Triffid_Hunter so sorry dude, i did not even look at it for that
01:16 Triffid_Hunter RifRaf: naw it's fine don't be sorry, if I want to not have these issues I'll pay money for it ;)
01:16 Ademan SorcererX: But we need to trap RifRaf in the loop
01:16 rue_bed yes, whle makes more sense
01:16 RifRaf yep a hot air gun might speed things up
01:16 rue_bed glad I'm not the only C coder here
01:17 Triffid_Hunter don't have hot air that big, just a smd one
01:17 Triffid_Hunter got a reprap plate that gets hot enough to reflow though :D
01:17 rue_bed ugh
01:17 rue_bed wow
01:17 rue_bed whats the plate made of?
01:18 RifRaf would be polycarbonate i'd say
01:18 Ademan borosilicate
01:18 rue_bed metal or pyrex?
01:18 Ademan pyrex
01:18 Ademan although there are some alluminum ones?
01:18 RifRaf oh the plate :/
01:19 Ademan I still have yet to put a heated bed on my reprap
01:19 rue_bed me too
01:19 rue_bed need to make the motors turn first
01:19 rue_bed :)
01:20 Ademan hehe, took me forever to get the stepper motor drivers working
01:20 Triffid_Hunter I reckon this chassis is ABS, so I wouldn't push it past 90.. don't want to melt it
01:20 rue_bed last test, I couldn't get the arduino to send steps
01:20 rue_bed but I didn't have any limit switches attached, so I attribute it to that
01:20 RifRaf yay i have a 1/2 second delay and the buttons interupt it http://pastebin.com/pEMLyrkF
01:21 RifRaf well seems so at the moment
01:21 Ademan it was 4am when I finally had everything wired up, and the pololus were overheating so movement was jerky. I convinced myself that WASN'T the problem because when I changed the POT the output didn't change... I was turning the POT forthe wrong driver :-/
01:22 RifRaf hah
02:17 RifRaf got a 1w led upto 10w before it started blowing apart
02:18 RifRaf still looks like resistors gave up before the led
02:19 RifRaf and about 150°C at the led
02:52 Ademan RifRaf: got it working, thanks for the tip!
03:03 Ademan RifRaf: not sure if you saw that, but thank you, that circuit works (although I had to wing it with the resistors I had available)
03:03 Ademan and I can confirm that the MG996Rs I received from Aliexpress aren't dead on arrival!
03:04 Triffid_Hunter yay
03:05 Ademan ~1/2 the price of what they are on hobbyking, and now I have more than enough (19) to abuse
03:06 RifRaf Ademan thats excellent
03:07 RifRaf its a good simple circuit to test your servos, you can try adjust some values to see what different it makes, pretty tolerable
03:08 Tom_itx rue_house, i've done i2c host but not slave
03:10 Tom_itx RifRaf, still reading scroll back but did my fix work for the sonar?
03:10 Triffid_Hunter Ademan: linky for $5/ea MG996R?
03:11 Ademan Triffid_Hunter: I wish I could
03:11 Ademan the price appears to have risen
03:12 Ademan I paid 11.50/2
03:12 Ademan current price appears to be 16
03:12 RifRaf tom yes have it working, using basically your change
03:12 RifRaf had to remove a ; and alter value
03:12 Ademan http://www.aliexpress.com/item/MG996-MG996R-Metal-Gear-high-Torque-Servo-For-Boat-CAR/541511115.html
03:12 RifRaf you want to try load this project?
03:13 RifRaf i just paid $34 for 4 x mg996 :(
03:13 RifRaf 38 actually
03:15 Ademan http://imgur.com/qQbgGEo not sure what to say... I don't think I got any big discount...
03:15 Ademan or any discount
03:16 Triffid_Hunter http://www.aliexpress.com/item/MG996-MG996R-Metal-Gear-Digital-high-speed-Rc-Torque-Servo-For-Helicopter-Airplane-CAR-Boat/640843667.html <-- $5.26/ea posted to Aus :D
03:16 Triffid_Hunter in a lot of 10 that is..
03:17 RifRaf wow thats good
03:17 Ademan I almost bought from them I think, I didn't plan on buying 18 at once, so lots of 10 seemed inconvenient
03:17 Ademan My original intention was to buy 1 or 2 lots to make sure it wasn't a scam, then buy the rest
03:18 Ademan but then I threw caution to the wind lol
03:18 RifRaf is ali express the latest ebay?
03:18 RifRaf never bought from there yet
03:18 Ademan my understanding is it's russian roulette
03:18 RifRaf k, the prices look great on stuff though
03:19 Ademan but so far I'm pretty sure both of my transactions have been not-scams
03:19 Ademan plus they have a system where the seller doesn't get paid until you confirm receipt
03:19 Ademan which seems like it'd kill 99% of scams
03:19 RifRaf wow
03:20 Triffid_Hunter RifRaf: it's chinese ebay for westerners
03:21 RifRaf yep thought similar
03:21 Triffid_Hunter they seem to be pretty serious about it, I haven't been scammed on there but also use same caution as with ebay
03:21 Triffid_Hunter if you want chinese ebay for chinese, see taobao.cn
03:21 RifRaf Triffid_Hunter did you see the led i chucked in, they are at least sweet
03:21 Triffid_Hunter maybe taobao.com.cn
03:21 Ademan If I wanted to drive a servo from a 3.3v microcontroller, would it make sense to use a transistor to provide 6v signal to the servo?
03:21 Triffid_Hunter RifRaf: yeah I did, haven't had a chance to play yet
03:21 Triffid_Hunter Ademan: servo will probably be fine with 3v3 signal
03:21 Ademan Triffid_Hunter: have you done a lot of buying there?
03:22 Triffid_Hunter Ademan: not a lot, maybe a thing every month or two
03:22 Ademan Triffid_Hunter: If not, is a transistor likely to be able to handle the frequencies required to drive a servo?
03:22 RifRaf yes
03:22 Triffid_Hunter Ademan: trivially
03:22 Ademan Triffid_Hunter: so you've done tens of purchases? that's pretty reassuring
03:23 Triffid_Hunter Ademan: yep
03:23 Triffid_Hunter got a set of mains heaters for my repraps from there
03:24 Ademan Triffid_Hunter: What about x10? (using a 4017 to drive 10 instead?)
03:24 Triffid_Hunter Ademan: yep go for it
03:24 Ademan Triffid_Hunter: oh? how much do those run? I've heard (possibly from you?) they're way more power efficient than the DC solutions most people use
03:25 Triffid_Hunter Ademan: just chuck 'silicon mat heater' into the search, mine are 20x20cm, 250w, 230v
03:26 Triffid_Hunter Ademan: although you must remember it's CNY at the moment, most of the sellers probably pulled stuff until end of feb sometime
03:28 Ademan I got a number of life sized silicon sex dolls after about 10 heaters hehe
03:29 Ademan Yeah I don't plan to buy, I need to get a borosilicate glass plate before I address my heating situation
03:29 Ademan in addition I need to figure out my bed leveling approach
03:29 Ademan I'm a bit tempted to buy that bed spider (I think it was nathan7 that designed it)
03:30 Ademan right now I just have a piece of wood on top of my bearings with no way to adjust
03:35 Tom_itx RifRaf, what number did you end up with on the sonar
03:35 Tom_itx probably fairly high
03:38 Tom_itx once you're inside one of the buttons running the gait, it's not gonna help you much
03:40 RifRaf omg tom i am getting so far just now, read the replies line by line and things are happening
03:40 RifRaf to my questions in the forum
03:41 RifRaf yay the scheduler is WORKING!
03:42 RifRaf damn what a breakthrough, i know i don't need it but had to know it worked
03:42 Tom_itx you gonna post your project somewhere for me?
03:43 RifRaf and now will try the other bit of code suggested instead of scheduler, from http://www.societyofrobots.com/robotforum/index.php?topic=16573.0 if anyone is interested in this
03:43 RifRaf i'll email it to you, all the code files and the board file, if they are in different places might not work right up, not sure, but happy to try
03:44 RifRaf will send it now with the scheduler working, you can comment it out of the startup provess and enable you code as well
03:46 RifRaf it should compile fine without any board file though, if your webbotlibs is in the same place, make a copy now to c:\code\webbotlibs
03:47 RifRaf - the s
03:47 RifRaf c:\code\webbotlib\
03:49 Tom_itx email must be running slow. i'll check later
03:51 RifRaf only just sent
03:52 RifRaf and board file on the way in second email
04:01 RifRaf any luck Tom_itx?
04:09 RifRaf gonna do an avr stocktake soon and see if there are any mega328, i know there are lots of mega32 that i need to find a use for, sure they will still be ok
04:09 RifRaf this mega168 is limiting the amount of moves i can do with the arm, but 32k will be heaps more
04:10 RifRaf and wanna hook up this accelerometer as well, to try keep the gripper level
04:10 RifRaf well thats they only thing i can think of to start
04:11 RifRaf would be nice if like 3 servos could just look after themselves and stay level unless specifically told to move differently
04:12 RifRaf Triffid_Hunter am i thinking right?
04:12 RifRaf might as well be told differently at the start than going off on some tangent
04:13 RifRaf the gripper has XYZ servos plus the gripper you see
04:25 RifRaf so happy, code is working now with the new type of loop that is more designed for webbotlibs
04:26 RifRaf and don't need the scheduler yet but know how to use it
04:26 RifRaf can start with accelerometer now :)
04:59 RifRaf http://www.youtube.com/watch?NR=1&v=t0-Tj3WhQNo&feature=fvwp
12:39 RifRaf Tom_itx you about?
13:51 Celelibi Hi there.
13:52 Celelibi I have a question about which kind of sensors / actuators I should use for my project.
13:52 Celelibi I want to make a (very classical) two wheel inverted pendulum.
13:53 Celelibi With features such as "hold position" or "return to position".
13:53 Celelibi And a reasonable max speed.
13:54 Celelibi Thus I think I need either a feedback on the wheels, or a precise feedforward.
13:55 Tom_itx you need encoders and possibly an acceleromter/gyro setup
13:56 Celelibi I'm aware of the stuff for the stabilization part. ^^
13:56 Tom_itx http://tom-itx.dyndns.org:81/~webpage/maxbot/maxbot_index.php
13:56 Tom_itx that one balanced
13:57 Tom_itx have you seen D anderson's stuff?
13:57 Tom_itx http://www.geology.smu.edu/~dpa-www/myrobots.html
13:57 Tom_itx http://www.geology.smu.edu/dpa-www/robo/nbot/index.html
13:57 Celelibi I've seen quite a lot of self-balanced robots. most of them have quite a crappy balance.
13:58 Celelibi Your first link doesn't load.
13:58 Tom_itx his works quite well
13:58 Celelibi (the dyndns)
13:58 Tom_itx port 81
13:58 Tom_itx is probably why
13:58 Celelibi Can copy/past fail me?
13:59 Celelibi no, but my network setup may...
13:59 Tom_itx my isp blocks 80 so i have to use 81
14:00 Celelibi the network here seems to forbid connection to port 81.
14:00 Celelibi but it's ok now. :)
14:01 Tom_itx anderson has several videos of his
14:01 Tom_itx it's pretty cool
14:02 RifRaf Tom_itx did you try any of the files i sent?
14:03 RifRaf been reading up on this accelerometer, is gonna be cool getting it hooked up tonight
14:04 Tom_itx nope
14:04 Tom_itx been working
14:11 Celelibi Tom_itx: so basically you would suggest that I use simple dc motors and wheel encoders?
14:25 Tom_itx make sure they have plenty of torque
14:41 Celelibi ok
14:50 Celelibi I also envisionned to use stepper motors. You think it would be overkill?
15:20 Celelibi I also was worried by the precision I could obtain on the wheel. With a wheel encoder, what can I expect?
15:20 Celelibi More like 10° or 1° ?
15:26 SorcererX if the wheels do not slip, wheel encoders are very accurate
15:26 SorcererX of course, some might have just 360 steps per rotation, other might have several thousand
16:14 Tom_itx you will get some slippage anyway
16:15 Tom_itx mine had a couple thousand iirc
16:18 SorcererX odometry wheels would help, but rather tricky to do well mechanically
16:25 Celelibi So what do you think is best? Steppers or DC motor + rotary encoders or brushless + encoders ?
16:26 ace4016 are you going for cheap and easy to control?
16:26 ace4016 if so, brushed + encoder
16:28 Celelibi I don't think I'm going to write the motor controller myself. :)
16:28 Celelibi I'm more interested by the balance control.
16:30 ace4016 for your purposes, the difference between brushed and brushless are insignificant unless you're also creating the motor controller and not just the balance logic; if you're building this all yourself, i'd go with brushed just so that it's one less thing to worry about
16:30 ace4016 from a [academic] control stand-point, brushless can be more interesting
16:30 Celelibi ok.
16:31 Celelibi thx
16:31 ace4016 also, if you're going into space or low atmosphere locations, don't go brushed :P
16:32 Celelibi My target is flat floor. :p
16:32 Celelibi And maybe sloppy floor.
16:33 Celelibi But well, for a first robot, cheap and easy to control may be a good criteria also.
16:39 Celelibi sloped*
16:39 Celelibi (sorry for my english ^^)
17:03 Celelibi Tom_itx: is port 443 allowed by your isp ?
17:05 Celelibi If so, you should try to configure https.
20:23 rue_bed I told tom to use 82 and now 81, but..
20:34 RifRaf but what?
20:34 RifRaf bit early for bed isn't it?
20:34 RifRaf 9 min to go, early day
20:42 Tom_itx i need data on an insert cutter
20:43 Tom_itx DNMG10308
20:51 RifRaf Tom_itx have you googled?
20:51 Tom_itx i got close to what i need
20:55 RifRaf did you look at the emails yet
21:01 Tom_itx working on a cad cam thing for a guy right now
21:41 Triffid_Hunter RifRaf: heh this motor is nuts, the current sense resistor on my ESC just caught fire and unsoldered itself from the board
21:42 RifRaf nice one :)
21:45 Triffid_Hunter apparently 25mR is too high
21:45 RifRaf it would be around 30 - 40 A draw
21:45 Triffid_Hunter how about on 3S?
21:45 Triffid_Hunter I better heatsink these mosfets
21:47 Triffid_Hunter the power to weight with this car is insane with a 3S lipo, has trouble getting traction
21:47 Triffid_Hunter I'm actually thinking of adding weights to improve the handling
21:48 RifRaf it used be be pretty good once you have a shell on it
21:48 RifRaf helps it stay on the ground better
21:48 Triffid_Hunter yeah I bet
21:48 Triffid_Hunter perhaps I'll have a go at printing one
21:49 RifRaf ok cut a heap more servo bracket parts, time to go home
22:36 sw0rdfish ...
23:15 RifRaf rue got the i2c going and accelerometer returning data