Hi, does anybody body know how I can monitor the input voltage to the board and set an alarm when the voltage reaches a certain low level.
The board will be powered from a 2s lipo battery 7.4v nominal and a piezo alarm will sound when the voltage drops to 6.6v
I've tried searching but I'm getting a little confused now. I think I need to use a voltage divider.
Exactly! The Arduino's analog inputs can read between zero and 5V.
You can look-up how calculate the voltage divider values, but for example - If you use two equal resistors, say 5k Ohms each, the voltage will be divided in half so 7.4 will "read" 3.7 and 6.6 will "read" 3.3. (For best accuracy, you'd want to use as much as the A/D converter as possible, reducing your maximum battery voltage down to about 5V, rather than dividing it in half.)
The A/D converter actually returns values between zero and 1023, so with the default 5V reference you'd actually read ~757 at 3.7V and ~675 at 3.3V.
P.S.
As far as actual resistor values, there's a trade-off. Current flows through the voltage divider, discharging the battery. Lower resistance = more current (Ohm's Law). But, if the resistance is too high, the input resistance of the Arduino affects the voltage divider making it less accurate. So, something around 10k "feels" about right to me (or a series-total of 20k as florinc suggested). A total series resistance of 1k is probably too low, and above 100k is probably too high...