Go Down

Topic: Are my analog ports burnt ?  (Read 120 times) previous topic - next topic

Patriboom

Hello everyone,

I'm new here, new with arduino.  A friend of mine gave me a board a year ago and now, I start to explore it.

First, I wanted to read analog value from a raindrops sensor, following those instructions https://www.instructables.com/id/Arduino-Modules-Rain-Sensor/

Did not work, with water or totally dry sensor, always arduino returns the same value.

I tried to connect some resistors on a proto-board and get reading of those value.
whatever resistors combination I can manage, the arduino's reading are always the same.

I tried http://www.circuitbasics.com/arduino-ohm-meter/ and get the same result.

Finally, I plugged arduino to USB port and tried the following lines:


/* Flame Sensor analog example.
Code by Reichenstein7 (thejamerson.com)

For use with a Rain Sensor with an analog out!

To test view the output, point a serial monitor such as Putty at your Arduino.

  - If the Sensor Board is completely soaked; "case 0" will be activated and " Flood " will be sent to the serial monitor.
  - If the Sensor Board has water droplets on it; "case 1" will be activated and " Rain Warning " will be sent to the serial monitor.
  - If the Sensor Board is dry; "case 2" will be activated and " Not Raining " will be sent to the serial monitor.

*/

// lowest and highest sensor readings:
const int sensorMin = 0;     // sensor minimum
const int sensorMax = 1024;  // sensor maximum

void setup() {
  // initialize serial communication @ 9600 baud:
  Serial.begin(9600); 
}
void loop() {
  // read the sensor on analog A0:
   int sensorReading = analogRead(A0);
        Serial.println(sensorReading );
   sensorReading = analogRead(A1);
        Serial.println(sensorReading );
   sensorReading = analogRead(A2);
        Serial.println(sensorReading );
   sensorReading = analogRead(A3);
        Serial.println(sensorReading );
   sensorReading = analogRead(A4);
        Serial.println(sensorReading );
  // map the sensor range (four options):
  // ex: 'long int map(long int, long int, long int, long int, long int)'
   int range = map(sensorReading, sensorMin, sensorMax, 0, 3);
 
  delay(1000);  // delay between reads
}

With NOTHING plugged on; Arduino returns values around 16 to 32 according to the port.
I was ready to read something like 1050 1000 or 1020.

Then I tried to add some resistors ... upto 160 000 ohms  ( 4 x 400 k ) ... nothing.

The strange part is:  When I turn the Arduino on, resistors' values shown on screen are hi and every second get smaller and smaller until it touches a floor and stay there.  Whatever I can do then, the values don't change except if I reset the Arduino.

Any idea ?

Thanks.

hammy

You need to try one of the simple analog input examples in the IDE to see if the analog input is working .
Connect the input to the 5v , does it read 1023 , connect to 0v ( gnd) , does it read zero ?


Patriboom

Nop: nothing like that.  Still very low value ~ 10 - 20 even when I plug 5V directly on the A0 pin.

DrAzzy

Sounds like the microcontroller is damaged (or you're not actually making a connection - though the fact that it *consistently* reads a low number does suggest a problem - if it wasn't connected to anything, you expect random readings (as it's a floating pin, picking up noise from the environment).

Did you abuse those pins somehow?
ATtiny core for 841+1634+828 and x313/x4/x5/x61/x7/x8 series Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts (some assembled), mosfets and awesome prototyping board in my store http://tindie.com/stores/DrAzzy

Patriboom

No, I did not abuse of them yet.  A friend of mine gave me the device more than 15 months ago and it seated in the wardwrobe since then.

Thanks for your support.

I'll conclude the microcrontroller is damaged.

DrAzzy

Blame your friend then :-P

At least Uno clones to replace it with are cheap (if it's got the socket for the chip, you can buy an atmega328p with optiboot bootloader preloaded on it, and replace the chip, too)
ATtiny core for 841+1634+828 and x313/x4/x5/x61/x7/x8 series Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts (some assembled), mosfets and awesome prototyping board in my store http://tindie.com/stores/DrAzzy

Go Up