Curcuit voltage drop with external power supply

Hello everyone,

I am currently building a circuit consisting of:

  • I2C Extender with P82B715
  • Shift register SN74HC595
  • ADC MCP3208
  • NTC 10k Thermistor
  • A few LED with 220Ohm resistors
  • 5V Power relay

The arduino NANO is powered and read from using a serial USB connection, where peripheriel parts are powered using an external power module. The datasheet says it can produce up to 700mA and its connected via a 220V AC-> 12V DC 1A power plug. (see schematic). In this test setup I use a breadboard and ordinary jumper cables (-> noisy but in tolerance). I also used the same COM (GND) for the Arduino and the circuit.

Now to my problem. When I only measure the temperature (everything else is idle) I get correct values for it. After switching on the LED I notice a voltage drop from the +5V-GND supply on my breadboard of 1mV (not too bad maybe noise). But when I switch the coil of the power relay the voltage drop is 240mV (drawing 57mA).
Since the drop is across the board the thermistor also notices it and reduces its voltage, therefore I get a different reading at the same temperature (this is how I noticed the drop in the first place).

The idle circuit draws 132mA, with the relay on 183mA, and with the LEDs 195mA.

Why is there even a voltage drop? Did I miss something in the wiring?

Any help is appreciated.

Testcurcuit.pdf (493 KB)

I'm not clear from your description or diagram how the 12V becomes 5V, please clarify.

When I switch the coil of the power relay the voltage drop is 240mV (drawing 57mA).

Which represents 4.2 ohms, which is the kind of resistance you might get with a bad connection. I suggest you get your meter out and measure the voltage around the circuit to find the drop.

Since the drop is across the board the thermistor also notices it and reduces its voltage, therefore I get a different reading at the same temperature.

If I have understood your diagram correctly both the A2D and the thermistor use the same 5V reference, which means the output from the A2D represents the ratio between the reference and the thermistor value. This means that a variation in the reference should not change the A2D output. You need to confirm that both do share the same connection and the same voltage.

If I have understood your diagram correctly both the A2D and the thermistor use the same 5V reference, which means the output from the A2D represents the ratio between the reference and the thermistor value. This means that a variation in the reference should not change the A2D output. You need to confirm that both do share the same connection and the same voltage.

Sorry for the confusion. The temperature only read wrong when the voltage dropped below 3.3V (the minimum driving voltage of the ADC and shiftregister). The reading is fine as long as the ADC has enough power.

I’m not clear from your description or diagram how the 12V becomes 5V, please clarify.

I use a power module from Elegoo with the jumpers on the 5V pins.

https://opencircuit.shop/ProductInfo/1000154/Breadboard-Power-Supply.pdf

and the power comes from a DC Wall plug similar this one

s-l1000.jpg

I will now measure all the parts individually.

Ah, OK, that make sense now, thanks.

I will now measure all the parts individually.

I think that's all you can do, you have to track the source of the problem. If you are still struggling to find the problem then some clear photos of what you have would be helpful.

We figured it out.

There were two problems:

There were a lot of ground loops and some reference points inside these showed the "wrong" values. (Not wrong, but the differential of the loops). Eliminating these the measurements were stable and showed the values of the respecting datasheets

The thermistors still showed the wrong values, but the reason was a stupid human error. While measuring one of us held the tips of the oscilloscope at different positions while the other one triggered the measurements and read values. While this was happening the person who measured stood over the circuit and was breathing on it. When the measurement was taken (one breath later), the heat already changed. Since the reference temperature is outside the casing the temperatures (and voltages) could never be the same.

Needless to say I feel pretty stupid wasting half a day on this. At least the rest of the insitute had something to laugh.

Thanks for your help @PerryBebbington

v3xX:
The datasheet says it can produce up to 700mA and its connected via a 220V AC-> 12V DC 1A power plug.

You probably did not understand what you were reading, or they left something out.
A breadboard supply (pictured) can only supply that sort of current with <=6.5volt on the DC socket.
With 12volt on the DC socket, the 5volt (and/or 3.3volt) regulator will overheat and shut down (if you are lucky) with currents above ~150mA.
Leo…

Good point.

I read the datasheet of the AMS1117 (voltage regulator) and it states

 Vin = 12V  => Iout_max < 200mA for the 5V
 Vin = 12V  => Iout_max < 140mA for the 3.3V

So basically I was lucky that the load of all devices was just under 200mA.

The “real” circuit will be connected to a constant current source (Vin adjustable) or a better suited power supply (220V AC → 5V 500mA-2A).

@Wawa: You replied just in time. I was going to test the setup with all pins loaded (shift register AND the ADC).

While measuring one of us held the tips of the oscilloscope at different positions while the other one triggered the measurements and read values. While this was happening the person who measured stood over the circuit and was breathing on it.

:slight_smile:

Needless to say I feel pretty stupid wasting half a day on this.

Did you learn stuff? Of course you did! Don't feel stupid, we all do stupid things and as long as you learn from what you do then that makes it worthwhile.

Thanks for your help @PerryBebbington

My pleasure, glad you got it sorted :slight_smile:

I sadly have to reopen this thread.

Checking on the experiment this Saturday (after measuring continuously two days) the problem still persists.

I know tested it with two different setups:

  • 1 Thermistor (10kOhm) and 1 Power Relay share the same +5-GND line of the power supply => Voltage drops => different temperature readings
  • 1 Thermistor and 1 Power Relay on two separate +5V-GND lines => Temperature reading constant

All the peripheral chips were removed. I only used a digital pin and an analog pin of the Arduino NANO. The NANO was powered via the USB (Serial) connection. The sensors via external power supply (with enough current). They share a common GND.

This is the first time I ever experienced something like this. Usually I have a lot of different parts sharing one power line, but the power relay just disagrees with me.

Tomorrow I can test it with another power consuming sensor (MQ-2 Gas detector).

What I am still missing?

A thermistor is ratiometric, so as long as the voltage seen by the thermistor is the same as the ADCs reference voltage, the actual voltage doesn't matter. A voltage drop or rise of Vcc doesn't change the ratio or the reading. This is the case if you read the thermistor with the Arduino's analog inputs.

However you read it through a an external ADC, maybe that's using an absolute reference? Then a change in Vcc changes the reading of the thermistor.

So it sounds like your Vcc is not stable, and your ADC is not ratiometric. That will continue to give problems. A thermistor is best read with a ratiometric ADC such as the Arduino's analog inputs.

But the problem still persists when I use only the Arduino Pins.

I played with some LEDs and even at the small currents (10mA) the Voltage drops still occurs (Simple case).

It is more noticeable when the power relay is also connected (High power case).

When I use measurement cards (from National Instruments for example) the voltage on the support pins only drops if too much current is drawn. Otherwise I have the desired voltage across the board.

Should I power the Arduino also externally (Vin ~ 7V @ 1A). I read in other forums that the Vin voltage should be greater than 5V for the regulator to regulate properly.

circuit_cases.pdf (380 KB)

v3xX:
Should I power the Arduino also externally (Vin ~ 7V @ 1A). I read in other forums that the Vin voltage should be greater than 5V for the regulator to regulate properly.

No, no, No!

Do not even think of attempting to power the Nano via the on-board regulator or the Elegoo module with the thoroughly misleading “information sheet”. Without heatsinks, the regulator cannot supply significant amounts of current.

You refer to “I only used a digital pin and an analog pin of the Arduino NANO”. So your thermistor was connected to the analog pin and the Digital pin was powering a LED? What was powering it via the USB port? Was it a PC? The voltage will vary from time to time.

Now I see the problem. You seem to refer to

v3xX:
The sensors via external power supply (with enough current). They share a common GND.

This will be a critical problem. You absolutely must use the same power supply for the thermistor as the ADC, which is the 5 V pin of the Arduino.

I did not connect the Arduino via the power module. Something did not quite feel right.

The Arduino is powered over a PC via USB. Only the GND and the A/D pins are shared between the board. I wanted to supply all external parts (the finished circuits will have some more) not over the 5V of the Arduino because of the current demands. Therefore I supplied all parts via the same +5V line from the Elegoo module (as much as the onboard regulator allowed).

If I understand you correctly @Paul__B: All the components for measurement (Multiple thermistors, Photoresistors) need their own untouched power line?

Time to study the difference between a ratiometric A/D and an absolute (voltage) A/D.

A ratiometric thermistor/resistor must be measured with a ratiometric A/D,
so a varying supply on the thermistor is compensated by the ratiometric A/D.
That can only be done if both thermistor and A/D are powered from the same point.

An A/D runs on fumes, so it does't make sense to power it from another source.
Same for the other chips.
The only high current user is that relay.
Leo..

Thanks @Wawa. I will read up on ADC and their usages.

How do I supply higher currents to sensors, when the 20mA from the arduino is not enough? Do I need to build an extra circuit with the ADC and all the sensors or use the ratiometric ADC and put all components on the same power line?

I see that you also use an MQ-2 (your other thread).

Dump that breadboard supply, and power everything from a regulated 5volt/1Amp supply (phone charger).
Leo..

The MQ-2 is just for testing (because of its high current draw). I want to know whats happening when multiple elements draw current from the circuit. Is there a lower voltage limit where everything is still working (has to be >3.3V because of the ADC).

My main mistake was that I trusted the power supply to much. Tomorrow in the lab I can plug it in a constant voltage supply

https://at.rs-online.com/web/p/labor-netzgerate/8525235/

of better quality.

Do you think the power supply is the main problem or my understanding of the circuit (separate power supply for ADC and sensors)?

If you draw so much power that your supply voltage drops, fix that (i.e. get a better power supply).

v3xX:
If I understand you correctly @Paul__B: All the components for measurement (Multiple thermistors, Photoresistors) need their own untouched power line?

No, precisely the opposite. The reference voltage for the ADC - unless you wire it differently - is the Arduino 5 V line. Therefore all the resistors you wish to measure must be powered from that Arduino 5 V line.


Once that happens, fluctuations in the voltage (though an extra capacitor across the 5 V line may be a good idea) will not matter. Each input voltage is compared to the reference voltage; if the input voltage changes in proportion to the reference voltage, the ratio of the two stays the same and the measurement is correct. That is the meaning of the term "ratiometric".

However it may be a good idea for the relay module to be powered separately.

Update on the power supply:

The laboratory power supply worked perfectly. No voltage drop up to 6A. But this kind of supply is designed for stable voltage draw and measurements (very expensive).

The experiment we are designing has to move around and sometimes has to be integrated in other experiments. We bought a simple power supply

which supplies out parts at 5V or 12V constantly.

The sensors, ADC, Shift registers are supplied via the arduino over the powersupply using a voltage regulator. The high power parts are supplied using the second output.

A voltage drops still occurs. We connected 4 Powerrelays, 1 MQ-2 and a ADC with a few thermistors on the same line. The drop was only 450mV and the measurement is still correct (the supply and reference voltage still change). We also still use small cables we build ourselves. The finished project will consist of a PCB with short connections and no unnecessary loops.

Since the setup works with both (stable) power supplies I think it was a hardware error.

When I have time I make measurements of the references and supply voltages with varying power levels until the power supply can not provide enough current. Therefore I can determine the limit of power draw to ensure stable operations.