# What Board to use? 0-5v variable input used to determine output.

Newbee here.

My goal is to create a tone generator based off a variable input voltage. For example, when the voltage is 0 - 1 volts, no tone. When the voltage exceeds 1 volt, start a slow pulsing tone at 400 hz, increasing the pulse rate until the voltage reaches 2.5 volts, at which point the tone is solid at 400 hz. When the voltage exceeds 3 volts the tone now pulses slowly at 1600 hz, with the pulse rate increasing until 4.5 volts is reached at which point the tone is solid at 1600 hz. I have read about a basic feature called “Read Analog Voltage” that converts the voltage to a number between 0 and 1023, and then I assume the resulting number could be used for generating the appropriate tone.

The board I would like would ideally be powered by 12 volts (could power with 5v if necessary), would be able to measure a voltage input from 0.1 volts to 5.0 volts in tenths of a volt, and would be able to output the tone.

When looking at the Due board I see warnings that it will not accept more than 3.3 volts. I also get the impression that other boards will not read low voltages, however I could very well be misunderstanding.

My question is, will the basic UNO board do what I am wanting, or is there another board that would be more suited to this?

You can use two resistors to make a voltage divider and bring the 5V down to a 3.3V level if you want to use a Due. Or, use 0-5V with a Uno, the 10-bit ADC will let you measure in 0.00488V steps. With the ADC, 1V will return a reading of ~ 204, 2V ~ 409, 3V ~ 613, 4V ~ 818, 5V ~ 1023. Or, 1/5 * 1023, 2/5 * 1023, etc.

You can power an Uno or Due with 12V (for the Due it's basically the limit); in both cases you will waste power in the on-board voltage regulator which will convert it to heat.

You can however never connect 12V to any of the IO pins of either an Uno or a Due !!

If your input signal comes from an external source that exceeds 5V (Uno) or 3.3.V (Due), you can use a voltage divider to bring the signal down to safe limits (see also @CrossRoads reply).

I have read about a basic feature called "Read Analog Voltage" that converts the voltage to a number between 0 and 1023, and then I assume the resulting number could be used for generating the appropriate tone.

See the AnanlogInOutSerial example that comes with the IDE how to use a potentiometer 'powered by' e.g. an Uno. For use with a Due, read 3.3V where it refers to 5V.

Thanks for the quick responses. I will purchase the starter kit that comes with the Uno.