Search all of my sites with Google

Friday, December 28, 2007

Building my own motor, brushless, at that!

Since I can't afford to buy a motor, and fixing the one I have may not be possible for the time being (as I don't have the right thickness of wire on any other motor to unwind from and rewind to the failed one), and none of the other DC motors I have is anywhere near what's needed to run the bike, I finally decided to build one, or rather, rebuild an AC motor into a DC motor.

I don't have any brushed AC motors that could handle enough current and/or have the right size or shape or mounting points on them to be able to use for this purpose, but I do have three fairly hefty cieling fan motors, each of a slightly different design. The best one is a Hampton Bay motor from 1985. It's made as a brushless AC motor, with an outer ring of staggered ferrous elements embedded in a 5.5" solid ring of nonmagnetic material (probably bismuth), which is friction-fit into the rotor "bell" that the blades bolt to, and a 9-tooth stator inside that is about 4.5" across, with two layers of coils, one with less windings than the other and also farther inside the stator (away from the outer ring).

The way it originally worked, the outer windings were series-circumferentially wound, all clockwise, and run out to a pair of wires. The inner windings were done the same way, separately from the outer set. To get low fan speed, only the inner would engage. To get medium, only the outer. To get high, both would engage (done by the switch on the lampshade section, or a wall control if you had one). Reversing it would require switching the direction of the AC input to the coils, which I guess changes the phase relationship to the outer ring staggered segments, causing reverse rotation (guessing).

The way I need it to work will be as a 3-phase, 9-tooth, 12-pole BrushLess DC motor (BLDC), run from a different, more complicated kind of controller than the one I need for the regular Brushed DC motor, of course. Fortunately, there are lots of RC Aircraft DIYers who have been rewinding CDROM (and similar) motors for years to do the same thing. (except that CDROM motors are already BLDC 3-phase, as are HDD and FDD motors. Case fans are also BLDC, but all the bad ones I have taken apart for their Hall sensors were 2-phase rather than 3, with only 4 teeth and likely very few poles, making it a lot easier to control with a very simple two-transistor circuit.

For what I have to do, if I had the PIC or AVR programming equipment (some of the PIC stuff is super-easy to build, so I don't really have an excuse for not trying it, except for not having any PICs), I could use one of the many freely published designs (including software) that have been made for RC Aircraft or Boat control, and simply upscale the power-output stage for my motor. But since I don't have the PIC or AVR equipment or any of the actual uC's to program, and no money to buy any, I'll have to design my own made from parts I already have here.

Now, I have a lot of stuff in various "dead" equipment, as the last post explained, but I don't have everything needed to just quickly adapt something for the task, because it's kind of complicated in how things have to be turned on and off, so that the batteries are never shorted out, and the windings are turned on in the correct sequence and at the right times for the right amount of time, based on how fast the motor is spinning. It's not simple, at least not for me. Especially considering that there are several possible ways to choose to wind the motor. I also have to calculate how many windings of what diameter wire will get me the torque and speed I need. More windings = more torque, less windings = more speed. I need torque way way more than speed. Also, the more powerful the magnets on the outside, the more torque, and the less current flow there is, making the motor more efficient.




I actually have a basic block diagram on a napkinsketch, but don't yet know even what parts I need to use to create the unit from with those blocks. It's a fairly simple idea, but will probably rapidly get more complex as I go. Starting with the basic Y-scheme (Wye) where all three windings (two each of A B and C) are connected together at one end, and the other end of each brought out as a single terminal for the motor to run from.... Basically, all I have to do is shift a 1 around a 3-output ring counter (like a 4017 used as "count-to-n"), then invert that output and use the two "zeros" that are now "ones" to turn on two of the windings at any one time (A&B, B&C, or C&D). That is what sequences the motor, "enabling" each power driver section in turn. The clock input for this is driven by the Hall sensors that are verifying the position of the rotor on each rotation, by sensing the change in magnetism between poles of the magnets attached to the rotor. The faster the Halls detect change happening, the faster it clocks the sequencer, which keeps it in sync with the motor speed. If the motor is forced to slow down, by new load on it or whatever, the slower the Halls will signal and thus the slower the rotors will be powered, to keep the whole thing syncronized.

The actual power control is still done by good old PWM turning all the pairs of MOSFET's on, with high and lowside drivers for H-Bridge type control, only 3-way instead of two-way like the Brushed DC motors could use (though for a different purpose).
The throttle will still change the PWM duty cycle, higher for more power, and lower for less. The sequencer above will simply enable or disable each pair of power output sections as needed to drive the right pair of coils in the right polarity, so they don't short out the input power (battery) to ground.

It sounds complicated, but it also sounds easy. I'm not sure which it will finally be. I *am* sure I will get some smoke before I am done with a prototype, though. :-P

Now, the good news is that for a temporary test unit, I have found an old HP Laserjet scanning mirror (that used to draw the images on the toner drum to be transferred to paper to pick up toner to get melted onto the paper) that has an integrated controller chip on it designed back in the 90's specifically for 3-phase small BLDC's. This one, unlike an earlier one I found on a 5.25" floppy drive, has an option for a non-crystal clock input, so I can vary it's speed. The other would not be variable, and I need that for testing the motor. Now, this chip can't handle more than about 8 watts, but I should be able to use it to drive MOSFETs that *can* handle my motor's power (which I do not yet have any idea how much it will be). It also is made to run at 24V, which is good, as that's probably the voltage I'll test the system at. It's going to take a while to modify the circuit to work like I need it to, but i don't have to build the sequencer or other stuff--this has all that built in; I just have to clock it, hook it up to the Hall sensors I will need to install on the stator, and hook it up to the power output section I'd have to build for *any* BLDC controller I'd be making. Hopefully I can install the controller chip and everything but the MOSFETs inside the motor casing--I'd like to put those in there too, but I don't think I could fit it in along with heatsinks, and because the case will be rotating around the motor, I cannot bolt the heatsinks to the casing!



I still need to actually build the motor, whcih at the moment has it's first outer set of windings removed, and temporarily rewired the inner set to be Wye ABCABCABC (for 9-tooth 6-pole) instead of the series-winding it had been as an AC motor. I put HDD magnets (which while very strong are permanently polarized thru the wrong axis to use for this, really) on the rotor bell (case) in the appropriate configuration (NS NS NS NS NS NS), spaced as evenly as I could, and used just a row of wires and a set of contacts to make a manual commutator, and rubbed the wires from a battery to that, and got it to spin very slowly and jerkily after a fashion. Not bad for "digital" operation :-P

Also, it has enough stall torque at 24v when just solidly energizing a set of coils that I cannot really budge the stator and rotor apart from whatever position they are in. Keep in mind that's with the really badly/loosely wound coils as they already were when it used to be an AC motor--I did nothing so far except cut the inter-tooth connections and reconnect them into the above Wye configuration, and they are also very far away from the outside of the stator, and the magnets being used are polarized ineffectively for this purpose, and there is a HUGE airgap between magnets and stator (perhaps 3/4"), since I am placing the magnets directly to the rotor bell's inner surface, and they are nowhere near thick enough to come close to the stator's outer edges. I would like to find a usable perfectly round and centered ferrous ring I could use in place of the orignal, and put the magnets in or on that, but I have nothing of the sort, and no tools to make one with. So instead, I am going to probably have to find very thick magnets somewhere, preferably neodymium, and preferably arc-segments, but so far I cant' even find any usable arc-segments for this motor on the web anywhere, unless I want to order a few thousand from China, where they will *make* them exactly the way I specify. I can't afford to do that.... Especially since I don't know if this whole thing will even work out.

It's difficult to do this stuff, but it is actually fun figuring out ways to do it with stuff I already have. :-) Unfortunately I don't always have the right thing to finish something, so I end up putting a lot of work into paths that I have to abandon due to lack of materials, but it is still fun to try, and to engage my brain into thinking about things in ways I had not done before.


Wow...I'm going to have to come back to this post later and add the URL's where I got my information, and pics of the motor work so far. Probably tomorrow, after I get some sleep (somehow, it's 4am, and I am wiped out).

No comments:

Post a Comment

Alternate suggestions or improvements to anything that's been posted is very welcome, and extreme detail is preferred to brevity.

Keep in mind that unless you leave an email address in your comment, I haven't any way to reply to you except to reply to your comment here. That means if you want a reply, you'll have to come back to *this* blog entry and it's comments to see my reply to you, unless you leave some method of contact within your comment.