Electronics forums (power chair project)

Any recommendations for where to go for electronics discussions (preferably somewhere I won’t get flamed for asking noob questions)? I have a motor control circuit and arduino code that I need to troubleshoot.

Could post it here or attend one of the Electronics Wednesday sessions…

+1 to post here - lots of real experts :slight_smile:

As a noob I can attest that people will be very friendly no matter the question you ask.

So I’m building a dual H-bridge for controlling high current motors to go in a power chair (I’m not even sure if I will use it for this purpose but I really want to get this H-bridge working, if just for the learning factor). I used EveryCircuit to design the circuit and prototyped it on a breadboard with much trial and error. I then decided to solder it to a perfboard. I was hoping (in vain) that once it was soldered up I would avoid the problem I was having, which was that the motors would turn but very slowly. They are 24v motors from an iRobot vacuum cleaner. The power supply is running at 15v but the motors seem to run ok when connected directly. I also noticed that when the circuit is powered up the voltage across the power supply leads drops from 15v to around 4v. Circuit diagram here (EveryCircuit) or here (google photos - this one is the more complete diagram).

I’m using an Arduino UNO and joystick for input to the H-bridge. Code below (note that at this stage the project requires one motor for forward/backward movement of the rear wheels and one - which will be a servo eventually - for left/right control of the front wheels):

#define joystickx A0
#define joysticky A1
#define pwm1 5
#define pwm2 6
#define pwm3 9
#define pwm4 10

int motor_controlx;
int motor_controly;

void setup() {
pinMode(pwm1, OUTPUT);
pinMode(pwm2, OUTPUT);
pinMode(pwm3, OUTPUT);
pinMode(pwm4, OUTPUT);
pinMode(7, OUTPUT);
pinMode(8, OUTPUT);
pinMode(11, OUTPUT);
pinMode(12, OUTPUT);

void loop() {
motor_controlx = analogRead(joystickx);
motor_controlx >>= 1;
motor_controly = analogRead(joysticky);
motor_controly >>= 1;
if(motor_controlx > 255){
digitalWrite(pwm2, 0);
digitalWrite(7, LOW);
digitalWrite(8, HIGH);
analogWrite(pwm1, (motor_controlx - 256));
if(motor_controlx < 255){
digitalWrite(pwm1, 0);
digitalWrite(7, HIGH);
digitalWrite(8, LOW);
analogWrite(pwm2, (255 - motor_controlx));
if(motor_controly > 255){
digitalWrite(pwm4, 0);
digitalWrite(11, LOW);
digitalWrite(12, HIGH);
analogWrite(pwm3, (motor_controly - 256));
if(motor_controly < 255){
digitalWrite(pwm3, 0);
digitalWrite(11, HIGH);
digitalWrite(12, LOW);
analogWrite(pwm4, (255 - motor_controly));
digitalWrite(pwm1, LOW);
digitalWrite(pwm2, LOW);
digitalWrite(pwm3, LOW);
digitalWrite(pwm4, LOW);
digitalWrite(7, LOW);
digitalWrite(8, LOW);
digitalWrite(11, LOW);
digitalWrite(12, LOW);

Hi Dan,
had a quick look at your circuit. Might be an idea to measure the motor current when connected directly to the supply.

You say the PS volts drop from 15 to 4 with the bridge. Most likely culprit is simultaneous turn on of high AND low side MOSFETS, effectively shorting the supply rails. What is PS current when this happens?

Is anything getting hot? Maybe the MOSFETS?


Also noticed in your schematic the bias resistors (4k7, 10k) are swapped on LH and RH sides.