Society of Robots - Robot Forum

General Misc => Misc => Topic started by: Sam_Charette on March 01, 2007, 09:22:25 AM

Title: Woot!
Post by: Sam_Charette on March 01, 2007, 09:22:25 AM
I know I haven't really been active here, but I thought I'd share anyway.

Last night I completed my first robot.  It's extremely simple, so it's not much to write home about, but I'm pleased anyway :)  It's just a little two wheel thing that has a remote (connected via RJ45) which can tell each wheel to go forwards or back.  It was a lot of fun to do, and I can't wait till I get into some more complex projects :)

Things I learned:

- RPMs mean squat when your torque is real low (and therefor, make sure to check torque as well as RPMs when buying a motor)
- LEDs can and will die a horrible death if you don't know what kind of load they can handle (still not sure how to find it out, but I killed two of em last night ;) )
- Putting more thought into the wiring before heating up the soldering iron will help keep you from having to desolder
- Soldering is an art form

Granted, nothing that most of you don't already know, and mostly things I had at least an idea about, but learning them from reading, and learning it because it happened to you are totally different (and unfortunately, the latter has more affect on my learning ;) )

I'd post pictures and/or a video of my simple accomplishment, but unfortunately the batteries it uses were taken from the camera  ;D
Title: Re: Woot!
Post by: Somchaya on March 01, 2007, 09:33:20 AM
Congratulations on your first robot! It's always fun to have a completed robot  ;D

Be sure to post pictures and maybe videos too once you get new batteries for your camera!
Title: Re: Woot!
Post by: Admin on March 01, 2007, 09:39:37 AM
Quote
LEDs can and will die a horrible death if you don't know what kind of load they can handle (still not sure how to find it out, but I killed two of em last night Wink
Put a resistor in series with the LED. In the LED datasheet it will tell you how many watts it can handle.
To calculate for the resistor needed,
    resistance in ohms = voltage squared / power in watts

A 500ohm resistor will typically be fine if you arent sure.
Title: Re: Woot!
Post by: Sam_Charette on March 01, 2007, 10:44:53 AM
I may just do that, as having a light to tell me that there's still power would be nice.  I do have a few things I'd like to clean up on it anyway (add a castor to lessen the friction on turning, better secure the circuit board on the bot itself, etc).

And as for pics and video, you betcha :)
Title: Re: Woot!
Post by: Hal9000 on March 01, 2007, 11:50:51 AM
Nice one man. One step closer to being a robot genious!
Title: Re: Woot!
Post by: Admin on March 01, 2007, 02:09:54 PM
quickie correction on my LED comment . . .

so that resistance you calculate is the bare minimum to keep the LED from frying. you will want a much higher resistance to conserve battery power, but as the resistance goes up, the LED brightness goes down.

anyway, it appears you have caught the robot addiction :P
Title: Re: Woot!
Post by: Sam_Charette on March 01, 2007, 04:36:52 PM
Thanks for the info, Admin.  And I've had the robot addiction for a long time now.  Many years in fact.  Just never had the money and time to really do it.

Now I do, and there's no stopping now!   8)
Title: Re: Woot!
Post by: ed1380 on March 01, 2007, 05:11:44 PM
Congrats. I'm about to start designing my first robot.

I've herd that leds can handle up to 90v but only 50milliamps, but AFAIK that isn't possible. v=current/resistance. so if you start putting more resistance to lower the current the voltage also lowers. Right?
Title: Re: Woot!
Post by: Brandon121233 on March 01, 2007, 07:58:04 PM
If you just want to simplify things a little this is a handy little Java program for LED's (nice graphical representation) http://led.linear1.org/1led.wiz (http://led.linear1.org/1led.wiz)
Title: Re: Woot!
Post by: Sam_Charette on March 01, 2007, 09:13:43 PM
Wow, great java calculator.  It even shows/tells you what the bands would be.  Very impressive!

I made some updates to it, with the resistor idea (works great! :) ) and fixed up a couple of things.  While I was doing that (and doing a wretched job on my soldering) my girlfriend helped me out with the mechanical side.  She found something to take the place of a castor, to lower the friction when it moves, and added a battery clip like thing to keep the battery pack in one place when the bot moves.

Now it goes real well, and only stalls on rare occasions :)

I'll take some pics and stuff this weekend.
Title: Re: Woot!
Post by: ed1380 on March 02, 2007, 10:56:44 AM
Cool calculator. Bookmarked
Title: Re: Woot!
Post by: Eco19R on March 02, 2007, 11:24:44 AM
I wouldn't put more then 25 mAs through a standard LED - max. I would go with putting a 1-2 K resistor in series with it if your using a +5V or around there.

Title: Re: Woot!
Post by: Admin on March 05, 2007, 08:57:26 PM
Sam, I need your expertise . . .

do you still have those burnt out LEDs? can you check if current still passes through after it burnt out? (im trying to debug a particular type of LED that isnt working and no current is going through it)
Title: Re: Woot!
Post by: Sam_Charette on March 06, 2007, 06:43:33 AM
I'm pretty sure I tossed them.  I'll check when I get home from work, but I'm pretty sure they're gone.
Title: Re: Woot!
Post by: Admin on March 06, 2007, 08:36:14 AM
does anyone else know how an LED fries? does current still pass through, or does the connection break?
Title: Re: Woot!
Post by: dunk on March 06, 2007, 09:38:51 AM
i have a big bag of them at home.
i'll fry one after work for you to find out.

dunk.
Title: Re: Woot!
Post by: JonHylands on March 06, 2007, 09:43:10 AM
Why don't you just try a new LED? Its not like they are expensive...

- Jon
Title: Re: Woot!
Post by: Admin on March 06, 2007, 10:14:42 AM
im just trying to determine why my LED failed :-\
how common is it for an LED plugged in the wrong way to break? do they have basic protection on this? can you try breaking it by reverse powering it first and tell me if it breaks?
i had a 300ohm resistor in series with it so thats only like 17mA . . .

strange that my ATmega8 doesnt break with reverse power but my LED does . . . ???

im using this ultra cheap (and probably low quality) LED for the $50 robot and I dont have another exactly like it . . . debating if I should try a different more expensive type (of which I own), or still go with the same type (requires me to order another and wait a week) . . .
Title: Re: Woot!
Post by: JonHylands on March 06, 2007, 10:36:16 AM
Well, I would just go with the more expensive one for now, but order 10 of the cheaper ones. How are you hooking it up? You can either have the ATmega provide a ground for the LED, or provide power for the LED.

If the ATmega is powering the LED, the resistor should be between the AVR pin and the long pin on the LED. The short pin on the LED should go to ground. Putting the pin high will turn on the LED, and low will turn it off.

If the ATmega is grounding the LED, the short pin on the LED should be hooked to the AVR pin directly, and the long pin on the LED should go through the resistor to +5. Putting the pin low will turn on the LED, and high will turn it off.

- Jon
Title: Re: Woot!
Post by: Admin on March 06, 2007, 10:47:16 AM
Jon, im using the AVR pin as the LED ground as you mentioned . . . the LED power lead is on the voltage regulator output like the AVR . . . the schematic works, as I tested it with a much more expensive LED of mine. I am just confused why the LED would fry but not the not-yet-programmed AVR . . .
Title: Re: Woot!
Post by: JonHylands on March 06, 2007, 11:01:43 AM
Modern microcontrollers are very well protected against high voltage and reverse voltage and just about anything else you can throw at it.

In my experience, you have to do something pretty drastic to fry a microcontroller. Case in point:

I was using my ATmega128 to test my new ATmega168 board (they are connected over the hardware UART). I put the voltage regulator in backwards on my ATmega168 board, so the chip was getting 11 volts or so. It continued to function, and sent 11 volts down the comm line to the ATmega128. The ATmega128's UART got toasted, but everything else on it appears to work, and it doesn't appear to have affected the ATmega168 at all.

- Jon
Title: Re: Woot!
Post by: dunk on March 06, 2007, 11:08:56 AM
yup. it shouldn't damage the LED.
in the LEDs specs you should have a figure "Vr max" which is the maximum reverse voltage.
most normal LEDs are good up to 5V.

scroll down to the "Maximum reverse voltage" line in this page:
http://www.kpsec.freeuk.com/components/led.htm (http://www.kpsec.freeuk.com/components/led.htm)

i suspect you just had a dud LED on this occasion.

dunk.
Title: Re: Woot!
Post by: Sam_Charette on March 06, 2007, 11:21:57 AM
Did the LED ever work?  Does it work in a simpler circuit? (I'm sure you already tested this, but I'll ask anyway)
Title: Re: Woot!
Post by: Sam_Charette on March 07, 2007, 07:29:36 AM
Sorry that I forgot to do this last night, but I did find one of the dead LEDs this morning.  I didn't have time to test it though.  If neither you nor dunk feel like testing a burned out one, I will tonight.  I'll even send myself a reminder :)
Title: Re: Woot!
Post by: Admin on March 07, 2007, 01:59:04 PM
Quote
Did the LED ever work?  Does it work in a simpler circuit?
Nope it never worked. But if I put a more expensive LED in parallel with the dead LED, the more expensive one works fine. Normally I'd just make the replacement and not bother anyone on it, but there are other issues when I tell people to buy a particular LED that is cheap yet not reliable . . . Im thinking it was a dud as Dunk said . . .
Title: Re: Woot!
Post by: Sam_Charette on March 07, 2007, 04:17:37 PM
Seems the likeliest scenario, yes.
Title: Re: Woot!
Post by: Brandon121233 on March 07, 2007, 11:25:09 PM
Someone asked about what happens when an LED burns out, well baisically it melts the silicon in the LED (and sometimes you can get them to explode with enough current) and at that point no current sould be able to pass thrugh it. And also what exactly do you guys mean by more expensive? Unless its a superbright LED, you can get baisically any quality LED for under 10 cents. And also duds are semicommon on a lot of LED brands, not too many places test their LED's to ensure they are working properly.