Why do additional components affect analogue sensor maximum values?

Hi,

i'm making an automatic plant watering system, thanks to this forum and it's great users and moderators i've already solved a few problems that had me banging my head against the wall!

My test bed at the moment is :

  1. Uno R3.
  2. 8 Channel multiplexer for capacitive soil moisture sensors.
  3. 16 channel multiplexer for relays.
  4. I2C 1602 LCD for display.
  5. 8 Channel relay module.
  6. A 12V stepdown converter to power the above, which outputs 3.3, 5 and 12 volts.

Everything is working but i noticed that, after adding the 16-channel multiplexer and the 8-channel relay module that the analogue sensor's maximum value has dropped by 200, and the LCD display has dimmed. Relays are switching on properly, the sensor value is higher when drier and lower when wetter so it's behaving correctly, the LCD display is displaying, it's just this seeming drop in current to the LCD plus the drop in maximum value for the sensor that's puzzling me.

The stepdown converter can handle 800mA and the testbed only draws 190mA when all of the above is plugged in and a relay is switched on so it seems i have enough power.

Block diagram below (click for larger image) :

Any help greatly appreciated, thanks, Gary.

Are you using a star ground/power wiring or a point to point wiring?

What is the value(s) of the ceramic and electrolytic caps are you using?

Have you considered the current carrying capacity of your breadboard?

Idahowalker:
Are you using a star ground/power wiring or a point to point wiring?

What is the value(s) of the ceramic and electrolytic caps are you using?

Have you considered the current carrying capacity of your breadboard?

Thanks Idahowalker. i don't know about the wiring conventions you've mentioned (though i know of star windings in terms of generator setups) so i'll read up on those, thanks.

I'm not using any caps and would appreciate some education as to their use in this setup, i have used them for smoothing before in simple circuits.

I didn't think of the breadboard current carrying capacity, i will look into that too.

Thanks for your help, Gary.

Each relay coil draws about 75mA from your 5V supply, how many are turned on at the same time? The LCD backlight draws upwards of 50mA depending on brightness. What is the 5V supply voltage when everything is powered?

Remember wires are just low-value resistors, any current flowing will drop some voltage across a wire, and for thin wires and large currents it can be very significant.

You should run sensors supply/ground separate to any high current devices, so that these voltage drops don't get superimposed on the sensor readings.

I suppose this sensor you're talking about is connected to a separate regulated 3.3V supply.

The change in analog valueand the dimming of the display are signs of inadequate power supply. However I'd expect the 3.3V reading to go UP rather than down, as the reference voltage (Vcc) of the Arduino's ADC is going down. Now I can't help to wonder why you use an analog mux for just a single input...? Maybe that mux is misbehaving with too low voltage? It does need a decoupling cap (100 nF ceramic), but if it's a breakout board that's probably in place already.

A solderless breadboard can handle up to about 500 mA. Internal resistance can cause voltage drops.

Using a 74HC4067 mux for the relay module appears totally inappropriate. I'd use an MCP23017 port extender for that (connects conveniently to the I2C bus so no need for extra pins for it), though again you do have sufficient pins on the Arduino to do without and make your circuit simpler.

JCA34F:
Each relay coil draws about 75mA from your 5V supply, how many are turned on at the same time? The LCD backlight draws upwards of 50mA depending on brightness. What is the 5V supply voltage when everything is powered?

Thanks JCA34F, only 1 relay will be on at a time. 5V supply voltage with everything turned on is 4.988V.

MarkT:
Remember wires are just low-value resistors, any current flowing will drop some voltage across a wire, and for thin wires and large currents it can be very significant.

You should run sensors supply/ground separate to any high current devices, so that these voltage drops don't get superimposed on the sensor readings.

Thanks Mark, i hope i've understood you, i attached another stepdown converter to the bench supply in addition to the first one and tried running just the sensor from that but same result. The 3.3V supply from the converter was 3.289V, these capacitive soil moisture sensors can run on anything from 3.3V to 5.5V.

wvmarle:
I suppose this sensor you're talking about is connected to a separate regulated 3.3V supply.

The change in analog valueand the dimming of the display are signs of inadequate power supply. However I'd expect the 3.3V reading to go UP rather than down, as the reference voltage (Vcc) of the Arduino's ADC is going down. Now I can't help to wonder why you use an analog mux for just a single input...? Maybe that mux is misbehaving with too low voltage? It does need a decoupling cap (100 nF ceramic), but if it's a breakout board that's probably in place already.

A solderless breadboard can handle up to about 500 mA. Internal resistance can cause voltage drops.

Using a 74HC4067 mux for the relay module appears totally inappropriate. I'd use an MCP23017 port extender for that (connects conveniently to the I2C bus so no need for extra pins for it), though again you do have sufficient pins on the Arduino to do without and make your circuit simpler.

Thanks wvmarle, in my original post setup the sensor was running from the stepdown converter that was powering everything (the converter uses AMS117s for the 3.3V and 5.5V outputs, the 12V output is straight through), i then attached another converter to the bench supply and ran only the sensor from that but the sensor output is still low.

Regarding inadequate power, the 5V and 12V readings are fine but you're right about the 3.3V, it reads 3.773.

Regarding the mux, it will have all channels used in the final setup, i'm just developing it in a modular fashion for simplicity and ease of testing and it can operate on 2 to 10 volts so has enough supply. The datasheet doesn't mention a decoupling cap but yes it is a breakout board.

Thanks for the port extender suggestion i'd not heard of those.

Thanks all for your help, Gary.

Apologies all! The sensor signal pin going in to A0 was practically broken off, i swapped out the wire and all good.

Thanks again for your help and i'm sorry it was a daft reason for the problem in the end, Gary.

wvmarle:
...

Using a 74HC4067 mux for the relay module appears totally inappropriate. I'd use an MCP23017 port extender for that (connects conveniently to the I2C bus so no need for extra pins for it), though again you do have sufficient pins on the Arduino to do without and make your circuit simpler.

Thanks again wvmarle, your comment on the MPC23017 caused me to find the 74HC595 which is a much tidier solution than mine.

Thanks, Gary.

That will also do the job well, but that's a shift register - a very different animal, different approach needed again.