The stalled current of a DC motor is calculated by the voltage across it divided by its resistance. But the bipolar transistor cannot supply much current because its base current is too low.
So now it appears I'll need a way of limiting this current so that it doesn't draw a massive current while the motor is stalled, which could potentially damage both the transistors and the battery... I've used up all of my fingers and toes counting all of the problems that have been spawned by this 'basic' problem
Only one PA signal at "0" elsewhere on any of the five other motors will bypass the 'organic' ground. This will defeat the protection against both PA0 (CW) and PA1 (ACW) being high at the same time. It's not a simple problem to be 'fixed later when I come to it'.
An 'organic' ground has no benefit in actual practice. We use real logic (e.g. diodes) to protect from illegal states.
So now it appears I'll need a way of limiting this current so that it doesn't draw a massive current while the motor is stalled, which could potentially damage both the transistors and the battery... I've used up all of my fingers and toes counting all of the problems that have been spawned by this 'basic' problem
The robot, being a toy, may have been designed to tolerate a stall condition. It would be a good idea to measure the stall current first to determine if it is actually a problem.
The robot, being a toy, may have been designed to tolerate a stall condition. It would be a good idea to measure the stall current first to determine if it is actually a problem.
I'll get my friend to check the stall current next time I speak to him... unfortunately since he paid for the arm, I don't have access to it until he brings it over and "helps" me connect it to my microprocessor.
Protection diodes are probably unnecessary in this particular circuit, since the supply is only 3V. The BJT's are probably 40V rated (or more), and a small (0.1 µF) capacitor across the motor should easily keep spikes from rising above that.
Only one PA signal at "0" elsewhere on any of the five other motors will bypass the 'organic' ground. This will defeat the protection against both PA0 (CW) and PA1 (ACW) being high at the same time. It's not a simple problem to be 'fixed later when I come to it'.
An 'organic' ground has no benefit in actual practice. We use real logic (e.g. diodes) to protect from illegal states.
I'm fairly sure I just solved this problem with a schematic I just drew up; a diode will connect the ground portion of each H-Bridge to the actual ground, as well as to the two diodes leading to the uC ports for that motor. The H-Bridge current can simply pass through the diode to the battery ground, but each H-Bridge is isolated from the others since they each have a diode between them and ground.
I sent the (simplified) schematic to marcbarker since he seems to be the only one who has reviewed my original ground plan, but I'll attach it here as well.
Please bear in mind I used the original much simpler, but obviously non-functioning circuit to demonstrate the principle, but I will apply it to the working H-Bridges if the concept is sound.
fx, rx, gx labels refer to forward, reverse, and ground respectively, x from 1 to 3 referring to each motor's h-bridge. The labels are used to simplify the schematic. Sorry if the light green writing's a little unclear, it didn't scan as well as I had hoped.
I'm fairly sure I just solved this problem with a schematic I just drew up; a diode will connect the ground portion of each H-Bridge to the actual ground, as well as to the two diodes leading to the uC ports for that motor. The H-Bridge current can simply pass through the diode to the battery ground, but each H-Bridge is isolated from the others since they each have a diode between them and ground.
Protection diodes are probably unnecessary in this particular circuit, since the supply is only 3V. The BJT's are probably 40V rated (or more), and a small (0.1 µF) capacitor across the motor should easily keep spikes from rising above that.
You're probably right, bypassing the motor is always a good idea anyway to suppress the RF generated by it. Little motors can generate some surprisingly high frequency harmonics which extent into the UHF and microwave bands.
EDIT:
giftiger_wunsch said:
I just drew up; a diode will connect the ground portion of each H-Bridge to the actual ground, as well as to the two diodes leading to the uC ports for that motor.
Hmm... how much voltage would I lose through the diodes? Maybe there's a way I can cut out a diode somewhere, there are a lot of diodes used... I can't see a way though.
Five motors, run from two pairs of D-Cells. I simplified it to one motor to start with to avoid overcomplicating the issue. (I realise the irony in the fact that I am saying 'avoid overcomplicating the issue' in post number 212, yes.)
As I mentioned before, monitoring the motors in use with the controller reveals that they take 200mA when one motor is in use, but there doesn't seem to be a problem with halving this to 100mA if two motors are run at the same time. I didn't check how well they perform when all 3 of the motors on the larger circuit are run simultaneously, but in any case it's an unlikely scenario.
Hmm... how much voltage would I lose through the diodes? Maybe there's a way I can cut out a diode somewhere, there are a lot of diodes used... I can't see a way though.
No particular reason: as it stands, the arm is powered by 4 x 1.5V D-Cells, split into two to power 2 and 3 motors respectively. I don't have a problem with increasing the voltage of the power source if necessary; I was just sticking to the D-Cells since that's the power supply already in use. Plus the fact that we realised we had to rush out to buy those batteries when we had finished assembling the arm, and they weren't exactly cheap
By the way, 0.7V voltage loss per silicon diode = ouch
Here's how I would solve the shoot-through (forward and reverse at the same time) problem. One resistor, one transistor. It assumes that for a moment (a few nanoseconds) in a fault condition, that the fault current is beta limited.
Connect the collector of the 'new' transistor to the base of TR2. The base resistor of the 'new' transistor may be 10K.
Here's how I would solve the shoot-through (forward and reverse at the same time) problem. One resistor, one transistor. It assumes that for a moment (a few nanoseconds) in a fault condition, that the fault current is beta limited.
Connect the collector of the 'new' transistor to the base of TR2. The base resistor of the 'new' transistor may be 10K.
I already solved that problem by adding a Schottky diode which uses less parts than your suggestion. https://www.electro-tech-online.com/attachments/3v-h-bridge-gif.32205/
Your circuit does the same thing using a transistor. If you want to do it that way then I'd recommend increasing the base resistor on the new transistor to 10k.
The maximum reverse voltage which is likely to be experienced in my circuit is about 3V; providing they won't fail that low, they seem like the logical choice.
So if the signal diodes in my schematic are replaced with schottky diodes, any more comments / suggestions?
Sorry hero, I didn't get a proper chance to look into the current-limiting addition you added to your schematic earlier, and I have a feeling it may take me a while to get my head around it anyway. If my grounding theory works the way it should the both-high problem should be solved though, and with any luck mneary may be correct about the motor's stall current not being a problem - I'll check that when possible.
I saw post #165. I missed that the diode was Schottky so I missed the significance. Vcesat of Tr1 and Vfd of the diode are less than the base turn-on of Tr2.
Your circuit is better because it uses fewer parts. My circuit uses parts the OP probably already has on hand.