Author Topic: AnalogInput units  (Read 728 times)

mariahernandez

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: AnalogInput units
« on: March 21, 2017, 03:47:29 pm »
Hello mcThings' team,

I'm working on a energy sensor using the mc-module120, at the first time when I did't know the resolution of the mc-Module I decided to power the analog input to get the resolution of it and I found that if I power the module with 2,8V(using the VCC pin of the mc-Module) I got a value range close to 2600, and if I power it with 3.3V (external power supply) I got a lower result value close to 1700. That's no make too much sense for me, because if I power the module with a highger voltage the result should be highger and not less, or not? e.i. If I power an Analog input of a NodeMCU with 3.3V I get that the resolution is 1024 (10 bits resolution)

After reading this post I found the that the resolution of the mc-module is 16384 (14 bits resolution), but if I use the following formula (using the correct resolution) I'm not able to get the correct value from the sensor.

Code: [Select]
value = (sensorReading*3.3)/16384;
At the moment I have the energy sensor working with a Particle Electron working perfectly. The resolution of this device is 12 bits (4096) and with the following formula is how I get the value from the sensor:

Code: [Select]
float value = (analogRead(A0)*3.3)/4096.0;
Btw, I'm using a i-Snail-VC-50 -> http://www.phidgets.com/products.php?product_id=3502 if you know something about it I would appreciate any help!

I hope you can solve my doubts with the resolution of the module as soon is possible to start working with it, I'm so excited to see it working!

Best Regards,
Maria C