Search This Blog

Tuesday, August 30, 2011

EHB updates

I shrunk the innerside bearing in the CAD. I decided that a 1x2x.5 inch bearing is a little lot ridiculous, so I downsized it to a 25x37x7mm bearing (which happens to have about the same load carrying capacity as the 12x28x8 stock bearings). This shrunk the size of the width of the motor by about 4mm, freed up some space around the coils inside, and shaved a few ounces off the estimated weight of the motors, which is hovering right around 1kg each...less than half the weight of ELB's motors (5lbs each!).

Another advantage of shrinking the motor by this much is that it allows me to use MBS Matrix trucks (in addition to the Bionic trucks I currently plan on using). They have the same size axles, except the 1/2" section on the Matrix trucks is 3mm shorter than on the Bionics. If I end up breaking the Bionics, and Ground Industries really does go out of business, then I'll have an alternative. I could also just buy Matrix Wides, which have an axle even longer than the Bionics, but smaller motors are more covert :) . There's actually another difference between the MBS and GI trucks... the GI axles are held to much tighter tolerances than the MBS ones. In fact, much of GI's machining seems to be of higher quality than MBS's. Too bad they seem to be going out of business.

Unlike ELB, I'm trying very hard with EHB to design for flexibility. ELB's motors were designed only to work with the MBS skate-style trucks, only to have polyurethane strip tires (I got lucky and found an alternative), designed never to be opened once they're closed, etc... I'm addressing all of these and other issues with EHB's motors.

Despite the cost, and previous conclusions, I'm leaning towards having the rotors waterjet cut by Big Blue Saw. It'll be about $260 for twelve 1/4" thick rotors, which seems absolutely insane to me. I re-ran the numbers, though, and if I was getting paid for the time I'd spend cutting (along with material and operating costs), it actually about evens out. In other words, waterjetting is expensive unless you have free access to one.

The other large expense will be the motor controllers. I really wish I had time to learn how to design brushless PM motor controllers, but there's no way in heck it'd be cost efficient for me to do so.  I'm thinking 4 Kelly KBS controllers, which is ~ $320 with the water proofing option. OUCH.

As you can probably tell, I did a preliminary cost estimate. The total cost for EHB is looking to be about $1600 (not counting labor of course). That's a shit ton of money. I already have $345 invested in it (stators and board).

I had a realization: 2 motors will be a lot cheaper than 4. Probably not half, because the 2 motors will have to be larger, but at least 30% cheaper...I'll keep that in mind for V3. Of course, with two motors, I lose 4WD, which is necessary for the wintery conditions I hoped to drive ELB in and hope to drive EHB in.

Classes start in a week.

Saturday, August 20, 2011

Moving forward

Moving forward with EHB (as I've now decided to call HeavyBoard) will be a much delayed process. While much of the design is done, fabrication can't start until I have some time...ha...ha...hahhaa...hahahahahaha...time... that's a good one. I'm right on the edge of work week, orientation, rush, the start of classes, the start of clubs, and the restart of work (working at the same place I did this summer). So time will be VERY hard to come by...expect delays.

 As for ELB, I've decided to fix the 2 major mechanical issues: axle-hub slippage and the risers. This should make it useable as a demonstrator. I might throw a fan or two and some heat-sinks inside the battery box, which might actually make it street ride-able if the steering problem is fixed by new risers. There's another issue though...one that I can't fix: weight. ELB weighs 40 pounds...ugh...lugging it around is a huge pain, so riding it to class is a non-starter. I'll probably just ride my current mountainboard around for now. At this point I should note that the new "HeavyBoard" will actually be lighter than ELB (The "heavy" stands for "heavy duty").

I determined for sure that the risers are the reason the turning sucks. I set the board upside down on a bench and torqued the trucks by hand and could see the rubber risers deflecting by 1/2" + . I bought some stiff plastic ones to replace them...I'll lose all of what vibration damping I had left, but at least I'll be able to steer.

2 more lessons learned:
  1. Wire stretch: make sure that there's enough slack in the motor wires for the trucks to turn for V2. I got lucky this time and there is just barely enough slack for the trucks to turn all the way.
  2. Buy set screws that are harder than my axles. The axles are harder than the set screws...so big surprise they weren't working well. I'm going to flatten some spots on the shaft and get harder steel knurled cone set screws.

Sorry it's fuzzy. You can sorta see the flattened cup.
Even flatter cups.

Random picture of super sketchy charging.

Hall Effect Sensor Placement for Permanent Magnet Brushless DC Motors

This is a very confusing topic.

I spent a few hours today re-teaching myself the theory for hall effect sensor locations, then even longer trying to come up with a clear way to present it. It was a combination of gathering information from forums and looking back at my old notes (which were derived from Shane's expertise). The goal of this post is to gather all of that information on one webpage and relay it in as clear a format as I can.

Disclaimer: I am not an electrical engineer, so some of this may not be accurate. That being said, I'm 90% confident that it is.

Legend:
  • edeg : electrical degrees
  • erot: electrical rotation. 1 erot = 360 edeg
  • mdeg : mechanical degrees
  • mrot: mechanical rotation. 1 mrot = 360 mdeg
  • pp : number of magnet pole pairs . 1 pp = 2 magnets (1 north, 1 south) 
  • s : number of slots (in the stator)
This post will cover how to place hall effect sensors onto 3 phase motors being run by 60 edeg and 120 edeg hall position controllers (motor controllers that expect the hall sensors to be placed 60 and/or 120 edeg apart). While it is feasible to design a motor controller to expect the hall sensors to placed some other number of edeg apart, I have never seen or heard of one (there just aren't any common commercially available ones that accept anything other than 60 and/or 120 edeg hall sensor placement). I believe the reason for this is that it makes the code and following math more complicated, though I could be wrong as I have never designed my own motor controller. I'm only going to cover 3 phase motors in this post because they are the most common type, though the following equations could be extended to any number-of-phase motors with minor modifications.

We need to figure out where to place the 3 hall effect sensors. Let's start with some math:

The first thing you want to find is the number of mdeg per erot . In other words, the number of mechanical degrees the rotor spins to make one complete electrical rotation.

Equation 1:      (360 mdeg / pp) = n mdeg per erot =n mdeg per 360 edeg

Note: don't confuse this with the equation mrpm * pp = erpm, which is useful for finding electrical rpm given the mechanical rpm of your motor.

Now, let's say you want to use a motor controller that requires 120 edeg hall effect sensor placement. You need to find the number of mdeg per 120 edeg. So you just divide the above equation by 3.

Equation 2:     (360 mdeg / 3*pp) = m mdeg per 120 edeg.

This value, m, gives the minimum number of mdeg that you can space each of the hall effect sensors apart and still achieve 120 edeg spacing.

At this point, you need to choose whether you want to go with mounting the hall effect sensors on an internal board 1 2, outside of the motor (usually on some sort of jig / board (scroll down 2/3 page) positioned so that it can pick up the magnetic flux leaking out of the motor), or inside the stator slots 1 2 3 (note: if you mount them on the side of the coils like I did, make sure you make them as close to the magnets as possible) on the coils. The advantage of the former two options is that the board can be rotated to retard or advance the timing of the motor (adjustable timing). The only way to adjust the timing of the third option is in software.

NOTE: It is VERY important to place the hall effect sensors as precisely as possible. Being off by a few mechanical degrees can put you off by many tens of electrical degrees.

If you want to mount the hall sensors on some sort of jig/board (internal or external), then you're done with the math! The above value, m, gives you the number of mechanical degrees that you should space each hall effect sensors apart (for 3 hall effect sensors, that's a total arc of 2*m mdeg). If m is too small for your liking, you can multiply it by any integer value, e.g. 2, 3, 4 etc..., to get other spacings that will work with 120 edeg motor controllers. (While the hall effect sensors will no longer be exactly 120edeg apart, they will be a multiple of 120 edeg apart, which will work, too).

If you want to mount the hall sensors in the stator slots, then you need to find the number of mdeg per slot:

Equation 3:      (360 mdeg / s) = x mdeg per slot

Now you need to multiply m from Eq. 2 by integers until you find an integer, i , that gives you a number divisible by x . m*i gives you the number of mdeg you should space the hall effect sensors apart, and:

Equation 4:     ((m*i) / x) = # of slots between hall effect sensors.

There are likely multiple choices for i , especially as the number of slots and poles in a motor increases. As long as the above equations are satisfied, then a motor controller that wants the hall effect sensors 120 edeg apart will work.
_______________________________________________

Now for  motor controllers that requires 60 edeg hall effect sensor placement. Equation 1 still applies, but Equation 2 now becomes:

Equation 2':     (360 mdeg / 6*pp) = m mdeg per 60 edeg.

This value, m, gives the minimum number of mdeg that you can space each of the hall effect sensors apart and still achieve 60 edeg spacing. Following the logic from the 120 edeg spacing case above, you can multiply m by any integer and still maintain 60 edeg spacing. You can then directly transfer this number of mdeg to a board/jig for mounting the hall sensors to. 

Or you can mount the hall sensors in the stator slots. Doing this is identical to the 120 edeg spacing case; Equations 3 and 4 stay the same for this case.

Note: It is interesting, and logical, that you will obtain all of the 120 edeg spacing multiples in the 60 edeg spacing case (120 is a multiple of 60).

***Note2: You have to be careful with your winding scheme. Winding schemes can affect which mdeg spacings work and which don't. Sometimes you'll have to flip a hall sensor over (see Ex 4 below). For simplicity, you should place the hall effect sensors in sensible locations (first one on or between teeth), despite the fact that it often doesn't matter as long as they're spaced correctly (I say "often" because if the sensors are rotated together, you can adjust the timing of the motor, and thus it's performance and characteristics). ***
 __________________________________________________

Time for some EXAMPLES!  

Ex 1: ELB's motors with internal hall effect sensors mounted on a rotatable "hall board" for 120 edeg controllers.

ELB's motor is a 18 slot, 20 pole brushless outrunner with winding scheme AaABbBCcCAaABbBCcC. At first, I wanted to have the sensors on a hall board that I could rotate about the axle in order to easily adjust the timing. So I did the math:
Equation 1:      (360 mdeg / 10 pp) = 36 mdeg per erot =n mdeg per 360 edeg
 Equation 2:     (360 mdeg / 30) = 12 mdeg per 120 edeg.

So I spaced the hall effect sensors 12 degrees apart, for a total arc of 24 degrees, which made for a nice, small hall board. (I laser etched the degree lines on the hall boards I cut out, which proved to be super nice for aligning the sensors). This worked. Unfortunately, the little hall boards were very flimsy, and I really didn't have enough room for a hall board inside the motor (or outside), so I went to gluing the sensors into the stator slots...see next example.

Ex 2: ELB's motors with internal hall effect sensors glued into the stator slots for 120 edeg controllers.
Time for more math:
Equation 3:      (360 mdeg / 18) = 20 mdeg per slot
Equation 4:     ((m*i) / x) = ((12* 5 ) / 20) = 3 slots between hall effect sensors.

 So the hall effect sensors needed to be spaced 60 mdeg apart (600 edeg), or one every 3 slots. Which is exactly what I did, and it works great. i = 10 also works, and places the hall sensors 120 mdeg apart, or evenly around the stator. In fact, 120 mdeg works for many common slot/pole combinations...so you could just skip all of this math and do it that way.

I will not be doing a 60 edeg spacing controller in-slot sensors example for the ELB. It turns out that the only mdeg hall spacings that work for 60 edeg controllers with a 18s, 20 pole motor are the same as the 120 edeg spacing mdeg multiples. In other words, the hall sensors end up in the same place as with the 120 edeg spacing case. But don't take my word for it, try the math!

Ex 3:  EHB's motors with internal hall effect sensors glued into the stator slots for 120 edeg controllers.

EHB's motors will be 12 slot, 14 pole brushless outrunners with winding scheme AacCBbaACcbB.


Equation 1:      (360 mdeg / 7 pp) = 51.4 mdeg per 360 edeg
 Equation 2:     (360 mdeg / 7*3) = 17.14 mdeg per 120 edeg.
Equation 3:      (360 mdeg / 12) = 30 mdeg per slot
Equation 4:     ((m*i) / x) = ((17.14* 7 ) / 30) = 4 slots between hall effect sensors.
 
The first multiple i that works is 7. It turns out that the only way to place the sensors in the stator slots when using a motor controller that expects 120 edeg spacing of the sensors, is to place the sensors 120 mdeg apart (spaced equally around the motor).

This is not to say that you couldn't mount the sensors on some sort of jig 17.14 mdeg apart...you can. But if you want the stators in the slots on this type of motor, you have to space them 120 mdeg apart.

Red dots indicate slots that the sensors should be placed in.


Ex 4: EHB's motors with internal hall effect sensors glued into the stator slots for 60 edeg controllers.

 Let's take the same motor as in Ex 3, but now the motor controller is expecting 60 edeg hall effect sensor spacing.
Equation 1:      (360 mdeg / 7 pp) = 51.4 mdeg per 360 edeg
 Equation 2:     (360 mdeg / 6*7) = 8.57 mdeg per 60 edeg.
Equation 3:      (360 mdeg / 12) = 30 mdeg per slot
Equation 4:     ((m*i) / x) = ((8.57* 7 ) / 30) = 2 slots between hall effect sensors.
 
 Now the hall effect sensors can be placed closer together. However, there is a catch. Since the hall sensors are placed like this: A(sensor)ac(sensor)CB(sensor)baACcbB , the second (C-phase) sensor needs to be flipped over because the magnetic field is reversed in that slot because that slot is wound the other direction compared to the first and third sensors' slots. This is why you have to be careful with winding schemes.
 
Blue dot indicates slot where hall sensor should be flipped over.
 
________________________________________________

Notes on hooking up the controller to your motor. You will have spend some time testing to see which hall effect sensor corresponds to which phase. And unless you have the ability to modify the code in the motor controller, you will have to play with wire combinations in order to get the correct one. Having a 2 channel scope helps a lot. Since there are many topics on endless-spheres about doing this, and it's dependent on the type of motor you have, I will not go into detail.

Wednesday, August 17, 2011

The Press

ELB made it onto Hack-A-Day and MakeZine Blog !! Awesome!

Monday, August 15, 2011

Win!

The ELB successfully ran for the first time yesterday, after a year and a half of work. WOHOO!!!!

Let me apologize in advance for the shitty pictures...still using my cellphone camera.

But back up a day:

I modified the pistol grip AM r/c car controller I bought off of ebay to be more useful for controlling a longboard. In otherwords, I took it to a bandsaw:

Unscrewed.

Random PCB that didn't have anything connected to it...

The control board.

post-bandsaw action

Post dremel action. That bit is amazing for carving plastic. The white shiny stuff on the right is just bad lighting.

It fits perfectly!


Wired up.

I only needed 5 AA's to power the board, so I cut the other 3 off.

I also cut out small delrin plates to cover up all of the holes in the controller, but didn't put them on yet in case we needed access to the transmitter board (which we did).

I needed to finish pressing on the scooter tires next. I used the exact same process as last time.


I made a boo-boo milling this one, and a approximately 20 degree arc ended up too large in diameter. I just pressed a piece of aluminum in the gap after I put the tire on.


It looks awesome.

Re-wired.
After a few hours of shane being awesome and tinkering with software...



IT RUNS!!!!!!!!!!

All four motors spinning.
The thing is a beast. It sounds almost like a jet turbine spinning up. Unfortunately, there is a lot of mechanical friction, especially in one of the wheels (too tight of a press fit on the large bearing), which results in about 300W total at full speed no load. So the mechanical/electrical/magnetic losses are eating about 2/5 hp at full throttle, which sucks.Probably a combination of machining errors, press-fit errors, and really cruddy bearings (VXB's cheapest bearings).

Lessons learned up to this point:
  • Scooter wheels make awesome looking tires.
  • Mechanical accuracy is essential for efficiency. 
  • Shitty bearings are shitty.
  • Two motors is probably more efficient despite increased current/windings necessary to maintain torque.
  • Find a better way to have charge leads and battery disconnects outside. The current setup is wayy to sketchy. *This is the part that I am totally at a loss on and could use advice.*
Here is a video of it running:
 
Things to listen for: the awesome spin-up, the horrible sounds of the shitty bearings, the slipping of the hubs on the axles (the "cogging") , the battery box rattling like a shopping cart.
Things to watch for: The magnets taped to our feet. The really cruddy turning. You can see attempts to turn; the board is even all the way rolled at points, but you can see that the risers are giving way and the trucks aren't torquing.



We definitely got the breaking right, haha. Thanks to Shane for taking video!


Post run.

You can tell by the wear patterns on the tires that the axles are slightly swept.

Results:

The steering sucks....bad. Like 15 ft turning radius bad, which was really disappointing because I'm so used to the awesome trucks on my current longboard/mountainboard thing. Part of it is the trucks, I think. But the majority of the problem is coming from the giant stack of risers you can see in the above picture. The risers are there for 3 reasons.
1. Vibration/shock absorbtion. Mountainboards usually rely on the deck springyness to absorb shocks, but I bolted a 1/4" aluminum battery box to the bottom, which makes it super stiff.
2. 2 of the risers on each side are angled, which gives me an extra 15ish degrees of truck tilt, which should aid steering.
3. They raise the ground clearance under the battery box enough in order to turn. Without them, the battery box will scrape the ground. And I can't mount larger tires without significant ($ and time) overhaul.

The last reason is the most detrimental...it means that I really need that much riser.  But why are they a bad thing? Well, when I lean out to turn, the deck rolls, causing a torque on the trucks, which causes them to pivot. The rubber (which makes for a very flimsy/flexible mount to the deck), just flexes in the opposite direction, instead of forcing the trucks around into the turn. I totally should have (but didn't) foreseen that.

Another problem came up: Even with the axle set screws as tight as I could make them, the hubs were still slipping around the axles.

There's also a weird control issue. While the transmitter is transmitting a slight breaking command at the neutral point, and 3 of the 4 motors are listening, one of the motors actually accelerates at neutral. We have no idea why. The same motor also oscillates while it's doing this.

It's also blatantly obvious that it's wired too much for torque and not enough for speed.

Possible Solutions:
1. Not care and move on to V2 - HeavyBoard. Leave ELB 90% complete
2. Fix/finish ELB. This involves machining a stiff plastic riser to replace the rubber ones (which might not even fix the turning issue), grinding flat spots in the axles for the set screws to set, fixing the weird control issues (not sure if possible), implementing the field oriented control, adding a fan circulation system, adding lights, waterproofing...probably another 60 hours worth of work for a board that won't be very comfortable to ride.

While it would be nice to finish ELB, after spending thousands of dollars and so many hundreds of hours working on it, it's probably a better move practically to leave it alone and start V2. On this note, I'll part with ELB for $3000 (controllers and battery charger not included) if anyone is interested, haha.

Lessons learned:
  • Folded sheet aluminum battery box. Lighter and more flexible.
  • Don't use skateboard style trucks on a mountainboard.
  • Avoid massive risers if possible.
  • Figure out a better hub-to-axle interface.
  • Follow all lessons learned from ELB on V2.

Monday, August 8, 2011

Christmas in August

I got some presents (from myself)!

First, a pistol-grip controller:


It's in way to good of shape for what I'm planning on doing to it. I'm planning on gutting it/hacking it apart and using it to replace the Wii Nunchuck controller I put together a few weeks ago. I also got a couple of 2 channel receivers with it...not sure what I'll do with those.

Second, I got the scorpion stators in!

They shipped them DHL Express, which was nice.

They even included fiberglass end plates and coil protector sheets. But how do the stators look?

Pretty good. The laminations are not perfectly aligned, but they're close. The result is a slightly larger maximum diameter of 70.15mm, instead of 70mm. Many of the dimensions were off by about .05mm, which is probably about the accuracy of the stamp tooling.
I believe the wire was installed to keep them from breaking apart during shipment.

Too bad they didn't cut them slightly oversized. I'll have to use the wire protector sheets. The double key slot is a nice feature.
Both 70mm x 50mm stators. I plan on cutting them down to four 70mm x 0.75in .
Not bad for $200 with shipping. 

The next step is to update the CAD files with the exact dimensions, but that'll have to wait until after I finish ELB. Only 2 weeks left O.o .


Thursday, August 4, 2011

T-minus 2 weeks

Success!

Turns out that none of the Edgerton Lathes could handle the scooter wheels, either, so I had to mill them.

First step: clamp wheel to table. Second step: gauge (0,0)
3rd step: mill circle at slightly less than press fit radius

They look like mini plastic stators, haha.



4th step: finishing pass at press fit radius. 1.622" in this case. Step 5: repeat.
Then press fit the hubs on. I got lucky and found a PVC fitting that works perfectly. Note: it looks angled because of the camera angle

I press fit the first too a little too far, but luckily the press was strong enough to push all 3 wheels.
Ta-da!

Massive alien hubmotor!
 It looks really sick on the board:

The polycarbonate hubcap-inserts make it look even more alien.
I didn't have time to finish milling out the wheels (I got 1/3 of them done), so the other wheels aren't done yet. I should be able to finish the tires sometime next week.