I am attempting to build this circuit: https://www.instructables.com/id/H-Bridge-on-a-Breadboard/ But instead of switches, I want ldr s like this circuit: https://www.instructables.com/id/Simple-Easy-Diy-Light-Following-Robot-Without-Micr/ Both of these projects share many of the same parts so one would think this would be simple but it isn t (for me). I am using 9v from 6aaa batteries and the 2222 transistors and ldr s listed. I have a feeling my ignorance of ohms law is to blame here or my limited grasp on how to decypher a circuit diagram. I am willing to learn if you are willing to teach. "googling it" hasn t gotten me far.

  • \$\begingroup\$ to clarify, I do know ohms law. I am just ignorant as to how to use it in this situation. and I suspect that is one of my struggles with this project. \$\endgroup\$ – Chris R Hall Aug 3 at 18:30
  • 1
    \$\begingroup\$ Ohm's law is far from being your problem. H-Bridges go forward and backwards. They are generally driven by pulses rather than DC. The LDR circuit in the one project does not switch the motors on and off, it drives them with a signal proportional to the light (brighter light, more current to the motor.) If you want to use the LDR example, then stick with that project. An H-Bridge does you no good in that project. \$\endgroup\$ – JRE Aug 3 at 18:35
  • \$\begingroup\$ are you suggesting that pulsing the light will correct the issue or is there more? I'm not driving this with ambient light. pulsing it is no issue. also, I've already built the other project. I'm not building this project to impress people with my robot. I have a functional use for it if I can get this minor snag worked out. also, I'm aware that the h-bridge goes in both directions. that's the entire purpose of me needing it. \$\endgroup\$ – Chris R Hall Aug 3 at 20:06
  • \$\begingroup\$ You don't have "a minor snag." You have a total conceptual failure. Neither circuit works like you think it does, and you want to combine them based on that incorrect understanding. \$\endgroup\$ – JRE Aug 3 at 20:09
  • \$\begingroup\$ OK, well I already have a product that does exactly this that I'm imitating so clearly it can work. I'm either not explaining what I'm doing properly or you are assuming I know nothing. droidscript.org/product/bigtrak I have one of these. it works. but I want to use a similar concept to drive a gutted rc car. the control system requires the motor to go in either direction. obviously there would need to be a way to control current direction and a way to switch between those using light from a phone screen. If ldrs cannot be used with an h-bridge, then what is the correct way? \$\endgroup\$ – Chris R Hall Aug 3 at 20:42

From what I understand, you simply want to replace the switches in the H-Bridge circuit with a photo resistor to trigger a motor while allowing it to be reversible. I used the Falstad circuit simulator to mock up this kind of circuit and I believe it may be what you are looking for. Below is just a schematic of it.


simulate this circuit – Schematic created using CircuitLab

As for the actual simulation, you can view it here. I could not find photo resistors, so I used potentiometers to mock the variable resistance of a photo resistor. To try out the circuit, use the Resistance sliders on the right side of the simulator. You will notice that the two outputs at the bottom of the circuit, which represent the motor output, will change voltages independently as the resistance of the photo resistors change. Keep in mind simulations do not often reflect reality, in this case it did. I built the same H-bridge circuit with potentiometers and two LEDs to show motor polarity (Their terminals are swapped relative to each other). Alternating the potentiometers randomly caused the the LEDs to light one at a time with a non-zero voltage reading through both LEDs.

Potentiometer Polarity +/-

Potentiometer Polarity -/+

Interestingly, when the potentiometers were swapped out for photoresistors the whole circuit failed. The potentiometers have a max resistance of 10k while the photoresistors have a max resistance of 8k. I doubt the 2k resistance difference is what causes this, but the nature of the two resistors themselves, please correct me if I am wrong. From this, it seems like the earlier comments are correct and you will not be able to use photo resistors to control an H-Bridge.

Dead circuit

Dead circuit

Using a microcontroller to interpret the photo resistor values and output PWM based on these values could be a solution as well for LDR H-bridge behavior. If you would like to get a head start on figuring out how to read circuit diagrams for the future, I would recommend this thorough tutorial by SparkFun.

  • \$\begingroup\$ the purpose was to avoid a microcontroller. but I found an easier way. thanks for your work, that was much more helpful than the other guy. \$\endgroup\$ – Chris R Hall Aug 7 at 20:49

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.