SparkFun Forums 

Where electronics enthusiasts find answers.

General MicroView Support area - You have questions, find your answers here.

Moderators: marcus@geekammo, Help@GeekAmmo

By Av8ter
#186851
Hello,
I am altering the Sparkfun ML8511 sketch to use in the Microview, using the VIN pin. The sketch requires using the 3.3v Arduino pin as an accurate reference voltage. I am using a 9volt battery powered 3.3v/5v output power supply. The 3.3v setting output measures 3.44v. I'm uncertain as to how much this alters the accuracy of the UV measurement. Any ideas? Thanks.
Av8ter
By scotta
#186870
Having 3.44V for the ML8511 supply shouldn't be any problem at all. The recommended operating voltage of the ML8511 is from 2.7V to 3.6V. If you hook up things according to the sketch, applying the same 3.44V to A1 for a reference, then the accuracy won't be affected.

The 3.44V output of your supply should go to the 3.3V and EN pins of the sensor and also MicroView pin A1. The sensor OUT pin should go to MicroView pin A0. You can actually leave the EN pin unconnected since, according to the schematic, the breakout board pulls it high through a 10K resistor.

Does your supply have both a 5V and 3.3V output or is it only switchable to one of them? If it has both 5V and 3.3V outputs and the 5V is regulated between 4.5V to 5.5V, you should power the MicroView from this 5V output to 5V pin 15. Otherwise power the MicroView directly from the 9V battery to VIN pin 16.

If you measure the output of your supply as a stable 3.44V, you should change the value 3.3 on line 57 of the sketch to 3.44 (or whatever the measured voltage is).
Code: Select all
  //Use the 3.3V power pin as a reference to get a very accurate output value from sensor
  //float outputVoltage = 3.3 / refLevel * uvLevel;
  float outputVoltage = 3.44 / refLevel * uvLevel;