-1

The sensor is a hall-effect UGN3503 sensor and I'm using a TL431 shunt regulator as voltage reference for analog readings.

I'm using analogRead() with setting the analog reference to external analogReference(EXTERNAL);.

schematic:

schematic

simulate this circuit – Schematic created using CircuitLab

The problem is changes in analog reading of hall-effect sensor. without connecting anything to Arduino but the sensor and TL431 reading is around ~1020, but for example connecting a single LED to any pins of Arduino causes the reading drop by ~2-3 or connecting the an I2C LCD causes the reading to drop to ~1010 etc...

How can i prevent analog read changes to happen when voltage drops?

  • You should show the Arduino in your circuit diagram, including how you connect the external voltage reference to the Arduino's AREF pin. (or is the AREF indicated in your diagram the connection to the Arduino's AREF pin). You should probably also show the relevant portions of your sketch's code. – Duncan C Aug 28 at 13:58
  • @DuncanC the AREF in the diagram connected to the AREF pin of arduino and data pin of hall sensor to the a analog pin, and in the code there's really nothing except analogRead() and analogReference(EXTERNAL); and of course Serial.println()... – Hamed Aug 28 at 14:03
0

I suspect the USB 5v supply is rather noisy and sags slightly with load. A hall effect sensor measures TINY signals, so it's probably quite sensitive to changes in supply voltage.

You might try adding a capacitor to the line, but you'd be better off either feeding 7.5-9-VDC into the barrel connector and using the on-board voltage regulator on the Arduino to generate your 5V and 3.3V, or feeding a regulated 5V supply into a cut USB cable (that way you get the power source switching and fuse protection on Arduino boards, but still can use an externally regulated 5V supply.)

0

It sounds like your +5v supply is only barely adequate and sags as you draw even marginally more current. But even given that, your AREF is the TL431's voltage which 1) won't match the supply voltage (slightly redrawn schematic shows why), and 2) the sensor voltage could possibly exceed the AREF which is out of spec for the Arduino's A/D.

A more stable power supply - able to maintain its voltage despite the expected variation in current draw - would help a lot, but your best solution is to use the supply voltage as your AREF, unless you require the TL431 reference to be your AREF for some reason.

image

  • The power supply currently is a USB (Arduino UNO board), before TL431 i had a 3.3V regulator connected to the AREF. i thought changing it to TL431 can solve the problem but it didn't... – Hamed Aug 28 at 14:35
  • You said "A more stable (i.e., capable) would help a lot". Do you mean A more stable (i.e., capable) POWER SUPPLY would help a lot"? As in a higher current regulated power supply? – Duncan C Aug 28 at 15:08
  • Yes - thanks for the catch. Fixed. – JRobert Aug 28 at 15:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.