Go Down

Topic: [solved] Detecting 9V on Digital in ? (Read 539 times) previous topic - next topic

TheMenace

May 23, 2012, 10:10 pm Last Edit: May 25, 2012, 02:19 am by TheMenace Reason: 1
Hi guys,
i'm quite new on Adruino and got kinda stucked, hopefully someone can help me.

I need 8 Inputs on my Atmega168/Arduino.
My  Atmega/Arduino is Powered by USB.
I already build up a simple circuit with a Button connected to Input12 , 5V+ and GND via a 10k Pulldown-Resistor.
This works and my code is triggered... fine.

Now i need 8 Inputs that got triggered by an external 9V Powersource.
As soon as the 9V hits,the Digital-In should be triggered.

I already got a LP2950 Stepdown Converter connected to the 9V and the output is plain 5V.
But connecting it to the Digital Input12 don't trigger the Code.
Even using the Ground of the 9v (a Batteryblock btw.) doesn't trigger anything.

Can someone light me up ?

btw .. Analog Inputs is not an option, i need them later

Thanks in advance,
TheMenace







AWOL

#1
May 23, 2012, 10:14 pm Last Edit: May 23, 2012, 10:18 pm by AWOL Reason: 1
A simple potential divider would be a lot cheaper.

Quote
But connecting it to the Digital Input12 don't trigger the Code.

What code?
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

TheMenace

Yap , i know but ill bet it wouldn't trigger the Digital In either ;)

Grumpy_Mike

Quote
I already build up a simple circuit with a Button connected to Input12,5V+ and GND via a 10k Pulldown-Resistor.
This works and my code is triggered... fine.

That is a great way to destroy your arduino. You must not apply a voltage greater than the supply voltage, which in this case is 5V.


TheMenace

its 5v+ and Digital Input 12 ... not 12,5V

Grumpy_Mike

You are better off using a pull up resistor rather than a pull down, as shown here:-
http://www.thebox.myzen.co.uk/Tutorial/Inputs.html
Then for a bigger input voltage use some protection:-
http://www.thebox.myzen.co.uk/Tutorial/Protection.html
I would use a 330R resistor and a 5.1V zenner.

TheMenace

The problem i see with an Pull-Up is,that the 9V can be a very short signal.
or is that not an issue ?
Except from protecting the Input and using a Pull-up, should the basic idea of my circuit work
or did i missed something ?



Grumpy_Mike

Quote
is that not an issue

Not an issue.

Remember the ground of your signal needs to be connected to the ground of the arduino.

TheMenace

Now it works !
Looks like the Pull Up does the trick :)
Thanks for the Help !

Go Up