Jump to content
43oh

Problem with analogRead


Recommended Posts

PS: resolved. I though that by default the internal voltage was regulated got to set analogReference to INTERNAL2V5. And the reading seems correct 3.56 from launchpad and 2.66 from the two 1.2 batteries.

 

Hi,

 

I tried to measure voltage with a voltage divider as shown there : http://www.microbuilder.eu/Tutorials/Fundamentals/MeasuringBatteryVoltage.aspx

 

I measured the voltage from the launch pad (VCC/Ground) when using A1 got 4.2V reading is 417 on A4 I got 3.3v reading is 327... which seems good. So I switched to batteries after having removed the jumper for VCC/TEST and RST, the RXD and TXD are set for hardware UART. The batteries are two 1.2V 2000mAh connected to the VCC and ground pin of the launchpad. The reading should have change for 2.4V. But the reading are still around 327 (3,3V). If I unplugged A4 pin i got readings between 400 and 500 mostly around 480.

 

What did i do wrong?

 

If somebody could help me.

 

Regards.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...