NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Basic Electronics » Schematics for LED Heart Project?

November 11, 2009
by mt03f
mt03f's Avatar

I'm new to electronics but this LED Heart project sounds like fun.

I was wondering if there were any schematics I could follow to connect all the wires and components to the AtMega168 and the breadboard.

Or if anyone could offer their help in explaining the steps I need to take to make the proper connections as they are not very clear on the pictures.

Thanks in advance!

November 11, 2009
by hevans
(NerdKits Staff)

hevans's Avatar

Hi mo0f,

The led heart is certainly a fun project. I know it might not seem like it, but the schematic presented under LED Wiring Plan, of the LED Heart Video Tutorial really is the schematic we used. There is one "row" wire that runs all the way around the heart, pairs of LEDs are connected to it alternating anode and cathode. The other lead of each of these LEDs is connected together to one wire and connected to the indicated pin on the MCU. On that schematic PB1, PB2, PC5, etc, all refer to the actual MCU pins as defined in the ATmega168 datasheet.

The reasoning behind this wiring scheme can probably become more clear if you familiarize yourself with the LED Array. For the LED heart we used basically the same scheme, except we only use one "row" and wrap that row around the heart. Let me know if it still doesn't make sense, ill try to be more clear.

Humberto

November 11, 2009
by mt03f
mt03f's Avatar

Hello Humberto!

Thanks for the quick reply. I follow everything explained on the tutorial. I have actually done all the soldering already.

I apologize for phrasing my original question so bad. I was more curious about how to build the actual circuit. On the images provided, I see that there are resistors, capacitors, and other stuff connected to the microcontroller, but I'm not sure where they go.

I have shown below what I have so far:

LED Heart Circuit

Also, how should I connect the microcontroller to be programmed?

Any help is gladly appreciated.

November 11, 2009
by mikedoug
mikedoug's Avatar

With the last question you posed, I think the first thing to do would be to follow the nerdkit guide. It's sole purpose is to get you setup so that things are A) tested as in good operable condition, and B) for you to start programming with immediately.

If you don't want to do that for some reason, then let's see what we can do: From your schematic above, you've only got the very basics done. You also need to connect GND to pin 8, and the +5V (from the 7805CT's OUT port) to pins 1, 7, and 21.

Then, as a bare minimum for programming, you need to wire the RS232 port with power (+5 V for the red wire, GND for the black wire, and then the yellow wire goes to pin 2 (RXD) and green wire into pin 3 (TXD). Pins 2 and 3 are used by the internal UART of the MPU.

Once you have that done, programming is easy. To enable programming, turn the system off (I unplug ground from the power), wire pin 14 to GND, and then turn the power on. The MPU will be ready for programming. After programming (by following the NerdKit guide), you'll power it off, and remove the GND jumper on pin 14.

If you want the LCD that came with the NerdKit to work you'll have to refer to the NerdKit Guide for it's wiring -- that's a bit more complicated, and I don't want to trace my cables to remember WHERE things go. :)

Really, you just need to go through the NerdKit Guide... It's got important details about many steps that people are probably not going to want to reiterate here.

I wish you fun!

MikeDoug

November 11, 2009
by mt03f
mt03f's Avatar

Thanks a bunch MikeDoug!!! I definitely need to read the NerdKit Guide in more detail. I should be able to get it all working between the guide and the explanation you provided.

I'm not really interested in the LCD for the moment. I want to get the LEDs working so I can build it in the left pocket of a lab coat later on. I think it would look cool being on top of my heart =)

Thanks again for the help!

November 11, 2009
by mikedoug
mikedoug's Avatar

One of the nice things about hooking up the LCD is that you can use it to spit out debug information in a really convenient manner. The same can be said for the RS232 port as well though.

Best of luck, let us know if you have any questions!

MikeDoug

November 12, 2009
by mt03f
mt03f's Avatar

I am now trying to program the MCU according to the guide. However, I have only been able to get as far as:

"Reading| ### | 3% 0.26s"

or

"Connecting to programmer", then it freezes and if I close the MDOS window my computer restarts.

or

"Writing | ###### | 11% 0.13s and then it freezes, again, when I close MDOS my computer restarts.

I have tried a few fresh batteries but the problem persists. What could be causing this?

November 12, 2009
by hevans
(NerdKits Staff)

hevans's Avatar

Hi mt03f,

I'm not entirely sure what is causing your issue, but there are a few things you could try. Send us an email at support <at> nerdkits.com with a good close up picture of your setup. Also include a screenshot of the command line or copy paste the text of the command line. I'm sure can get all this sorted out.

Humberto

November 12, 2009
by mikedoug
mikedoug's Avatar

Your computer restarts? As in it crashes?

November 12, 2009
by mt03f
mt03f's Avatar

Hi MikeDoug,

Yes, it makes my computer crash. I have double and triple checked all my connections, changed batteries multiple times, but I can't come up with anything.

I am putting together a file to send to the NedrKit's support with a few images of my setup and screen shots to help me figure out what I'm doing wrong.

Also, are the programmer LEDs supposed to be on? For the first time today one of them turned on (the one closest to the serial port).

Mara.

November 12, 2009
by mikedoug
mikedoug's Avatar

Hrm... I'd be interested in seeing the photos and the screen shots as well; if you wish to include me: mikedoug@mikedoug.net.

It's very odd that your computer crashes -- the only thing that should be able to cause your computer to crash is a buggy driver. What OS are you running on your computer, and what driver are you using for the (I assume) USB-to-RS232 device? I had a problem with my Vista 64-bit system crashing, but not in the way you are experiencing...

Don't give up! The struggle is only half of the time, the joy of success is sweet! I just got done completely re-writing a software UART implementation that I found (the one I found was a touch heavy on dependencies for me) -- I know that I'm about to try to compile it, only to spend at least an hour fixing compilation issues -- not to mention how much time I'm going to debug it until it works properly.

I look forward to it though, because the success is oh so sweet. :)

MikeDoug

November 12, 2009
by mikedoug
mikedoug's Avatar

Oh, and the LEDs on the RS232 board indicate data transmission. If the light closest to the RS232 connector lights up, that means transmissions are going TO the computer FROM the nerdkit. If the one nearest the 4-wire connector, then you are receiving data from the computer.

Post a Reply

Please log in to post a reply.

Did you know that you can impress a loved one with a digitally-controlled Valentine's Day Card with randomly twinkling LEDs? Learn more...