Internal voltage reference for accurate voltage calibration

Hi guys

I am just wondering about the internal voltage reference which is usually 1.1V ATmega168/328 chips, is that present in the spark core?

The reason I ask is because I will be running the spark core on battery, and I will like to run an accelerometer on it for a week. As the battery starts getting emptier, the reference voltage (~3.3V, which is not accurate to begin with) will probably start dropping. This might give me more and more inaccurate results by the day (I need it to be very precise for my purposes), so I would need a reference voltage which I can trust and I can adjust my accelerometer readings according to.

Does anyone know if there is an accurate internal reference? If not, how could you do it?

Cheers

Hi @xlev

The ADC voltage reference on the Spark core is a filtered version of the 3.3V supply. If you are using USB or VIN to power the core, then this 3.3V comes from the on-board 3.3V regulator. If you are supplying your own 3.3V source, the voltage reference will only be as accurate as your supply.

If you add an external 1.2V reference IC like an LM185 series part, you can measure that on one ADC pin and measure your signal on another and use the ratio of the two to determine a more accurate value.

1 Like

The 3.3V* pin on the spark core is more stable than the others, it provides a great reference for sensor readings, especially analog. http://docs.spark.io/examples/ Check out the temperature example.

As far as running a spark core on battery power for a week, I recommend getting a portable usb pack for cell phones, they sell them everywhere now http://www.amazon.com/Vinsic-Tulip-3200mAh-External-Battery/dp/B00KEGYXRQ/ref=sr_1_9?ie=UTF8&qid=1407865293&sr=8-9&keywords=cell+phone+chargers :). You will have to pay close attention to how you write you code; there are many ways to do this but if you want to remotely update data and still get long battery life you will need to turn the core to sleep, or switch the Wifi off and then back on only when sending data at intervals you desire. http://docs.spark.io/firmware/#spark-sleep.

Hi @bko

Thank you for your reply, that would probably be what I would have to do. Could you tell me if this one would be suitable? http://www.ebay.com.au/itm/GA84705-LM385LP-1-2-Texas-Instruments-IC-V-Ref-Micropower-1-2V-To-92-/141363498199?pt=AU_B_I_Electrical_Test_Equipment&hash=item20e9ebccd7&_uhb=1

Also I was looking at a spec sheet (http://www.ti.com/lit/ds/snvs741f/snvs741f.pdf), I am very new to electronics but from what I can see you only need to connect at 500k resistor between the battery and one of the pins of the IC, one pin goes to GND and one pin is the output 1.2V. Is that right? Again as I said, I know very little about this.

Also once you have an accurate 1.2V reference you can feed it through and external AREF. Which pin would that be on the board?

Hi @xlev

Yes, that part will work great and is easy to hook up as you found out.

You should know that the ARM processor on Spark core only works down to 2.4V.

You cannot change the AREF on the Spark core. What I suggested is making two measurements:

  • Make your normal sensor measurements on one channel (let’s say A0)
  • Then right after that read the voltage on the 1.2V reference on say A1

Now you have two numbers both of which vary with the supply voltage you are driving on the 3.3V core pin, but the second one would be constant if the supply was perfect.

So A1 would be 1.2/3.3*4095 = 1489 when the battery is full at 3.3V.

But when the supply voltage drops to say 3.1V, then A1 would read 1.2/3.1*4095 = 1585

So the ratio of the current measurement of the 1.2V reference to the full scale value of 1489 tells you the current battery voltage relative to the 3.3V nominal calculated above.

2 Likes