Hi all
First post - newbie to Arduino and electronics in general!
I have in mind a project for my mobile astronomical set up. I will be building a power box to supply the various items with 12v power - the mount for the telescope, the CCD camera, the USB hub, the dew prevention strap.
The power box will have 2 x 12v inputs - each one supplying 3 outputs. This enables me to have a different power source for the dew prevention controller, for example, to keep the noise interference on the camera as low as possible. The camera has cooling on it, to a maximum of 38deg below ambient so the power requirements may fluctuate from session to session.
So, I would like to build a unit that measures:
Voltage from each of the supplies - possibly even on each output as well
Current draw on each supply - again, possibly on each output
Humidity and Temperature, and thus calculate the dew point
And eventually to interface to the PC to obtain telescope positional data
All of this will be displayed on LCD/LED screen of some sort
So, I thought I'd start with the basics and measure the voltage. Having understood that I can't have more then 5vDC going into the Uno, I built a simple voltage divider, but I am getting weird results and I don't know why...
I've attached my Fritzing diagram of my divider - a 1M resistor, a 100K and a lead going to A2 on the Uno.
I've used the sketch from Measuring Voltage with Arduino - exactly as is, but updated after measuring my voltage
The Uno is connected via USB only and the 12v input is from a spare transformer I have. This is connected to a variable DC voltage selector, so I could select 12/9/6/5/3 volts and mimic drain on the battery pack.
So, the output I am getting looks like:
0.00 V
0.00 V
0.00 V
0.00 V
0.00 V
1.44 V
23.19 V
63.13 V
63.13 V
63.13 V
63.13 V
63.13 V
63.13 V
63.13 V
63.13 V
63.13 V
63.13 V
44.62 V
0.08 V
0.00 V
0.00 V
0.00 V
0.00 V
0.00 V
0.00 V
0.01 V
7.82 V
37.91 V
63.13 V
I've measured the voltage with a digital voltmeter and as far as I can tell, it is stable.
After digging and searching on here, I have found a post (#6 in Voltage divider - General Electronics - Arduino Forum) that suggests a 0.1uF capacitor might help - but I haven't tried this as yet....
Can anyone see any other reason why I would get such spurious readings?
Thanks and sorry for the long-winded post!