Go Down

Topic: Incorrect voltages at analog pins (Read 862 times) previous topic - next topic


It's a fine distinction, and little comfort, but it is probably the input mux that is fried.

Something's fried anyway :P


Thanks all for the responses. Sounds like the chip is shot. FWIW, here's my code:

Code: [Select]
int LastTime = 0;
float Vin1 = 0;
float Vin2 = 0;
float Iin = 0;
float R = 995.0 / 219.0; // voltage divider for Vin & Iin measurement
float Power = 0;
float test = 0;

void setup() {
  pinMode(6, OUTPUT);

void loop() {
  analogWrite(6, 200);
  unsigned long Now = millis() / 500;

  test = analogRead(0);
  Vin1 = 5.0 * test/1023.0;
  //analogRead(  // converts to the voltage read by Arduino
  //Iin = Vin - 5.0 * analogRead(1)/1023.0; // voltage drop across shunt (as read by Arduino)
  Vin2 = 1.0 + Vin1 * R;                    // converts Arduino signal to actual input voltage
  Iin = 1.0 + Iin * R;                    // converts Arduino signal to actual voltage across shunt
  Iin = Iin / 0.235;                      // Current through shunt resistor at measured voltage drop
  //Power = Iin * Vin;
  if (Now >= LastTime + 4) {
    Serial.print(", ");
    Serial.print(", ");
    LastTime = Now;

Also, yes I had it plugged into my computer, which would explain the 4.6V.

Any reason to think the board itself is damaged (Arduino Uno)? I'm planning to just buy an ATMEGA328 chip from sparkfun instead of buying a whole new Arduino.



If the unit powers up and runs fine (short of ADC not working), then it's likely just the microcontroller chip that would need to be replaced.  It wouldn't be a bad idea to test some of the Digital IO points just to be sure (shouldn't be any problem there if you only connected 13V to the ADC points).

Go Up