Electric Razor: Construction

So I kind of never made a post on the machining and construction of the rest of the scooter (other than the motor), even though it came (chronologically) before the motor testing. Instead of making a bunch of separate posts, I am just going to dump it all here in one post.

The scooter body is made out of a rectangular extrusion, with a hollow that runs down the center. Unfortunately, it is not large enough to accommodate the Li-PO cells that I wanted to use. So the scooter had to have a little reverse-gastric-bypass machining. The extrusion makes for a nice deck, and has all the bolt holes to connect to the folding/steering assembly, so I did not want to loose all of it. But the bottom had to go. Using a 1/2 inch end mill I cut out most of the bottom of the aluminum extrusion that makes up the body/deck.

Machining out the bottom on the mill

The body is made out of some relatively-easy-to-machine aluminum so cutting out the bottom was pretty easy. The deck had to be clamped down by the edges of the deck since that was the only sturdy feature that wasn’t going to get cut away and wouldn’t collapse under the clamping forces. Here is the finished product.

It's SO shiny

The next order of business was to make the underside cover for the battery compartment. It is made from a section of 2″ x 3″ x 1/8″ rectangular aluminum tube with one side cut off to allow it to slip over the edges of the scooter body. The legs of the “U-channel” are about 3/8″ longer than the legs of the body extrusion, thus expanding the under-deck space providing enough room for the battery pack, and associated electronics. I used a slitting saw to cut off the bottom of the rectangular tubing. I could have used an end mill, but I had really been wanting to use the slitting saw for something (justify random tool purchase), and as I found out, they produce really nice surface finishes.


Power feed is awesome

Now I needed a way of joining the deck extrusion with the battery box extension. There was one problems with this, the inside width of the aluminum tube was about .4″ larger than the outside width of the deck extrusion. If one were to simply drill some hols and bolt the 2 together  the aluminum would buckle without some sort of support or spacer placed in-between. The solution was to make “shims” that would take up the extra space and allow the bolts to develop sufficient clamping force to hold the 2 together. On the front end, the shims consisted of aluminum bars, milled down, and drilled with through holes to let the bolts pass through. The clamping force came from some auxiliary bolts that go into the backing plate that the folding bracket mounting bolts thread into.

On the back end the spacer comes in the form of the mounting “legs” of the motor support forks. Since the motor was significantly larger than the stock rear wheel, 2 mounting forks had to be fabricated to hold the motor. The plan was to machine them out of aluminum bar, with a long thin “tang” that would be clamped between the battery box and the body extrusion, and a hole to accept the motor support shaft. A slit was cut and a cross hole was drilled and taped to allow the fork to clamp down on the motor shaft and secure it in place. Holes passing through the support forks, the original body extrusion, and the battery box extension allowed bolts to pass through and clamp the whole assembly together.

Some "gang" machining - has nothing to do with organized crime


A REAL use for a slitting saw


The completed motor support forks

After all this machining was done, the scooter was essentially finished… except for one key component; THE CONTROLLER. And so began the saga of brushless aiplane ESC’s. It went something like this:

1. The cheap non-name one from china, which would start the motor, but never got out of start up mode, and so would shut down in a matter of seconds, thinking the motor was stalled.

2. Shane’s Turnigy Sentilon, which started and ran the motor just fine, but was not mine and so could not be installed.

3. The Turnigy Superbrian, which started and ran the motor fine, but would not get out of start up mode when installed on the scooter, due to the higher loads of the scooter+human it was pushing.

4. Finally, a shipment of Turnigy Sentilon’s arrived at HobbyKing, now I can buy one for myself.

Here you can see the general wiring schema, shown here with the HK way-to-smart-for-its-own-good superbrain.

So about a week later, the Sentilon arrived, and I lashed the electrical system back together,  for a test run. After about an hour of troubleshooting the servo tester, I was able to get in a few test runs. They were spotty at best, with crappy acceleration, difficulty starting, as well as being super-bumpy due to the seam on the glued on rubber strip that was acting as a tire. A loose signal cable, as well as spotty performance from the servo tester ended testing for the night. A few days latter with a new servo tester and well connected signal cables, I went out on another test run, only to discover the motor had develoed several shorts and that 2 of the magnets had come un-glued and where dragging on the stator, so the motor was taken out of commission for repairs.

I am coming to understand the limitations of sensorless control, and am starting to seriously consider switching to sensored control, most likely utilizing a custom built controller, centered around the UCC3626, an integrated, sensored, brushless motor controller chip, which handles hall sensor commutation, over current protection, start-up sequencing, etc.

With that I will leave you with a few images.


Well, that’s it for now, more on motors, controllers, and various electric stuff later.



After a lot of frustration with crappy brushless ESC’s, I was finally able to get the motor running. Turns out, both the “no-name” ebay brand, and the Turnigy had really crappy start up algorithms/running algorithms, so as soon as they got out of start up mode, they would loose sync and the motor would stall.

So the other night I was at MITERS and had my motor with me. Shane and Charles where there and lent a helping hand. First we tried Charles’s K-Force HV, which would behave exactly like my “no-name” ebay ESC, that is, it would run for several seconds, and then as it exited start-up mode, it would come to a screeching (literally) halt. Then we tried the same configuration with 2 of Charles’s “Ungodly huge big ass LiFePO4 battery packs.”

To make a long story short, Shane went and got his Turnigy Sentilon, which seems to have infinitely better start up and run algorithms than the k-force series. That, coupled with 2 of Charles’s metalpaxx resulted in some major motor action.

It topped out at ~3300 rpm with very little wobble (for a homemade motor that is). A big thanks to Shane and Charles for working with me to get it working.

Next step: buy a REAL Brushless motor controller (ie: Turnigy Sentilon)

Trouble With in-hub brushless motor

I finally got a good working brushless ESC to test out my motor with, but it does not quite seem to be working properly. In the video below you can see how the motor runs for a few seconds, and then the the ESC cuts out, and the motor stops. I can get the ESC to restart by turning the throttle all the way to 0, then turning it back up, but the ESC behaves the same as before, cutting out a few seconds after the motor starts up. I have a feeling it may be a phase wound backwards, but I want to get some second opinions before I start cutting up my motor.

Other than this, the motor seems to be running nicely (if only for a few seconds). Also note that the motor was designed for 30v (8s) operation, and is only being run on a 4s (15v) battery pack.

So if anyone has suggestions, please put them in the comments below.

Brushless In-Hub Motor

For my Electric Razor project I needed to build an in-hub brushless motor. These are not the kinds of things that can be bought, so I had to make it, and it comprised of the bulk of the fabrication and machining that was required for the project. Below is a rendering of the finished motor, or how it would look if all the parts were machined in what my physics teacher would call, Machining Space (an annex of the idealist world of Physics Space).

Doesn't photoworks do a nice job

The motor is composed of a few primary components. There is the Magnet can, a cylinder of mild steel which will hold the magnets, as well as provide a flux path for them. It is also the main structural component of the motor, as it acts as the hub on which the tire will be affixed. The magnet can also has 6 holes drilled into the ends which were then tapped with a 10-24 thread so that the endplates can be affixed. The endplates will hold the magnet can concentric with the stator, and are be secured to the magnet can with 6 socket head screws.They are made of vanilla grade 6061 aluminum. The bearings will be press fit into the endplates. After some searching I decided on some 1 3/8 OD bearings from McMaster, which were a good compromise between size (if they are too thick then the motor will not fit on the back of the scooter) and having enough strength to absorb all the shocks, bumps and bounces that they will encounter every time the wheel bounces off a crack or falls into a pothole. The odd surface finish you see below is due to the fact that everything here was made on a rotary table, or (in the case of the magnet can) very carefully centered and then bored out using a boring head.

Half-Machined magnet drum and end caps (without the cross holes)

The shaft is made out of some alloy steel, and will hold the stator inside of the magnet can and allow the wires to pass out of the motor. I decided to pass the wires through the center of the shaft, by drilling a cross hole radially through the shaft, which allows the wires to pass from the stator into the center of the shaft, and then out of the motor. The surface finish is not what it could be due to the fact that this was made on a bit of a ghettolathe, that is, since I don’t have a real metal lathe, I mounted it in the spindle of my milling machine, then used the fine feed and the x-axis of the table to move a single point lathe tool around to turn it down to size.

The stator was bought from goBrushless, and is there largest, at 65mm in diameter, and with 18 slots. It is epoxy coated which makes it easier to wind since if the stator is not insulated it needs auxiliary insulation because otherwise the edges will cut into the the magnet wire and cause a short. The stator has a half round keyway cut into its ID, but since there isn’t any convenient way to put a setscrew into the assembly, the stator is Locktited to the shaft.


The stator is wound with 21 gauge magnet wire. Each slot got 30 turns, in 2 layers, 15 turns each. Since there are 18 slots that gives me 6 slots per phase. Since thicker magnet wire would have been too much trouble to wind, each phase was wound with 2 sets of 3 adjacent slots, which gave 2 sets of 90 turns in parallel for each. I have got to say that winding this stator was pretty darn painful to the fingers, seeing as I had to pull tight 540 individual turns with my hands, and after about 200, they start to get really sore. I also found that clamping the stator, whether it be in a vice, or with some clamps and a workbench (my choice) it makes it a lot easier to get the windings tight and even than if you try to hold the stator in your hand.

The coils all hooked up, wired together with 14AWG THHN wire

The magnet can was populated with 80, 5x3x15mm N50 Neodymium magnets from supermagnetman.com. They were first held in place with super glue, and then bonded more permanently with epoxy.

The paper spacers can be seen separating each pole

Finally here is the completed motor with (a couple) of the cap screws in, holding the end plates on. Just as a little machining tip, to get the holes just right, it helps to use a transfer punch after having drilled the end caps to get the tap holes in the right place on the end of the magnet can, especially if your mill does not have a DRO.

I do not yet have a brushless motor controller (RC airplane variety) so I have not been able to test the motor, though through manually turning it I can tell it turns smoothly, with no binding, and with a moderate amount of cogging (from the magnets).

Electronics Organization

A few months ago I ordered a bunch of electronic components from some chinese ebay sellers. Among them was a 2500 piece assortment of resistors (50 values, 50 pc. each). I realized that i needed to get them organized if I was ever to actually use them for circuit building. After doing a little searching I decided on using the 9-pocket pages used for organizing baseball cards, and this is what I came up with.

Some materails:

And the finished product:

And now for the obligatory MasterCard rip-off

120 9-page pocket:$16

1 3-ring binder: free

2500 resistors: $15

Having all your electronic components neatly organized in a way that you can find them quickly: PRICELESS

I plan to extend this organizational method to all of my electronic components (small passives and discrete’s, big electrolytic don’t fit binders all that well). The resistors were a start, and since they are really hard to root through when they are all mixed since they  have no distinguishing characteristics except for the color bands. Ceramic and film capacitors are next, as well as the small discrete semiconductors (diodes, LED’s, small transistors, etc.)

Electric Razor

NO NO not that

That’s more like it.

Let me start off by saying that this project was inspired entirely by the work of Charles Guan, and I take no credit for the original idea of putting an in-hub brushless motor on the back of a razor scooter. I should say that my design, while inspired by, is not a carbon copy of Charles Guan’s design, and that I have made a few key changes.

Now that that’s out of the way, let’s get started with the design. The goal of the projects is to design and build an in-hub brushless motor that can be mounted in place of the rear wheel of a razor scooter (the A3 model to be specific), and the associated electronics and support system to power it. An in-hub motor is essentially a motor where the stator, which in a regular DC motor would be the armature, is held stationary, and a permanent magnet laden rotor is allowed to rotate around the stationary stator, doubling as the wheel. In order to get the alternating magnetic field that is required to produce motion, you need to feed the stator windings with an alternating current, 3 phase current to be specific. This requires a specialized type of motor controller which converts the DC current that is supplied by the battery and switches it to produce the 3 phase current that is required to power the motor.

So the plan is to build an in-hub brushless motor using Neodymium magnets and a really nice 18 pole stator from goBrushless. The motor will be mounted in place of the rear wheel. Since it will be a bit wider than the stock wheel, some extensions will be added to the rear of the platform which will allow the wheel to move freely.

Doesn't PhotoWorks do a nice job

The motor will be powered by 2 4400mah 4s lithium-polymer batteries connected in series to give me about 30v total. This will be controlled by a 70A brushless ESC built for RC airplanes. Since it does not use sensors or EMF-feedback it cannot start the motor from a standstill, and so the scooter will have to be “kick started.” Plans are in the works to build an EMF-sensing brushless ESC, but it will take a while.

That is pretty much it. The RC ESC will need a pwm signal which will be produced by a simple 555 timer chip circuit, which will be controlled by a simple potentiometer attached to a simple throttle mounted to the handles.

Hello world!

Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!