High and low power switching

Ok so i know i can manually switch relays to control power outputs.
Is there a way to use a sensor to detect voltages such as 1 to 20vdc and 20 to 30vdc.
So a low end and a high end sensor to make the arduino switch relays.
If it gets above 20vdc it switches to the other system and if it drops back down switches to the original system.

You can put the signal into an analogue pin through a voltage divider and make the decision about which relay to activate in code based on the voltage read.


You may need to consider the quality of you DC voltage you are wanting to measure.
Is it clean DC, or does it contain noise?
Consider placing a suitable low pass filter on the input, either as RC (resistor/capacitor) and or software filter.
Also, check how your measured DC is referenced back to the Arduino, is there a common ground, is there isolation from any potential AC source.

But yes, a simple voltage divider as Rob has suggested.

Are you trying to measure a 24 Volt battery bank?

rockwallaby . .

Ok so I am setting up a wind turbine system w/grid ties. It is 3 phase ac rectified to dc. Could spike up to 60vdc. Most low budget grid ties are either 10v-30v, 28v-52v and 50v-100v. I was wondering if the arduino could be used to gather data to switch from one to the other at different times of need.
I figured i would probably make my own sensor to use as an input for the arduino due to dc voltage amounts. Take the input and basically tell the arduino true or false.

Is this brain storm possible? Or is this brain broken?

yes you can datect voltages. I suggest you to read this page:

That is wonderful. Thanks you.