Pages: [1]   Go Down
Author Topic: Arduino Mega 2560 ground pin short-circuiting?  (Read 1142 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey, I am really new to this so keep things simple if possible, but I'm having a strange problem with a simple circuit. What I've narrowed the problem down to is this:

I have a potentiometer connected so that a 5v pin goes to the middle terminal, one of the side terminals goes to Analog In pin A0, and the other leg goes to a ground pin. Basically, whenever I turn the pot.'s shaft so that close to 0v are going into pin A0, and thus close to 5v are going to the ground pin, the lights on the Arduino dim or shutoff and it smells like something's burning. This exact circuit worked a week ago perfectly, but now it does this and it appears the Arduino stops running its code, or at least stops looping the loop().

Why is this happening? Am I putting too much current into the ground pin? Why was it working before, but not now?
Thanks!
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 201
Posts: 8695
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a potentiometer connected so that a 5v pin goes to the middle terminal, one of the side terminals goes to Analog In pin A0, and the other leg goes to a ground pin.

Wrong connections!

CENTER/WIPER goes to A0
The ends go to +5V and Ground.

You have wired it to short-circuit the +5V supply when you get to the Ground end.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

oh, WOW! that was stupid! and very simple! thank you so much.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

oh, WOW! that was stupid! and very simple! thank you so much.

Can u tell me the code that you used?  The example codes that come with arduino ide, which uses pots, doesn't work with my mega, the one named ReadAnalogVoltage, the output at SerialMonitor is always 5v or 1023.
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 201
Posts: 8695
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

oh, WOW! that was stupid! and very simple! thank you so much.

Can u tell me the code that you used?  The example codes that come with arduino ide, which uses pots, doesn't work with my mega, the one named ReadAnalogVoltage, the output at SerialMonitor is always 5v or 1023.

Sounds like 0V end of your pot isn't connected to Ground.  That leaves you with your analog input pin connected through a variable resistor to the +5V pin so it always reads +5V.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

0
Offline Offline
Shannon Member
****
Karma: 200
Posts: 11694
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

oh, WOW! that was stupid! and very simple! thank you so much.

Can u tell me the code that you used?  The example codes that come with arduino ide, which uses pots, doesn't work with my mega, the one named ReadAnalogVoltage, the output at SerialMonitor is always 5v or 1023.

Sounds like 0V end of your pot isn't connected to Ground.  That leaves you with your analog input pin connected through a variable resistor to the +5V pin so it always reads +5V.

The bad way it was connected before would have burnt-out one end of the pot's track I'm afraid...
Logged

[ I won't respond to messages, use the forum please ]

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 46
Posts: 2865
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That Smell is the "Magic Smoke"... you see talked about here...

Bob
Logged

--> WA7EMS <--
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Pages: [1]   Go Up
Jump to: