Uno R3 Variable voltage switch

Hello I am looking for some guidance on programming and using the Uno R3 board.
What I want to achieve is for automotive 12-13v usage, however I want it to read a 0-5v sensor.
In that 0-5V range I want the circuit to open or close at adjustable set voltages ie. closed at 0-4V open at 4-5V.
Of course it can't draw any amperage from the sensor itself as that would affect the reading.
Can anyone please point me in the right direction for doing this?

Thanks!

Well an arduino can read a analog voltage in the range of 0-5vdc via it's analog input pins. And a digital output pin plus a transistor can be used to switch a relay on and off. And your sketch software coding can decide at what analog input voltage value to switch the relay on or off, so it would appear to be a simple project for an arduino board?

Lefty

What transistor will I need to get and could you recommend what thread to read on regard to the software aspect of this? Keep in mind i'm a total newb and need step by babystep guidance :open_mouth:

SuperNewb:
What transistor will I need to get and could you recommend what thread to read on regard to the software aspect of this? Keep in mind i'm a total newb and need step by babystep guidance :open_mouth:

Transistor type is determined by the relay type used. Software will be apparent as you learn to program the arduino, there are lots of simple example sketches you can load from the IDE and read to learn what all the commands do and how to use them.

Perhaps the tutorials would be a good place for you to start: http://arduino.cc/en/Tutorial/Foundations

Lefty

I assume the relay is needed for the 12v power to the uno r3 itself? If I used battery 12v power then I wouldn't need the relay correct?

Perhaps if you explain in more detail what you have in mind.

I want the circuit to open or close at adjustable set voltages

What circuit?

I assume the relay is needed for the 12v power to the uno r3 itself?

I don't understand that bit.

Based on input of 0-5 v adjustable I want a 12 v output.

The circuit that will either be a 12 v output or a ground.

So I am assuming the uno r3 board only has 5v output meaning I need a transistor to go from 5 to 12 is this correct?

What is the link between the relay used to determine the transistor used? Is the relay merely for powering on the unor3 board?

Do I need to worry about the recommended 7-12v input if my input is automotive and will be 13-14 with the automobile running?

SuperNewb:
Based on input of 0-5 v adjustable I want a 12 v output.

The circuit that will either be a 12 v output or a ground.

Why is a relay and transistor needed if the r3 has 12v output?

An arduino doesn't have 12 volt outputs, what made you think they did?

Lefty

Figured 12v in 12v out. Again attribute that to my newbness.

SuperNewb:
Figured 12v in 12v out. Again attribute that to my newbness.

Ok

SuperNewb:
What is the link between the relay used to determine the transistor used? Is the relay merely for powering on the unor3 board?

Your use of language here is confusing. Relays don't power anything. The are electrically operated switches.

If you wish to turn on and off a 12V "thing" with your Uno, then the Uno would need to operate a relay. It probably needs a smallish transistor to give it enough oomph to turn on the relay coils. Then the 12V goes through the relay contacts, not touching the Uno in any way. You would need a diode across the relay coils in this case. Google "arduino relay" or similar to get lots of ideas about how to do that (over 1.5 million hits).

You can also get solid-state relays (SSRs) from eBay and other places. These can be operated directly from a digital signal, and can switch quite large amounts of current / voltage.