Damaged my Mega trying to supply voltage on Vin. What did I do wrong?

Hi,

Yes I'm new to building hardware circuits (I'm a software guy). I'm trying to integrate my Arduino based circuit boards into an old A/C powered EM pinball machine. Everything was working while running the Arduino off my laptop's USB plug.

The final step was to switch the Arduino to running off power from the machine. I built a board that takes 17V AC in, runs it through a bridge rectifier and an LM317 voltage regulator to get 9.7V DC out. I then plugged the positive output to VIN on the Arduino and the other output to GND. When I flipped the switch, I got a spectacular sparking light show until I turned it off.

Looking at the board, I fried something right by the USB input jack. Odd thing is I can still upload programs to the board and run them and they still seem to work so I don't know what I destroyed.

I assume I went wrong with not calculating the correct power/amperage into the board. If so, what do I need to do to make the power correct for VIN? Also, do I need to hookup the other line from the voltage regulator to the Arduino GND? If so, does it matter which GND I use?

Thanks.

You might get better help if you change the title from light show to a more relevant title about power in or something

Can we see a schematic?

You may have fried the onboard 5V regulator. What are you powering through the board?

The on-board regulator can't supply much current. The exact limit depends on the supplied voltage the more voltage you "drop" across the regulator the hotter it gets and the less current it can supply. It also depends on the ambient temperature... It will get hotter on a hot day or in a hot car, and it's usually the (internal) heat that kills it.

But, the regulator has pretty-good built-in protection and it usually shuts-down safely & temporarily with over-current or over-heat.

You can check to see if the voltage regulator is permanently fried by running the Blink Example with nothing but 9V power connected to the Arduino.

built a board that takes 17V AC in, runs it through a bridge rectifier and an LM317 voltage regulator to get 9.7V DC out.

Is there a filter capacitor on the DC side of the bridge rectifier (at least 1000uf)? Does the MP317 have the other smaller capacitors shown on the datasheet? It may be oscillating.

Also, the I/O pins can't directly "power" much more than one or two regular-little LEDs.

Also the

Without a schematic showing what you have I am only guessing, have a look at this:


From your description I suspect you might have connected ground to both sides of the bridge rectifier. Please post a schematic of what you actually did.

Why produce 9.7 volt? Why not make 5.0 volt connected to Arduino +5? The LM317 will of course need a Little bit bigger heatsink.

Railroader: Why produce 9.7 volt? Why not make 5.0 volt connected to Arduino +5? The LM317 will of course need a Little bit bigger heatsink.

Better still a buck converter.

Very predictable sequence of answers here!

This is basically what I have where:
R1 = 180 ohm
R2 = 1200 ohm
All the grounds on the right side of “DC” are all connected together and tied to one of the Arduino GND lines.

On 17-18V AC input, I’m getting a steady 9.7V DC output which I fed into the VIN line.

The Arduino isn’t driving anything; it’s just being used to measure voltages across multiple A/C lines using optocouplers.

There is nothing wrong with the schematic, so the problem is in the wiring that you forgot to post

5V phone chargers, connected to the 5V pin and GND, are popular and reasonably safe.

I tested my Arduino with a 9V battery and it worked fine so I hooked just the Arduino up to my power supply board and that also worked fine. I then reconnected the Arduino with the other circuit boards I'm using and supplied my bench power from my variac and that also works.

Now all that's left is to plug everything back into the machine's power lines and see if that works; if it fries again then it's something with the machine that I'm not understanding.

PerryBebbington: From your description I suspect you might have connected ground to both sides of the bridge rectifier. Please post a schematic of what you actually did.

Heck, I want to see a video- I love an exciting light show.

edhalsim: Now all that's left is to plug everything back into the machine's power lines and see if that works; if it fries again then it's something with the machine that I'm not understanding.

If you make the same connections as before, you should expect the same result.

We can only sit back and watch the show unless you first give us a complete description of everything you are connecting up with the necessary schematic diagram - and preferably some photos. :roll_eyes:

(Photos must always be taken in bright daylight shade! Otherwise useless. :astonished: )

Clear, sharp, full frame photos... you’d be surprised at some of the crap that gets uploaded!

Yes.

Recently noted - the socket headers on UNOs are black. The sleeves on "Dupont" pins are black. An inadequately lit photo certainly does not facilitate verifying whether they have been connected in the right place.