Ideas for motor speed control
October 5, 2008
I have an idea of how to do a electronic speed control for some DC motor (H-bridges).
I built this circuit and it works pretty well. Its a PWM generator based on this great tutorial . I had to convert it to a NE556 instead of a NE555 but it works well with a 100K linear pot..
So, the Pot is mechanical ! - I wanted the bot to be able to control its own speed, not manually set it. So, I came up with this - its a 12 bit binary counter (only using 6 bits), which should give me 64 speed settings. (specs)
1. I have the mc14040B on hand and I hate waiting for mail
2. 64 seems like a decent number of speed settings
3. 1 chip 6 resistors and 6 npn bipolar transistors does not seem like a huge number of components
4. stopping would be as simple as hitting the reset line
5. incrementing the speed would be just sending another clock pulse to the mc14040b
1. In order to decrement the speed I would need to reset the whole chip and "quickly" increment to a lower speed (seems sloppy)
2. I have a feeling that this could be done with fewer components.
I'm going to build it anyway and will keep this post updated - (if anyone is interested), but since there are so many great "techies" out there - some could tell me "ha ha GroG - my granny used to build that circuit with vacume tubes, now its a single solid state speed control package ZX115 ! "
Well it all went together pretty smoothly. I had a little trouble remembering on how to interface with other subchannels of the dio. But, luckly I mapped the hole thing out here .
The circuit currently has 330 Ohm resistor for all the bridges - but I will change this to Rik's suggestion of R/2 setup where each resistor is half its neighbor. This should allow for a binary step through a full 64 different speed values. Since I did not have the full resistor set the different values I can get with a 330 are as follows:
dio line - ohms
d0 - 330
d1 - 165
d2 - 110
d3 - 82.5
d4 - 66
d5 - 55
Yeah I know its messy - but it's a prototype :P
I did not reach 100% duty cycle - but I think I should be able to get it when I have lower resistor values.
Here are some of the results:
d0 high - 330 ohms
d0 & d1 high 165 ohms
all on 55 ohms
1. find other resistor values beside 330 so I can get 100% duty cycle when all inputs are high
2. connect the input to one of the large drive motors on loki
3. work on the web interface motor module to accept a speed value
DRAT DRAT DRAT DRAT DRAT ! I connected the large motors to the speed controller and all was working fairly well. With 7 speed control positions using 6 x 330 ohm resistors. When all the DIO ports were off there was still an irratating noise of the PWM. I wanted to see if I could turn this off completely. Unfortunately, I continued to experiment with the large motors - when I was going through a sequence of turning 100% duty cycle off, the H-bridge fried. And it looks like this time it took the computer with it. Yes, I know I should have them completely electrically isolated with opto-couplers, but I wanted to have the computers battery charged by the wheelchair charger. It was my intention to have a relay in the system which would connect the two power systems together only when charging... but now I will suffer for charging ahead.. DRAT! I have not yet assesed all the damage, the computer does not boot, I'm hoping i can re-initialize the bios - or at the least the CPU or memory is still good. Did is say DRAT?
1. ISOLATE THE CONTROL ELECTRONICS FROM THE POWER SYSTEM (EXPECIALLY HIGH CURRENT SYSTEMS)
DUH ! I know this - now I should actually DO IT ! I'll probably be using the DIO card (if its not fried too) and this will be a bit of a pain to create 96 opto couplers for it - but I'll do it to save the computer.
2. The H-bridges I'm using I believe are not heavy duty enough - they are supposed to have current protection - but I think they are a bit underbuilt for the wheelchair - I will be looking into options of geting or building a larger H-bridge that can handle 80 amps - the spike of dropping the speed from 100% down to a lower value seems to be frying it.
Crap, back to the drawing board. :P