Pages: [1]   Go Down
 Author Topic: how to connect 12 volt to digital input please help  (Read 1484 times) 0 Members and 1 Guest are viewing this topic.
Offline
Jr. Member
Karma: 0
Posts: 57
العاب
 « on: June 10, 2011, 03:44:26 pm » Bigger Smaller Reset

hi all,
i want to connect 12 volt to arduino digital input,
i want to check if this input connected to 12 volt

i fount this site http://www.beyondttl.com/calculator-vdiv.php
that's help in calcuate Resistor but i do not know what Resistor to connect to arduino to do this

thank you
 Logged

I am using arduino for car pc project you can help me on this blog العاب -
Netherlands
Online
God Member
Karma: 7
Posts: 642
A naughty mind is a joy forever.
 « Reply #1 on: June 10, 2011, 05:01:55 pm » Bigger Smaller Reset

It may also be interesting to calculate the example for an input of 24-30 volts and instead of reading the output digitally use one of the analog-pins and the analogRead()-function.

Problem with reading just HIGH or LOW digitally is that an arduino-pin will probably already see an HIGH if you read it digitally when it's connected to a voltage higher as 3-3.5 volts (datasheet will probably give you the number when it goes high).

Using the voltage divider calculated for 12 volts and connecting a 9-volt battery digitally would already trigger a HIGH.

Using an analog-pin and analogRead(), you could calculate what.... voltage is applied to VH in the example.

VO should be connected to the analogpin (or digital) of the arduino, VL should be connected to ground of the powersupply and ground of the arduino.

With  22000 ohm as R1, 4700 as R2 you could calculate voltages connected to VH up to 28 volt safely.
Reading 12volt digitally... might result in a LOW using these values though.
 « Last Edit: June 10, 2011, 05:09:16 pm by Simpson_Jr » Logged

Offline
Jr. Member
Karma: 0
Posts: 57
العاب
 « Reply #2 on: June 11, 2011, 07:39:27 pm » Bigger Smaller Reset

hi all,
thanks for replies, i will try it now,
about protection, what you think if i use 7805 ? i have a lot of them?
thank you
 Logged

I am using arduino for car pc project you can help me on this blog العاب -
Manchester (England England)
Offline
Brattain Member
Karma: 602
Posts: 33371
Solder is electric glue
 « Reply #3 on: June 11, 2011, 11:38:43 pm » Bigger Smaller Reset

Quote
protection, what you think if i use 7805
And what protects the 05 then?
 Logged

Manchester (England England)
Offline
Brattain Member
Karma: 602
Posts: 33371
Solder is electric glue
 « Reply #4 on: June 12, 2011, 12:09:55 am » Bigger Smaller Reset

Sorry I read this as 7405, hex inverter with open collectors, not the power regulator which is totally the wrong thing to use.
 Logged

Offline
Jr. Member
Karma: 0
Posts: 57
العاب
 « Reply #5 on: June 12, 2011, 01:16:55 pm » Bigger Smaller Reset

hello,
thank you  Grumpy_Mike , KE7GKP for replies
my project is car pc, and in this time i want to control shutdown and startup pc from arduino

i asked about 12v becouse i want to arduino check if AGC on, if on wait X min to start engine, after this run relay to connect 12 volt to pc power, and run another relay to (press power button on pc) to start pc,

i will try (6.8K = 6K8) (4.7K = 4K7) what do you think?

can i use any transisitor to do this? like 2n2222 i am very now to electorinc world but i want to learn with this project

thank you
 Logged

I am using arduino for car pc project you can help me on this blog العاب -
Offline
Jr. Member
Karma: 0
Posts: 57
العاب
 « Reply #6 on: June 12, 2011, 10:15:42 pm » Bigger Smaller Reset

hello,
no sir i have your reply but i know the car alternate produce more than 12 volt, 14,5 or less,
so i said i want to use 7805 for this,
after your reply i have do some search and found that i can use some this like 4-PIN PHOTOTRANSISTOR OPTOCOUPLERS
and i got this http://www.alldatasheet.com/datasheet-pdf/pdf/52896/FAIRCHILD/H11A817C.300.html

can i ask you how to connect it?
how i can use it with 12volt or more, and how to connect it to arduino?
or if you have any advice how to do this,

thank you
regards
 Logged

I am using arduino for car pc project you can help me on this blog العاب -
 Pages: [1]   Go Up