0

I am working on a toy car which is following the "light" and I am totally new at raspberry pi and circuits.

In this video, he is using 1 ldr. I need 3-4 ldr to turn the car to left or right. (I am planning to put ldrs to different side of the car and i will follow towards that which ldr returns me call like "here is the light").

Should i make different circuits(3-4 different circuits in the video) and connect to raspberry ? If so, should i use different ground and different voltage pins to each circuits? In short can i set like "pin3.3v and gnd for the circuit1 and the other 3.3v and gnd for the circuit2.. or can i use same ground for all different 3.3voltage pins?

what i want to do is like: picture as you see in picture there are same but 2 different circuits(both connected to different 3.3voltages and grounds)

1

You do not need to use different ground and voltage pins for each sensor. In fact, it makes no difference at all, because all of the ground pins come from the same source(so they are all connected) and all the 3.3V pins come from the same source. So even if you use different ground pins, they will all still be connected anyway.

In fact, you could build all the sensors on the same breadboard, with each using the same power wires(the red and black wires) - the only pins that need to be different for each sensor(ldr) are the signal wires(the yellow wires).

  • can i use that 2 sensors like image.ibb.co/iuGJWT/paralel_pins.png ?? If i bind these ldr-capacitors parallel, can my raspbery understand from the current of yellow and green line ?? – abidinberkay May 20 '18 at 23:48
  • 1
    Exactly. Yes, the rpi will understand from the yellow and green lines - it's no different, really, than your previous circuit, but it's easier to implement. however, PLEASE NOTE: make sure the white bands on the capacitors are connected to negative(the black wires), not the other way around., or else your capacitors might explode! @abidinberkay – scitronboy May 21 '18 at 15:55
  • thanks man. yes i will look at capacitor +/- signs on it while i am connecting them, thanks again. can you suggest which size of capacitor should i use if i use 3-4 sensors for car to rotate?(for example 1mf capacitor is good for each ldr to prevent raspberry to explode or should i use different size or ohm?) btw i picked your answer as correct, it solved my original question, thanks again. – abidinberkay May 21 '18 at 17:55
  • What do mean? just use the capacitor size that the video/instructions you are using sugested. Also, the raspberry pi won't explode, but electrolytic capacitors can explode(by explode I mean they might start crackling and smoking) if you wire them backwards. I very much doubt that a 1mf capacitor is electrolytic, though, so you probably don't have to worry. @abidinberkay – scitronboy May 21 '18 at 18:30
  • i mean, i worry about the current which is going to raspberry back. i will bind 4 ldr-4 capacitor in parallel and check the current on blue-green-yellow-pink cables in pictures but i am not sure about should i use extra resistor to protect raspberry? image.ibb.co/b4eYko/diren_devre.png – abidinberkay May 22 '18 at 15:02

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.