I'm working on a project collecting data from passing cars. I have created a circuit as shown below. It consists of a photo diode (PD) and a Light Dependant Resistor (LDR) for measuring light. A LED for indicating status and a Sharp proximity sensor.
My problem is with the proximity sensor. When I attach it as shown without the other components it works fine. When I attach it along with the other components as shown in the circuit diagram, the proximity does not work (reading does not reflect distance).
Any ideas? Is anything obvious wrong with my circuit?
No looks ok.
Make sure the ground shown is connected to the ground on the arduino. Then start backwards. Connect up your distance sensor and add the other things one at a time and see which one breaks it. Then find out if it is just this one or is it the accumulation of the other circuit parts.
I have cut power to the LDR and the photo diode. Proximity sensor still not working. Does that indicate anything to anyone? I guess I really have to take everything apart....
I was attaching my circuit to the arduino through an adafruit data logger shield. Attaching my circuit directly to the arduino I can read all the sensors as I want.
I have checked that all the pins on the shield that connect to the arduino are electrically connected (How do you say?) to the appropriate outs on the shield.
The data logger shield appears to work, as I can read and write to an SD card using it.
Sorry for not originally mentioning the shield. Being a beginner, I was sure the fault was with my own circuit. I ,naively, thought stuff could just be piled on to the shield.
Yes if it uses the same pins as the shield or if the interrupts in the software interfere with the operation of your circuit.
I have only run code accessing my sensors. So, I should find out what pins are being used by the shield?
If my shield makes a pin unusable, why would the designer bring the connection through a supply a point for creating a connection to that (unusable) pin?
If my shield makes a pin unusable, why would the designer bring the connection through a supply a point for creating a connection to that (unusable) pin?
Because it is probably not totally unusable. For example some of those pins are for the SPI bus. This can coexist with your shield if you want to add an extra device to the bus but is not usable if you want them to light LEDs and such.