Pages: [1]   Go Down
Author Topic: how to connect 12 volt to digital input please help  (Read 1477 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 57
العاب
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset 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
Offline Offline
God Member
*****
Karma: 7
Posts: 640
A naughty mind is a joy forever.
View Profile
 Bigger Bigger  Smaller Smaller  Reset 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 Offline
Jr. Member
**
Karma: 0
Posts: 57
العاب
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset 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 Offline
Brattain Member
*****
Karma: 597
Posts: 33311
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 597
Posts: 33311
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset 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 Offline
Jr. Member
**
Karma: 0
Posts: 57
العاب
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset 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 Offline
Jr. Member
**
Karma: 0
Posts: 57
العاب
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset 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
Jump to: