Burning a board while controlling a motor - what went wrong?

Hi all,
I'm very new to this and I was trying to setup a motor control that would simply switch on a motor at a given temperature.

Everything seemed to be going well until I plugged in my USB port to try and read the serial data. The programs I was using are attached as well as my circuit diagram. When I plugged in the USB it worked for about 1 min (giving the wrong temp values - I was still debugging) and then I suddenly lost contact with the board. The chip in the circle (see jpg image) got hot and now the board does not show up when I plug it in.

If I plug in USB or Vin it turns on (led goes on) and the reset button makes the pin13 led flash, but it has stopped showing up in my /dev/

circuit.pdf - my circuit diagram
ShowTemp.py - python scrip to print the value
sketch_motorControl.pde - my arduino program
ArduinoUnoFront.jpg - the chip that got hot

Ubuntu 10.10
python 2.6
Arduino 0022

Thanks!

circuit.pdf (464 KB)

ShowTemp.py (250 Bytes)

sketch_motorControl.pde (4.78 KB)

Very strange. Can you tell us more about that 12V power supply?

Can you try removing the ATmega328P from the Uno? See if it enumerates as a USB device then.

--
The Ruggeduino: compatible with Arduino UNO, 24V operation, all I/O's fused and protected

Could be that you have a short somewhere, bad wiring resulting in a short, or you tried to power the motor thru the onboard regulator chip and burned the chip up.

@RuggedCircuits: The power supply is a Hewlett Packard, class 2 transformer, part number 0957-2110, Input: 120VAC 60Hz 20W, Output: 12.0VDC 1.0A L.P.S. I tried taking the ATMega out of the uno and it powered up when I plugged in USB, but still didn't show up in /dev/

@zoomkat: I could see that. I had it simply turning the motor on for 7s then off for 7s before I starting putting the temp reading in. It did that happily for about 20 min, then I plugged in the serial, loaded up the program posted and it fried. What two wires could have done that do you think?

It seems that my current Arduino is dead and this would become a really expensive hobby if I kill one per project!

What two wires could have done that do you think?

One between +5v and ground. Perhaps when you were plugging in the serial something came lose or got changed. Do you have the motor connected to the arduino +5v and ground?

The power supply is a Hewlett Packard, class 2 transformer, part number 0957-2110, Input: 120VAC 60Hz 20W, Output: 12.0VDC 1.0A L.P.S. I tried taking the ATMega out of the uno and it powered up when I plugged in USB, but still didn't show up in /dev/

Hmm....this looks like a linear unregulated transformer, whose output may well be 12V at 1A load but quite a bit higher under light loads (like an Arduino). Can you measure the output voltage of this transformer with nothing plugged in? If it's >15V it could well explain why your voltage regulator burned out.

--
Beat707: MIDI drum machine / sequencer / groove-box for Arduino

Confirmed...The voltage was at 18V when I measured it with a multimeter. What sort of transformer should I use for my application?

Also, if I use a 12V wall-wart to power the board through the power jack, can I run the motor from the voltage produced at the Vin pin, or would this burn the board out too?

Thanks!

You can use a switching regulator transformer, like this one:

http://www.mpja.com/11VDC-800mA-PLUG-SUPPLY/productinfo/18884+PS/

I wouldn't run motor power through the Vin pin. People experience lots of trouble when they try to share a power supply between motors and the Arduino. Not necessarily burning out the board (should be safe for currents <500mA), but noise issues and "erratic behavior" due to the noise produced by the motors.

--
The Basic Motor Driver: simple, inexpensive motor driver for 1 stepper motor or 2 DC motors

Thanks for all the help RC.

Just to make sure, if I am using another power supply, it is still safe to tether the -'ves of everything together so that the transistor switch will work? Also, I noticed on your website that the Mosfet should have a 220 ohm resistor between the digital out and the MOSFET (unless I get one of your ruggeduinos). Should I do that?

Thanks.

At your current levels (<800mA) it should work well enough to tether the grounds together. Just try to keep them as physically separate as possible: trace the path the electrons follow from the power supply, to the motor, and back to the power supply, and try to make that path have as little in common as possible with the similar path that electrons follow to the Arduino and back.

And yes, you're right the gate of the MOSFET should have a 220 ohm resistor (or so) in series with it and the Arduino pin.

--
The Flexible MIDI Shield: MIDI IN/OUT, stacking headers, your choice of I/O pins