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.

Support Forum » What Did I Fry?

August 05, 2012
by flare
flare's Avatar

I accidentally connected the 9V battery directly to the power strip (bypassing the power regulator).

Now the LCD does not display anything under power. It used to work, but now does not.

I am brand new at this stuff. I'm a tenth grader.

What is most likely wrong? How to test it? What needs replacing?

August 06, 2012
by bretm
bretm's Avatar

Are you saying the LCD doesn't display anything but the microcontroller is still working, or that's what you need to determine? To check if it's the microcontroller, just try to reprogram it (upload the LED blinker program to it or something). If that works and the PC says it was successful, then assembly the LED blinker project and see if the LED blinker program actually works. If that works, then the microcontroller is OK and the problem actually is the LCD.

But I would guess the microcontroller is not OK. 9V is well over the maximum rating. www.nerdkits.com/store has replacements for $6.

August 06, 2012
by bretm
bretm's Avatar

*assemble

August 07, 2012
by flare
flare's Avatar

i tried to upload the blinker program, but all that happened was that i got an error message. i changed the upload address, yet it still says it cannot find the path. this is what it said:

Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:UsersOwner>cd c:usersownerdownloadscodeled_blink

c:UsersOwnerDownloadsCodeled_blink>make make -C ../libnerdkits make[1]: Entering directory c:/Users/Owner/Downloads/Code/libnerdkits' make[1]: Nothing to be done forall'. make[1]: Leaving directory `c:/Users/Owner/Downloads/Code/libnerdkits' avr-gcc -g -Os -Wall -mmcu=atmega168 -Wl,-u,vfprintf -lprintf_flt -Wl,-u,vfscan f -lscanf_flt -lm -o led_blink.o led_blink.c ../libnerdkits/delay.o ../libnerdki ts/lcd.o ../libnerdkits/uart.o avr-objcopy -j .text -O ihex led_blink.o led_blink.hex avrdude -c avr109 -p m168 -b 115200 -P /dev/ttyCOM4 -U flash:w:led_blink.hex:a avrdude: ser_open(): can't open device "/dev/ttyCOM4": The system cannot find th e path specified.

make: *** [led_blink-upload] Error 1

c:UsersOwnerDownloadsCodeled_blink>make avrdude -c avr109 -p m168 -b 115200 -P /dev/COM4 -U flash:w:led_blink.hex:a avrdude: ser_open(): can't open device "/dev/COM4": The system cannot find the p ath specified.

make: *** [led_blink-upload] Error 1

c:UsersOwnerDownloadsCodeled_blink>

August 07, 2012
by pcbolt
pcbolt's Avatar

Hi flare -

The line in your makefile that specifies the COM port is incorrect. Looks like you have a combination of some Linux and Windows mashed together. It should read:

AVRDUDEFLAGS=-c avr109 -p m168 -b 115200 -P COM4

Just make sure COM4 is the port your USB/Serial cable is labelled inside the Windows device manager (control panel->system->hardware->device manager->ports). It should be labelled "Prolific USB/Serial". Also, make sure you use -P (capital letter) for the port flag in the line above.

August 08, 2012
by flare
flare's Avatar

This is Flare's dad.

We don't understand what you are saying. Neither of us writes code and we have no idea how we would have gotten a "combination of Linux and Windows mashed together."

We do appreciate your help, but what do you mean by "Just make sure COM4 is the port your USB/Serial cable is labelled inside the Windows device manager (control panel->system->hardware->device manager->ports)."?

I looked and yes, it is labeled in the control panel as Prolific USB-to-Serial Comm Port (COM4). If I plug it in to the other port it says(Com3) is that a problem? Do I have to use COM4?

And then, how do we " make sure you use -P (capital letter) for the port flag in the line above."?

August 08, 2012
by Rick_S
Rick_S's Avatar

Hello Flare's dad. Plain Smiley

What pcbolt meant was this.

In reading the text posted by Flare, we can see a common mistake in the error that was reported when the program was attemted to be sent to the microcontroller. The error is in the file called "makefile" in the program folder for the program that Flare tried to send to the microcontroller. If you open the file "makefile" (Prefferably with programmers notepad a program that should have installed with the WinAVR bundle) it should look something like this (only without the line numbers):

GCCFLAGS=-g -Os -Wall -mmcu=atmega168 
LINKFLAGS=-Wl,-u,vfprintf -lprintf_flt -Wl,-u,vfscanf -lscanf_flt -lm
AVRDUDEFLAGS=-c avr109 -p m168 -b 115200 -P /dev/ttyUSB0
LINKOBJECTS=../libnerdkits/delay.o ../libnerdkits/lcd.o ../libnerdkits/uart.o

all:    led_blink-upload

led_blink.hex:  led_blink.c
    make -C ../libnerdkits
    avr-gcc ${GCCFLAGS} ${LINKFLAGS} -o led_blink.o led_blink.c ${LINKOBJECTS}
    avr-objcopy -j .text -O ihex led_blink.o led_blink.hex

led_blink.ass:  led_blink.hex
    avr-objdump -S -d led_blink.o > led_blink.ass

led_blink-upload:   led_blink.hex
    avrdude ${AVRDUDEFLAGS} -U flash:w:led_blink.hex:a

The file as is, is set up to be used in a Linux environment, not Windows. You said that your prolific adapter was at COM4, that is fine and you can leave it plugged into that USB port to keep it there. The line that needs changed is this one:

AVRDUDEFLAGS=-c avr109 -p m168 -b 115200 -P /dev/ttyUSB0

And for COM4, it needs changed to this:

AVRDUDEFLAGS=-c avr109 -p m168 -b 115200 -P COM4

The problem you will most likely see is that the /dev/ was left in the line. Windows doesn't like this and it will not find the port. You can see that in the error message Flare got can't open device "/dev/COM4": .

Hope this helps clarify things a little,

Rick

August 08, 2012
by mongo
mongo's Avatar

One thing you might need to check... It can be com3 or com5 too.

August 08, 2012
by flare
flare's Avatar

now it says: Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:UsersOwner>cd downloads

C:UsersOwnerDownloads>cd codeled_blink

C:UsersOwnerDownloadsCodeled_blink>make avrdude -c avr109 -p m168 -b 115200 -P COM4 -U flash:w:led_blink.hex:a

Connecting to programmer: . Found programmer: Id = "Huh? Go"; type = ' Software Version = t. ; Hardware Version = '.S avrdude: error: buffered memory access not supported. Maybe it isn't a butterfly/AVR109 but a AVR910 device? make: *** [led_blink-upload] Error 1

C:UsersOwnerDownloadsCodeled_blink>

August 08, 2012
by flare
flare's Avatar

also, when i plug it in now it gets a bunch of random lines on the screen.

August 08, 2012
by pcbolt
pcbolt's Avatar

Hi flare -

Looks like you're making some progress. There is a bunch of forum and library threads about the problem you are seeing now. Check out some of these links...

Library Entry Forum Thread 1 Forum Thread 2

Also, see if you can upload an photo of your breadboard and LCD (see below for how-to). Let us know if it works.

August 09, 2012
by Medic8388
Medic8388's Avatar

Flare, Just so you know I literally just now did the exact same thing. I had two breadboards infront of me (one with the MCU and the other with my MOSFET circuit) and I was talking on the phone and conencted +12v to the wrong breadboard. Needless to say the 328p got very hot before I realized what happened. Not sure yet if I fried my LCD but a new 328p is already on the way (it's a good chance to pick up some smaller random parts too, I also ordered some MOSFETs and another LM34 since shipping is the same).

Oh and while I'm thinking about it, sometimes my computer changes the COM port when I plug in the USB cable. To check this you just right click on "my computer", go to properties, then hardware, then device manager. Scroll down until you see the line for COM/LPT and you should see your NerdKits cable there. To change the COM number right click on in and go into properties then "advanced". You can chance it from there if you need to. I find that easier than changing the code in my makefile when it happens.

.... I wish I could have got started on this in 10th grade. You've already got the expensive part out of the way. If you fry parts now they are pretty cheap and easy to replace.

August 10, 2012
by Ralphxyz
Ralphxyz's Avatar

I can not even begin to think of where I would be if I had a Nerdkit and the Nerdkits forum when I was in 10th grade.

The world would be a different place especially for me.

Hang in there Flare (and Dad) it will all come together and then ...

Ralph

August 10, 2012
by flare
flare's Avatar

here's some pics of the breadboard:

pic1 pic2 pic3 pic4

August 10, 2012
by pcbolt
pcbolt's Avatar

flare -

Glad you posted the various angles because at first it looked wrong but I think the wiring is correct. Some of the connections look a little shaky though. I don't like the looks of the USB cable connections in particular. The USB wire is flimsy and sometimes it get squashed when you try to insert it in the breadboard, but try as carefully as possible to straighten it out and give it a little twist then re-insert it into the board. If you can get about 3/8" (5mm) of the exposed wire into the breadboard you should get a good connection. (BTW the yellow wire looks good, the green and black look loose - don't worry about red just leave that alone). If you get the program to load after that but the LCD is still wonky try reconnecting those wires one at a time, but first see if you can get the program across.

August 11, 2012
by Ralphxyz
Ralphxyz's Avatar

Flare, you should have a resistor ( I use 330 ohm) on the cathode of the led.

If you leave the led on being driven by the mcu you could over amp the mcu.

The mcu will drive the led in pulses directly with out a resistor.

I put the led on the cathode as once I had it on the anode and "accidentally" touched power to the anode after the resistor and blew the led. If I had had the resistor on the cathode nothing would have happened besides the led lighting.

Also you will learn to use some discipline for your wiring colors.

I like:

 Power      Red
 Ground     Green or Black
 Data       Yellow

Of course when I am just knocking a circuit out on the breadboard I'll randomly use what ever I grab, but when I make up a actual working board I try to follow my rule..

Ralph

August 15, 2012
by Ralphxyz
Ralphxyz's Avatar

Hey Flare, how are you doing?

Ralph

August 15, 2012
by flare
flare's Avatar

Yes! i got the led_blink program on. now i know that the problem is the screen.

August 15, 2012
by pcbolt
pcbolt's Avatar

Flare -

Looks like your persistence paid off. Good going. Hopefully the LCD screen problem is just a loose wire or something. I've even had problems with the breadboard itself and only found out the trouble with a multimeter. If the LCD is kaput, you could try the "Tempsensor" project and see if you can get readings over the serial port by using Hyperterminal (if you have it) or some other program that can read your COMM4 input. Just remember the LCD is sensitive to the wiring connections so try ripping out the wires and start from scratch if you need to before chucking it away.

Post a Reply

Please log in to post a reply.

Did you know that a motor is harder to turn when its terminals are shorted together? Learn more...