Driving 12 motors from 7 functional H-bridge channels, all independent - Page 1
Forum section: electronics / projects

author: tom66
author_rank: Super Contributor
timestamp: May 09, 2014, 08:29:44 pm
content: Got a little problem on a board that needs to be in by 16th May for an art installation. Too little time, too much to do! (I had 5 weeks notice of this project and I've NEVER done anything this complex before...)Unfortunately due to my design error on the gerbers (a bug in the PCB editor or a hidden polygon, I'm unsure) only 7 channels of a 12 channel motor driver are functional.Each channel is a H-bridge and we have full PWM control over each half-H channel from 0 to 100% and with full phase shift capability (0-360 degrees wrt any other channel.) Using a PCA9685 device for the PWM. Frequency for all channels is fixed. So we have 14 outputs of 0-12V square wave at from anywhere from 40Hz to 1kHz which we need to drive 12 motors from, all independently in speed (though direction is fixed forwards.)We don't change speed often, and it's almost always a gradual increase over say a 10 second period from 0 to 100% speed.Solution 1is the easiest: use diodes and alternate the channel directions rapidly, so the motors are effectively driven rapidily one after another. This gives us 14 channels to use, however, we only get equivalent 50% motor speed. So we need a fast motor to make the display work and it's hard to source one with a low stall current and high enough torque to turn our models.Solution 2would try to encode additional channels in between the other channels. By adjusting the phase of channels relative to each other, we can "hide" a motor channel between two other channels. So we can drive 3 motors off each 2 motor device by running it off the differential between the positive and negative of the left and right motor drivers. The tiny glitch that might occur when adjusting phase is not important for our application. This is fairly complex to program for 12 motors. It would give us 13 channels to use though. We'd get full speed control over all 13 channels, and we'd also get full power.I'm most interested in the second solution. However, I'm not sure if it will work, and the software to do this will be fairly complex and liable to bugs. Does anyone have any ideas, or possible other solutions?

author: TVman
author_rank: Frequent Contributor
timestamp: May 09, 2014, 08:54:37 pm
content: I just had a brain pop from reading this.

author: tom66
author_rank: Super Contributor
timestamp: May 09, 2014, 09:00:06 pm
content: Quote from: TVman on May 09, 2014, 08:54:37 pmSomething I am doing wrong?

author: kolbep
author_rank: Frequent Contributor
timestamp: May 09, 2014, 09:19:32 pm
content: If you have another board (also with the same fault),and, then take the portion of that board that is not affected by the fault, and populate it with your H-Bridge drivers, etc, but not the Microcontroller.Then take jumper wires from the pins on your 1st boards Microcontroller (The pins that are for the extra 5 channels that you cannot use).Jumper those pins and the ground over to the 2nd board (but connecting it to the set of H bridges that you have populated).You might have to lift those pins on the 1st boards microcontroller, and solder the jumpers onto the pins itself (depending on the circuit itself).Remember to jumper your ground and supplies over as well.Then if your Micro tries to control the first 7 motors, it will be using the drivers on the 1st board. And when it wants to control motors 8 to 14, then it will be controlling them through the h bridges on the 2nd board.If your H Bridges are through hole, and you do not have a spare board, then, as this is an emergency, then make up the next set of h bridges using Veroboard, or even Breadboard and jumper across as above.I hope this makes sense to you, and can help get your thought processes jogged.P

author: TVman
author_rank: Frequent Contributor
timestamp: May 09, 2014, 09:21:29 pm
content: Quote from: tom66 on May 09, 2014, 09:00:06 pmNo. It's not you it's me. I don't have a lot of brain power,I'm only 11.

author: os40la
author_rank: Regular Contributor
timestamp: May 09, 2014, 09:37:26 pm
content: Could you cut traces and/or add bodge wires to the H-bridges that are not working?

author: tom66
author_rank: Super Contributor
timestamp: May 09, 2014, 09:46:30 pm
content: Quote from: os40la on May 09, 2014, 09:37:26 pmWe can wire the motors directly up to 12V&GND, if that's what you're asking, yes.

author: tom66
author_rank: Super Contributor
timestamp: May 09, 2014, 10:06:29 pm
content: I forgot to consider: motor inertia.... The motor won't stop as soon as we stop driving it, especially if it has no load! (In our case the mode will be very light, about 1/10 the maximum stall torque.)The diodes block any return current path, and so actually, it turns out, under light load, driving each motor through diodes alternately gets close to the maximum rated rpm of the motors...The hidden channel idea is neat and I want to investigate it at some time, but for now, I'm probably going to stick with what I know is possible, and that's this method.

author: johansen
author_rank: Super Contributor
timestamp: May 09, 2014, 10:52:19 pm
content: since they all run the same direction just connect the 12 motors to the positive rail and the middle node of the h bridge.this utilizes the low side switch of the h bridge as the pwm element.you can run 14 motors independently this way.

author: fmaimon
author_rank: Unknown
timestamp: May 09, 2014, 11:42:42 pm
content: As you don't need direction change, each full H-bridge is two half bridges, each one capable of changing the speed of one motor. One side of the motor to the middle of the half bridge and the other to ground.As you have 7 H-bridges, you have 14 half bridges to drive 12 motors.

author: tom66
author_rank: Super Contributor
timestamp: May 10, 2014, 12:00:14 am
content: That is the most obvious solution, I cannot believe I did not consider that.Sometimes, you just need additional input to solve a problem like that.