Science Project - 10-yr old needs help with PIC Led Flashing Circuit

Thread Starter

szot

Joined Jan 5, 2010
16
Hi everyone,
I am hoping that you might be able to help my 10-yr old complete a science project that she has been diligently working on over Christmas break. She decided to try to build a flashing LED sign like the one shown here: http://blog.makezine.com/archive/2008/10/ultimate_led_fan_sign_pdf.html

BACKGROUND:
She has enjoyed electronics summer camps the past couple of years where she learned some basic circuitry and how to solder. But we both agreed that the schematic for the Ultimate Fan Sign was too ambitious for us to complete from scratch. I really wanted this to be "her" project so I purchased a kit that I thought she could assemble with minimal adult intervention and that would accomplish a similar outcome. She just completed assembly and it looks great. Even though the instructions were not written for a 10-yr old, I am 98% sure that it was properly assembled and that her solder joints are effective. She understands how the circuit/components work and is so excited by what she has 'almost' accomplished.

PROBLEM:
I have no background in electronics and the instructions don't explain how exactly to calculate the amount of power that the circuit needs NOR do they explain how to connect power to the 3-input terminal (especially if I need to use 3x9Vs to power 100 LEDs). I don't know what hole is positive, ground (I think is the middle, but what do I connect that to?), negative, etc. We hope that once we get some step-by-step guidance on how to connect the power, we will be up and running. Of course, it is possible that we have bigger issues...but for now we just want to get power to the circuit and see where we are at.

HELP NEEDED:
1) we could use some detailed instructions on where/how/how much to connect the power.

I am attaching the schematic and pictures of both the top/bottom of the circuit that my daughter assembled and soldered.

Thanks for your help!
Stacy (mom to Katie, future "Juice" major)
 

Attachments

SgtWookie

Joined Jul 17, 2007
22,230
Hi Stacy,
Welcome to the Forums. :)

Looks like Katie has done a nice job soldering the kit together. Tell her "Well Done!" :D

On the board, you have a blue terminal block with three screws in the top of it; there are holes on the side that's not visible where you can insert wires, then tighten the screws down to hold them attached.

The terminal closest to the row of switches is the GND (ground) terminal. This is where the negative terminals to both batteries will connect.

The middle terminal is labeled "9V-12V". You connect the + terminal of a 9v battery to it. Optionally, you could use a 9vDC "wall wart" power supply.

The far terminal is labeled "9v-45v". This is where you can connect another 9v battery + terminal. This 2nd battery terminal - goes to the GND terminal.

[eta]
I just went in and re-read the instructions for the project.
R1 through R8 (they're all together on the right) should be 470 Ohm, which is yellow-violet-brown (gold or silver band indicates tolerance of 5% or 10%; it doesn't matter which way they are installed)
R9 should be 1k Ohm, which is brown-black-red with a gold or silver band at the end.
You will be OK with these values using a 9v battery.

What follows after this is how to figure out the resistance values you'll need if you decide to use a different power supply.

But, you need to make some calculations here (oh boy, math - here comes the tricky part, right?) ;)

You don't want more than about 20mA of current flowing through standard LEDs. You use resistors to limit the current.

Without knowing the specifications on your LEDs, I'll venture a guess that the red LEDs have a Vf (forward voltage) of about 2v, and the green LEDs have a Vf of about 2.5v

The ULM2003 is going to have a Vce (voltage from the collector to emitter) of about 0.7v with a light current load.

There is a row of resistors soldered in on the right side of the board, labeled R1 through R8. Those are where the LED current limiting resistors are; currently they are 470 Ohms.

Anyway, let's assume that you're going to use a standard 9v "transistor" battery. When brand new, they will have about 8.6v output with a light load.

So, to calculate the current limiting resistors for the LED, the basic formula is:
Rlimit >= (Vsupply - Vf_LED(total)) / Desired_Current
But, we also have to subtract the Vce of the ULN2003.

So now we have:
Rlimit >= (8.6v - (2v+2.5v+0.7v)) / 20mA
Rlimit >= (8.6v - 5.2) / 0.02A
Rlimit >= 3.4 / 0.02
Rlimit >= 170 Ohms
If your current limiting resistors are greater than 170 Ohms, you should be OK using a 9v battery to power the LEDs.
 
Last edited:

Thread Starter

szot

Joined Jan 5, 2010
16
SgtWookie,

Thank you so much for your quick reply, clear explanation, and words of encouragement. I look forward to passing them along to Katie when she gets home from school.

In the meantime, I connected a 9v snap connector to the terminal and tried to get a couple of better pictures of the top of the board. Let me know if they still aren't as clear/close as you need to evaluate it. I also tried a 9v and nothing happens when I switch the dip switch buttons ON...

I might be getting ahead of myself with this, but once we get this circuit operating and she adds more LEDs, how can we add more than 1 more 9v terminal so that it can remain a battery-powered sign? (Science fair rules are that she can't use DC power...and we want the sign to be portable.)

Thank you again!
Stacy
 

Attachments

Wendy

Joined Mar 24, 2008
23,421
Interesting, you have your stuff together.

What do you mean you can't use DC power? Do they require a wall wart?

Making something like this dual power (automatically switch between a wall wart or a battery) is pretty easy, but I'm going to step aside and let you and Wookie work together. Too many cooks and too many voices have a lot in common.
 

Thread Starter

szot

Joined Jan 5, 2010
16
Thank you for your reply Bill. The science fair rules state that because of limited wall outlets, the kids cannot rely on being able to plug in their projects....they need to operate stand-alone on battery power.

Thanks again,
Stacy
 

SgtWookie

Joined Jul 17, 2007
22,230
Hi again Stacy,
OK, you have connected power to the uC (microcontroller) side, but not to the LED side.

Two ways you can add power to the LED side:
1) Add a small wire jumper between the 9v-45v and 9v-12v terminals, or
2) Add another 9v battery snap connector, the negative (black) lead going to the GND terminal (you'll have both snap connector black leads hooked there) and the positive (red) lead connected to the 9v-45v terminal.

Did they send the magazine article along with the kit instructions?

If not, I found it online last night while looking at your post. It's rather large though. It explains the switch settings and how it works.
 

Thread Starter

szot

Joined Jan 5, 2010
16
Thank you SgtWookie. I connected another snap connector as you directed (black to GND and red to the other 9v-45v port)...still nothing =(

Assuming that we have it powered correctly, is there a simple (dare I say inexpensive?!) device that would be available locally (read, Radio Shack) that I could use to determine where the power is getting to?

They did not include the article from Dec 2002 and I searched and searched, but could not locate it online. Can you please post the link for me?

Thank you again for your continued help.
Stacy
 

SgtWookie

Joined Jul 17, 2007
22,230
Radio Shack carries battery holders. You're going to want this project to flash for a long time.

Here is a battery holder for 8 "AA" batteries:
http://www.radioshack.com/product/index.jsp?productId=2062242
This will give 12v output, which will be fine.
9v "transistor" batteries might be rated for anywhere between 150mAh and 500mAh.
Typical "AA" batteries are rated in the neighborhood from 1800mAh to 2500mAh.
This means that using AA batteries to power the project will allow it to operate for much longer before having to replace the batteries.

If you are going to use the 8-AA battery holder, use a small U-shaped jumper between the 9v-45v terminal and 9v-12v terminal; and attach the 9v snap connector as you have it now.

One problem with the project is that it is quite small. It might tempt someone to put it in their pocket and walk out with it. It would help to prevent that if the project were mounted on a large object like a piece of wood.

Also, the LEDs are kind of "flapping in the breeze". This makes them easy to get bent up and shorted out.

You might consider getting a multi-purpose type PCB (printed circuit board) to mount the LEDs on. Radio Shack has a few that would work, including this one:
http://www.radioshack.com/product/index.jsp?productId=2102845

But get the project working as it is first.
 

SgtWookie

Joined Jul 17, 2007
22,230
Thank you SgtWookie. I connected another snap connector as you directed (black to GND and red to the other 9v-45v port)...still nothing =(
OK, don't panic. :)
It may be that the LEDs are connected up incorrectly.

You did a great job on the new photos; unfortunately I can't see enough details on the LED to verify if they are connected correctly because they are translucent; and the details don't show up well in a photo.

Here is a drawing of the "guts" of a typical LED:

Note which lead is the anode, and which lead is the cathode. Note that the cathode (the side that goes towards ground) is connected to the larger internal portion that contains the bowl-shaped reflector. Note also that many LEDs have a flat spot on the cathode side; not all of them do.

Please double-check that all LEDs are connected so that the cathodes are towards the resistors (R1-R8) on the board, and the anodes are connected towards the wire that is connected to the hole on the board labeled COM (the blue wire.)

Assuming that we have it powered correctly, is there a simple (dare I say inexpensive?!) device that would be available locally (read, Radio Shack) that I could use to determine where the power is getting to?
Even though the soldering looked pretty good on the 1st photos you posted, it's still possible that she may have a small solder ball or sliver of wire shorting something out, or that the crystal is damaged. Can you take another photo of the bottom of the board?

They did not include the article from Dec 2002 and I searched and searched, but could not locate it online. Can you please post the link for me?
Here it is; it's large (5.3mb):
http://notes.ump.edu.my/fkee/e-Maga...ronics Epe 1999-2005/EPE/2002/EPE 2002-12.pdf

You will need Adobe Acrobat Reader to view it. You can download Adobe Reader for free at http://www.adobe.com

The original is somewhat different, but don't let that throw you.
 

Attachments

Last edited:

Thread Starter

szot

Joined Jan 5, 2010
16
Okay, I will follow your advice about the batteries. She is going to mount the LEDs on a large "USA" sign. Once we get this circuit working her plan is to add more LEDs (about 90) to spell out U S A in flashing letters.

Here are a couple updated pictures of what it looks like right now in case that helps. Assuming that i have it correct, do you have any suggestions on what I can use/purchase to help us determine where there might be a break in the power.

Thank you SgtWookie...you have been the only person that has been able to help us!
Stacy
 

Attachments

Thread Starter

szot

Joined Jan 5, 2010
16
I think I was posting as you were replying. I am not panicking...yet =)

Here is what I have done:
1) I confirmed that the LEDs are corrected with the cathodes on the side of the resistors. The diagram of the LED was very helpful.

2) I also examined all of the solder points to see if I could find anything like you suggested...nothing that I can see with a magnifying glass.

3) i tried to get some better zoomed in pics of the board...it is tough even with my Canon S5. It has a hard time detecting what it should focus in on...

So, how many science project "Acknowledgments" sections have you been included in over the years?! I am just thinking how funny it will be for my daughter to acknowledge "SgtWookie - for helping me troubleshoot my circuit board!"
 

Wendy

Joined Mar 24, 2008
23,421
At the local electronic/computer flea market they put a loose net over everything to prevent the walk away problem. It is easy to move if you need to let judges and interested parties see it, but it is also a deterrent for those with evil in their hearts when you're not there.
 

SgtWookie

Joined Jul 17, 2007
22,230
I think I was posting as you were replying. I am not panicking...yet =)

Here is what I have done:
1) I confirmed that the LEDs are corrected with the cathodes on the side of the resistors. The diagram of the LED was very helpful.
Glad that helped. It's one of those things that you can figure out by trial-and-error, but it makes it easier if you know what to look for right at the start.

2) I also examined all of the solder points to see if I could find anything like you suggested...nothing that I can see with a magnifying glass.
OK. Did all of the solder joints look bright and shiny and like they're "wet"? If the solder didn't flow properly, it might look like a ball, or have a dull gray surface.

3) I tried to get some better zoomed in pics of the board...it is tough even with my Canon S5. It has a hard time detecting what it should focus in on...
You might've been too close for it to focus. Getting back a bit further will help. Having plenty of light will help even more.

Does she have a DMM? Digital multimeter? It's a pretty basic tool for electronics. The next step will be measuring voltages at various points in the circuit.

So, how many science project "Acknowledgments" sections have you been included in over the years?! I am just thinking how funny it will be for my daughter to acknowledge "SgtWookie - for helping me troubleshoot my circuit board!"
I don't need any acknowledgements ;)
 

Thread Starter

szot

Joined Jan 5, 2010
16
Well, here's the latest...good news and bad news (but not too bad!)

After re-reading your posts SgtWookie, I realized that we didn't have the 2nd 9v connected to power the LEDs (we just had the one powering the micro controllers.) Got that fixed and then I headed to school to pick up my daughter and it was off to the local electronics repair shop to beg for help (we don't own a multimeter and it was clear that was our next step).

A kind technician took pity on us once my daughter explained everything that she had done. This kind man took us into the back and proceeded to spend an hour troubleshooting the circuit and teaching my daughter about the different components and explaining what he was doing. In between compliments on my daughter's soldering skills ;-P, he used the multimeter and quickly discovered that the 7805 5v regulator (the second component that the power was running to) was getting power to it, but nothing was coming out of it. As we tested some more we saw the LEDs light up as he touched the R1-R8 resistor contacts. HALLELUJAH! It was like Christmas all over again!

Still though we weren't sure if the circuit was working properly so he by-passed the 5v regulator by running a 5v power supply directly to the micro controllers and Presto, the LEDs started flashing and Katie was able to adjust the pins to make them do different patterns/speeds. My daughter went from very discouraged to so excited in about 2 seconds! That's the stuff that mom-hood is all about!

Unfortunately, Radio Shack is apparently not in the electronics business anymore (instead they just sell phones), so we were not able to find a replacement 78L05 and have to wait for it to be delivered by the company that sent the kit with the bad one in it (Al mumbled something about it being "junk" made in Korea) =) He also made sure that Katie knew what a terrific job that she did assembling the kit and how it wasn't her fault!

I know that we still have a long way to go, but this has been such a worthwhile project already. You can't buy this kind of experience for your kids...it truly is priceless.

Thanks again Bill and SgtWookie for all of your time and energy in helping us. I can't wait to post pics of the finished project hopefully next week sometime!

Until then,
Stacy

P.S. we are heading back to the electronics repair shop tomorrow to pay a visit to Al and deliver a basket of fresh fruit (his favorite apparently). SgtWookie, if you will send me your address, I would like my daughter to send you a thank you as well.
 

SgtWookie

Joined Jul 17, 2007
22,230
The 7805 regulator would work, but the TO-220 package is much too large to fit in the circuit board they have. They really need a 78L05, which is in a small TO-92 package.

That was really nice of the technician to help troubleshoot Katie's project. Glad it turned out to be something simple.

DMM (digital multimeter) - this is a basic tool that any aspiring electronics person must have.
I see you have a Harbor Freight Tools located in your town.
Harbor Freight USA
3302 CAPITAL BLVD.
RALEIGH, NC 27604
They've had DMM's like these:
http://www.harborfreight.com/cpi/ctaf/displayitem.taf?Itemnumber=90899
http://www.harborfreight.com/cpi/ctaf/displayitem.taf?Itemnumber=98025
...on sale regularly; the sale prices have been as low as $2.99.
These are very handy little meters, and they also have a transistor test and diode test function. You can even use the diode test function to light up many LEDs to see if they are working. They are cheap enough so if they get broken or stop working, you won't break down in tears. ;)

She is going to need some help figuring out how to operate 90 LEDs from that board.

Red LEDs usually operate from lower voltages than other colors; usually 1.7v-2.2v
Amber is in the next voltage range; maybe 2v-3v.
Then comes green; 2.2v-3.2v
Blue is usually 3.2v to 3.8v.
White is usually about 3.4v-4v.

It will be helpful to obtain LEDs that are all rated for the same current.

You must be cautioned that super-bright LEDs can cause permanent loss of vision if one stares at them for a period of time. It's sort of like staring at the sun, but since the light isn't hot like the sun is, the damage to the retina occurs without any real warning. They basically burn spots in the retina.

The focus of the LED will be important for her project. You will want the sign to be visible from a wide angle. Many LEDs are focused for a very narrow viewing area, and these would not be suitable for her project. You would want LEDs that had at least a 70° viewing area; the wider the better.
 

Thread Starter

szot

Joined Jan 5, 2010
16
Thanks as always. I did go to another Radio Shack and they had a 7805 that was, as you said SgtWookie, too big for her circuit. However, when we returned to the electronics repair shop to deliver a thank you gift, Mr. Al had located one that he gave her. She soldered it on this morning and the circuit is working like a champ. She is so excited!

Unfortunately, I had already ordered some super bright LEDs last week (100 each in red, blue and white) they all look white in the package ...translucent actually. Here is the link to what I bought: http://cgi.ebay.com/ws/eBayISAPI.dl...&_trkparms=algo=LVI&its=I&otn=2#ht_1615wt_958

I hope that I didn't buy junk or too high intensity that is going to harm anyone! Unfortunately, I think that they are only 20 degree. If I need to, I can order some different ones, but I am hoping that these will work so that she can construct the sign this weekend.
Thx!
Stacy
 

SgtWookie

Joined Jul 17, 2007
22,230
That was very nice of Mr. Al to go to that trouble for you and Katie!

OK, on the LEDs - yeah, the're going to be bright and narrowly focused.

Did you get the 3mm or 5mm?

The good news is - you can make them work.
The bad news is - it's going to take some work to make them work! (isn't that always the case?)
The solution involves using a file or sandpaper or nail file (I'll bet you have plenty of the latter!) to make the lens of the LED more flat, and translucent. This will spread the light so that it will be visible over a wider area instead of being so concentrated in one direction. It doesn't have to be precise.

But before you even start in on that, we need to know what the typical Vf @ current rating is for each color of LED.

The reds will probably be around 2v, as I mentioned before. The blues, probably around 3v. The white are going to have the highest Vf.

It's going to take some planning beforehand - otherwise, she won't be happy with the results.

You will probably have to make a trip to Radio Shack or to Mr. Al to get some more resistors.

Did you find a battery holder for 8 "AA" size? Or is that something that'll have to be ordered?
 

hgmjr

Joined Jan 28, 2005
9,027
Greetings Stacy,

Congratulations on your daughter's successful completion of her first electronics project. I too am impressed with the quality of the soldering effort that your daughter has demonstrated.

It would appear that she has been bitten by the electronics bug. There are so many fantastic and interesting things that can be done with electronics. The LED flashing circuit is but the tip of a very large iceberg.

Please be sure to keep our little forum in mind as your daughter continues to pursue her interest in electronics.

hgmjr
 

Thread Starter

szot

Joined Jan 5, 2010
16
I bought the 5mm size. I can't find the specifications on the LEDs on the website or the packages that they sent.

I will read up on the calculations for figuring out the amount of power that we will need. I had read that we would need to add resistors at some point...

Thx for the note hgmjr. We appreciate the courtesy and information that so many on this board have extended us. My daughter and I have learned so much already...I am pretty sure that this is not just a passing interest for Katie - so, I think we will be back!
 
Top