# What resistors do I need for a simple LDR triggered h-bridge?

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.

• 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. – Chris R Hall Aug 3 at 18:30
• 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. – JRE Aug 3 at 18:35
• 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. – Chris R Hall Aug 3 at 20:06
• 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. – JRE Aug 3 at 20:09
• 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? – Chris R Hall Aug 3 at 20:42

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.