Using sensors with Motor Shield

My project consists of 3 piggy back boards.

First the Arduino UNO, then the Motor Shield on top, then a self-made circuit that incorporates a temperature/humidity sensor on top of that.

The sensor works if the pins of the self-made circuit is pushed directly into the headers on the UNO. It does not work when pushed into the headers of the Motor Shield, when all three are combined.

The voltage across the Vin - GND pins of sensor is correct, but output voltage is almost non-existent. Perhaps not getting enough current through the sensor? Placing a multimeter in series with the input the sensor suggests that this is the case.

Any ideas about what might be going wrong?

Are you sure that the pins used by your self made circuit are not used by the motor shield?

Yeah, definitely not using motor shield's hard-wired pins.

How about a link to the motor shield you are using?

This a reply I got on a different category of the forum, and my answers to it:

Which motor shield?
How are you powering it?
Which pins is your sensor board using?
Are there any clashes with pins used by the motor shield?
Have you checked continuity with a multimeter while the assembly is
Have you check the power supply voltages when the whole thing is powered up?

Standard Arduino Motor Shield based on L298 duel h-bridge.

I power the circuit with either 5V from USB to Uno, or from 12V, 2A bench power supply connected to screw terminals of motor shield. The results are the same.

The sensor gets 5V from circuits common Vcc track and ground track. Humidity output voltage to pin A0 set up as input. Temperature thermistor outputs changing resistance interpreted through voltage divider, connected to pin A1.

No clashes with hard-wired motor shield pin assignments.

No continuity on powered down circuit.

I get 5V across the sensor input to ground, but the sensor output voltages are basically zero. Connecting multimeter in series with input to sensor shows no current flowing. The problem does not exist when running circuit directly from Uno, so there doesn’t seem to be a short circuit anywhere on my assembly. The problem occurs when I place the motor shield in between.

I’ve added photos of both setups



This is the motor shield I'm using:

I notice that in the photo "circuit works that the pin for A5 is hanging out of the socket header of the arduino, but in the other photo it is plugged into the header.

That was just a mistake I made when I took the photo. That's not the way I normally connect it up.

Found my mistake. It is indeed using pins assigned to motor shield.

Pins A0 and A1 are used by the motor shield to sense current going through the load.

This fact is marked on the underside of the board, while the markings indicating which digital pins are used by the motor shield is found on top. I never looked closely at the underside...

This mixed sensation of feeling both stupid and relieved :)

Thank you for your replies.