Pages: [1]   Go Down
Author Topic: Uno R3 Variable voltage switch  (Read 687 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 24
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
« Last Edit: March 17, 2013, 03:02:30 pm by SuperNewb » Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16548
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Logged

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

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 :O
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16548
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 :O

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
Logged

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

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?
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

What circuit?

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

I don't understand that bit.
Logged

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

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?
« Last Edit: March 18, 2013, 12:16:10 pm by SuperNewb » Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16548
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Quote
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
Logged

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

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

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16548
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Ok
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: