Pages: [1]   Go Down
Author Topic: reading a voltage  (Read 362 times)
0 Members and 1 Guest are viewing this topic.
UK
Offline Offline
Sr. Member
****
Karma: 4
Posts: 320
Arduino - very interesting !
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 have a AVR board that is not an arduino

if i send 5v to one of the analogue channels it outputs a voltage in MV

ie  5v = 5000

however if i send it 5v i get 3600   :--   3.6 v

i have also noticed that the board is reading 177 mv when it is ov  (gnd connected to signal)

what am i dong wrong ?

where is my voltage going !

Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 201
Posts: 8706
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sounds like the wiring of your non-Arduino doesn't match the software.  Perhaps you should ask the vendor of the non-Arduino or the person who wrote the software.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 525
Posts: 26510
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What processor does it use? What is Aref set to? Are you using the internal voltage reference?
You really need to provide more info.

How are you applying 5v and getting two different readings?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

UK
Offline Offline
Sr. Member
****
Karma: 4
Posts: 320
Arduino - very interesting !
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi guys

thanks for your suggestions - it appears the channel is -2..5 to +2.5 volts !

what is the easiest way to read the 5v ? a voltage divider ?
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 201
Posts: 8706
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thanks for your suggestions - it appears the channel is -2..5 to +2.5 volts !
what is the easiest way to read the 5v ? a voltage divider ?

If your 'channel' reads -2.5V to +2.5V how do you read 3.6V for 5V?

If you can accurately read values between -2.5V and 2.5V you can use two equal resistors (about 10K Ohms) to divide your 5V signal in half.  Connect your signal to one resistor, the other resistor to Ground and both resistors to your analog input 'channel'.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

UK
Offline Offline
Sr. Member
****
Karma: 4
Posts: 320
Arduino - very interesting !
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thanks guy - it looks like there must be a zener on the inputs protecting them

i did exactly as you suggested and built a voltage divider - all working good !
Logged

Pages: [1]   Go Up
Jump to: