Author Topic: $50 dollar robot modification question - LED light mini-show.  (Read 4880 times)

0 Members and 1 Guest are viewing this topic.

Offline Andrew_WaltfeldTopic starter

  • Jr. Member
  • **
  • Posts: 8
  • Helpful? 0
$50 dollar robot modification question - LED light mini-show.
« on: November 22, 2009, 02:23:34 PM »
           Well for my senior seminar project in college, i decided to do something in robotics and a friend from the robotics club introduced me to society of robots, so i ended up doing the $50 dollar robot. It cost me around $120 because this is my first time soldering etc (completely new to this). So I had bought double the parts in case i messed up and got continuous rotation servo's from servo website recommended so i wouldn't have to  modify the servos.

I'm almost done soldering the basic $50 robot board, I got the AVR programmer mkII that was recommended  (only came with 6 pin) so i had to redo some of the wiring on the board, the board is a slightly bigger board than what is on there, but not too worried about space issues.

However, my question is this -

sortof as a mini-self-design project of mine, i wanted to add around 4x4 rows of LED lights to create a little light show while it's running around. however,

my question is this - voltage and circuit board wise, what exactly do i need to modify?

should i put this on a completely separate circuit  than from what runs the motors/sensors etc?

 but if i do that, how should i get it so that the programmer sends the correct signals?

edit -
using a 6v battery pack, though i did add the 5 volt regulator in case i needed to change over to a higher voltage if needed.

« Last Edit: November 22, 2009, 02:27:14 PM by Andrew_Waltfeld »

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: $50 dollar robot modification question - LED light mini-show.
« Reply #1 on: November 22, 2009, 02:30:56 PM »
You don't really need to make any hardware changes. just hook the led's with resistors up to the digital pins!
That's the hardware side anyway, with the software, just turn the pins high when you want them to turn on.
Howdy

Offline Andrew_WaltfeldTopic starter

  • Jr. Member
  • **
  • Posts: 8
  • Helpful? 0
Re: $50 dollar robot modification question - LED light mini-show.
« Reply #2 on: November 22, 2009, 02:55:01 PM »
You don't really need to make any hardware changes. just hook the led's with resistors up to the digital pins!
That's the hardware side anyway, with the software, just turn the pins high when you want them to turn on.

which digital pins? i guess I'm question is, with going with the 6 pin pdf schematic exactly where i should connect the LED's to so that the programmer has access to them. I'm completely new to circuit boarding etc, so not sure what you mean.

I was thinking of creating a line of them probably

-|-|-|-|-
-|-|-|-|-
-|-|-|-|-

like this, but not sure if it would be as controllable or not. like i wanted it so that i could turn on certain LED's and not others, create patterns of light etc.

 basically - i am a total newbie at this, so explain as much as possible please. I understand the basic concepts of the circuit boards and what components do what, but actually connecting them to create exactly what i need, not so much.
« Last Edit: November 22, 2009, 02:56:42 PM by Andrew_Waltfeld »

Offline madchimp

  • Robot Overlord
  • ****
  • Posts: 158
  • Helpful? 2
Re: $50 dollar robot modification question - LED light mini-show.
« Reply #3 on: November 22, 2009, 06:07:41 PM »
Well you don't program the LED's so the programmer doesn't need access to them. The LED's will need to be connected to digital output pins on the micro controller. Off hand I don't know how many left over pins the micro on the $50 robot has. (Just to lazy to look right now) To do a 4X4 matrix you will need 8 output pins available on the micro. There are all kinds of projects on the net for building an LED matrix so Google is your friend. Another thing to Google would be POV (persistence of vision) displays since most LED matrix's use that principle. Yes you have to do some research but it's good for you trust me. Would love to see video of this thing in action once you get it done you could have the LED matrix actually giving you feed back as to what your robot is "thinking" hehe.

Offline Andrew_WaltfeldTopic starter

  • Jr. Member
  • **
  • Posts: 8
  • Helpful? 0
Re: $50 dollar robot modification question - LED light mini-show.
« Reply #4 on: November 22, 2009, 06:52:10 PM »
Well you don't program the LED's so the programmer doesn't need access to them. The LED's will need to be connected to digital output pins on the micro controller. Off hand I don't know how many left over pins the micro on the $50 robot has. (Just to lazy to look right now) To do a 4X4 matrix you will need 8 output pins available on the micro. There are all kinds of projects on the net for building an LED matrix so Google is your friend. Another thing to Google would be POV (persistence of vision) displays since most LED matrix's use that principle. Yes you have to do some research but it's good for you trust me. Would love to see video of this thing in action once you get it done you could have the LED matrix actually giving you feed back as to what your robot is "thinking" hehe.

alright thanks for the point in the right direction.


so basically i need to connect the LED's to the micro controller? (the 28 pin one that is centered in the circuit board.) Looking at the PDF of the schematic i have, i would have 8 micro controller "slots" or "pins"  left. so I'm guessing in luck if i am looking at the correct piece on the circuit board.

thanks for pointing me in the right direction. ^^

if anyone else has any input that might even be more focused in the direction i need to go, that would be great.

Offline Maltaeron

  • Full Member
  • ***
  • Posts: 65
  • Helpful? 0
Re: $50 dollar robot modification question - LED light mini-show.
« Reply #5 on: November 22, 2009, 09:40:20 PM »
Just to clarify, a 4x4 matrix would have 16 LEDs, so you would need 16 output pins. Also, looking at the $50 robot schematic, noting that the programing pins can still be used for other things, you actually should have 18 pins left.

Basically this should be a pretty easy thing to do, the hardest would just be programming for the LEDs to actually do something. Also, you might want to experiment a little with what value resister to use (controlling the LED brightness).

Good luck

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: $50 dollar robot modification question - LED light mini-show.
« Reply #6 on: November 22, 2009, 11:57:40 PM »
No, for a 4x4 matrix you need 8 pins, example:
Howdy

Offline Maltaeron

  • Full Member
  • ***
  • Posts: 65
  • Helpful? 0
Re: $50 dollar robot modification question - LED light mini-show.
« Reply #7 on: November 23, 2009, 01:23:21 AM »
Not sure I understand your picture, but I looked it up. However, he may find it easier both making the circuit and programming it, to just wire them straight rather than have to use the extra sophistication he would need for the pov approach, since he does have enough ports to hook them up direct.

Offline Andrew_WaltfeldTopic starter

  • Jr. Member
  • **
  • Posts: 8
  • Helpful? 0
Re: $50 dollar robot modification question - LED light mini-show.
« Reply #8 on: November 23, 2009, 01:54:40 AM »
Not sure I understand your picture, but I looked it up. However, he may find it easier both making the circuit and programming it, to just wire them straight rather than have to use the extra sophistication he would need for the pov approach, since he does have enough ports to hook them up direct.

thank you for the clarification.

Back after a pretty fire show (not really) of how not to wire/solder a circuit board. (tried testing it). not sure exactly what went wrong but my board is kind of toasted, luckily I have all the spare parts i bought. (have x2 of everything) so I'm double checking  this time to be extra careful when soldering/wiring this time. It was probably due to my poor soldering skills in the beginning (it was my first circuit board that i have soldered.). I attached the pdf of the schematic i used for it.

Returning to LED's -

KISS effect comes to mind. whatever you think is easier for a complete newbie to do and understand, i was going to put the LED's on a separate circuit board, and use around 6" of wire(s) (eight of them) to connect it from the micro-controller, that way i could have the actual guts of the robot inside the box (no roof yet) I created it and the LED's can be on top of it.

for the LED's and the micro controller, according to the PDF there is 8 pins that aren't assigned to anything, I'm assuming you mean use those, or if you mean by the fact that i have only 2 servo's and 2 sensors, so I would have technically have room for 3 more servo's and 4 photo-sensors?

secondly, what type of resistors should i be looking for to attach to the LED's?
I decided to be a little cheap and got these yesterday (enough of them to make one color grid of 16) -
http://www.radioshack.com/product/index.jsp?productId=2062588

Third = battery power? Will I need to add another 9v battery or battery pack to this robot in order for the LED's to have sufficient power if they are at 2v-3v each (according to radio shack) and another 10v capacitor or 5v regulator?

« Last Edit: November 23, 2009, 02:22:40 AM by Andrew_Waltfeld »

Offline Conscripted

  • Robot Overlord
  • ****
  • Posts: 291
  • Helpful? 10
Re: $50 dollar robot modification question - LED light mini-show.
« Reply #9 on: November 28, 2009, 12:58:30 AM »
Sorry to hear that your first build experience didn't go as planned. At least you have replacement parts already. I'm guessing that you had a short somewhere on the power bus. Get a multimeter if you don't have one yet. It will make finding those sorts of problems MUCH easier. A visual inspection will only get you so far.

OK. So let's talk about resistors for a second. According to the data sheet for the ATMEGA8 can provide a MAXIMUM of 40 mA per IO pin. You will need to attach a resistor in series with each LED to reduce it's current below that 40 mA number. The specific value needed will depend of voltage used and the specific LED used. Something in the 330ish neighborhood should work fine.

When it comes to batteries it all depends on what you consider acceptable and how long you want your contraption to work before the batteries die. Personally I would recommend using a 6v battery pack. A 9 volt battery will work but they tend to have VERY low capacitance. (a couple hundred  mAh) That means that they will go dead very quickly. A typical 6V AA battery pack has a capacitance of around 2200 mAh. Either way you go you are going to need to get a voltage regulator.  You don't want to feed your shiny new microcontroller more then 5.5 volts.

Good luck with the rebuild. Make sure you post pictures when it's finished.
Conscripted.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: $50 dollar robot modification question - LED light mini-show.
« Reply #10 on: November 28, 2009, 06:33:27 AM »
Hi,

According to the data sheet for the ATMEGA8 can provide a MAXIMUM of 40 mA per IO pin.
No!
I seem to be repeating this every so often, but here I go again...
Absolute Maximum Ratings are not specs. you should design for.
It's the limits where things start to go really bad, sort of a "Trespassers WILL be shot" warning.

You should look at parameters like "I/O PIN SOURCE CURRENT vs. OUTPUT VOLTAGE" and determine the minimum voltage needed and then see what current it can handle and then you should look up the total allowed dissipation (per package) and derate accordingly, as it cannot drive all I/O with max. current at the same time.

Depending on the specs of the LEDs and the number concurrently driven, you'll probably end up somewhere around the 5mA to 15mA mark, but allways do the math.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline Conscripted

  • Robot Overlord
  • ****
  • Posts: 291
  • Helpful? 10
Re: $50 dollar robot modification question - LED light mini-show.
« Reply #11 on: November 28, 2009, 09:29:32 AM »
I stated that 40 mA was the MAX and recommended a 330 ohm resistor which should give a current of 15 mA at 5 volts. I don't think I provided any inaccurate information.

conscripted

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: $50 dollar robot modification question - LED light mini-show.
« Reply #12 on: November 29, 2009, 07:26:49 PM »
Hi,

40mA is not max., it's the Absolute Max. (which is a common term in datasheets telling you, that if you're here, you've gone too far). It's a magnitude that you shouldn't ever go near, simple as that!
I find "max." and "absolute max." to be a quite important distinction and I don't find it the least bit accurate stating that
Quote
According to the data sheet for the ATMEGA8 can provide a MAXIMUM of 40 mA per IO pin
Just mentioning that number will even make some people think it's OK to use and they'll happily forget the 330 Ohm you mentioned (which won't even allow 15mA, but rather from 4mA to 10mA depending on LED color at 5V supply).
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline Andrew_WaltfeldTopic starter

  • Jr. Member
  • **
  • Posts: 8
  • Helpful? 0
Re: $50 dollar robot modification question - LED light mini-show.
« Reply #13 on: December 02, 2009, 10:39:37 AM »
so, should i go with the 330 ohm resistors for the LED's then?

Are the LED's that i pointed to fine for the job?

I had to present my currently dead robot, a problem i am currently solving, but for right now, my robot is on the back burner, but I am still trying to proceed with this project. (not one to leave things unfinished) Soon as I am done with the current college workload, I'll be starting this project back up again.
« Last Edit: December 02, 2009, 12:22:44 PM by Andrew_Waltfeld »

 


Get Your Ad Here

data_list