Archive for the 'Reference Posts' Category

 

A Different Kind of Chinese Motor Controller?! Adding Dynamic Braking to your Inexpensive Chinese VFD

Apr 06, 2017 in Beyond Unboxing, Reference Posts, Stuff

Here at Big Chuck’s Robot Warehouse, we love our Chinese motor controllers. I some times think that at this point in life, I’ve become a kind of Chinese motor controller evolutionary biologist…. or at least like the Identifying Wood guy of underpowered gate drive amplifiers, I hope. Taking apart and examining motor controllers, which I’ve written up many times on this site in “Beyond Unboxing”,  is a large part of how I came to understand them, at least to the degree that Man can comprehend the transcendent nature of motor controllers.

Navigating the Pacific Rim of Chinese mass-market industrial products is not for the feint of heart – often times, products are sold over-rated and inaccurately advertised, and much of the knowledge base of using these products exists on hobbyist forums and message boards/email threads. This means anyone else outside of a circle of knowledge who tries to buy something and use it is often frustrated due to the lack of official documentation… and to find any good documentation often requires sifting through a forum thread or (heaven forbid) Github repository. That’s what I try to remedy whenever I cross paths with it, with some detailed writeup and explanation of what’s going on. Because at least that appears on a search engine result in a comprehensible fashion!

Today, we *gets out David Attenborough voice chipset* will be getting a closer look at a different species of Chinese motor controller. Rarely seen in the North American continent compared to its smaller, domesticated brethren, it is the majestic Giant Chinese VFD.

This one’s an adolescent male, with a 9/2016 date code. You can tell from his unadorned, angular ABS plastic case, compared to the more ornate and filleted females. He’s just begun to venture into the wild alone to expand his territory.

He stalks his prey, an aging Bridgeport J-head, from the safety of his preferred observation grounds, a nearby wall:

Okay, that’s enough, David. Also, lyrebirds are cool.

So why do I need a VFD? The shop has easily-obtainable 208V single-phase power which we had installed, as seen by the new junction box behind the mill. 208V is just missing the 3rd phase to become 3-phase, but that doesn’t exist in the vicinity and wasn’t going to be cheap to run. Hell, even if I had 3 phase, I’d still be getting a VFD anyway to have the additional running envelope and ability to change to arbitrary speeds. You mean keeping the Bridgeport in low gear and revving the motor to 13,000 RPM isn’t a good idea?

I did an initial sweep of the space of available Chinese VFDs back in January. Did you expect me to pay actual money for a real, working and supported product? Come on now, you know I’d rather jump into a pool of sharks. Chinese knockoff sharks!

As you can see, they all look kind of alike, and based on my brief research on DIY CNC forums and groups, they’re basically all the same genericized design. This is similar to other Chinese industrial products, including my favorite e-bike and R/C brushless controllers.

I have a rule called the “Law of Chinese Packaging Inertia” – if the Chinese product visually appears the same as a counterpart, it very likely is the same, or has trivial differences for marketing reasons. There’s been no better proof of this law than hoverboards seg-things, but it’s existed substantially in the past in the form of cordless drill motors for robots, the aforementioned e-bike controllers, and the like.

On eBay, there are numerous US-based resellers of the same products:

 

 

So I picked one which was severely overrated nominally for the motor it was to be running – a 3 HP (4kW) rated one, thereafter sorting by distance nearest and free shipping. You Only Line-start Once.

I figured I might as well err on the side of caution ratings-wise, since my other Chinese product rule is known as the “Harbor Freight Derating Factor”: derate by half if you intend to use it, and by 2/3rds if you’re standing under it. Vantruck weighs 3 tons. Have you seen how thin the metal is on a 3-ton Harbor Freight jackstand?! Don’t give me none of that shit…

The real reason, though, was because I picked the size originally for eventually powering the lathe, which has a pretty beefy spindle motor. I decided to outfit the mill first because it was a bit safer of a proposition to try something unknown on – there’s less rotating mass to bring to a halt.

Alright, my life is settling down a little after Motorama and the insurance & mechanics nonsense. Let’s wire up the mill!

 

Actually, speaking of “have you ever”…. have you ever seen inside a 1HP Bridgeport J-head “pancake motor”? I have actually never looked inside one until now, somehow, and it really is an axial-flux motor! For some reason I always mentally wrote it off as a very stubby conventional motor, but this makes so much more sense. Have a look at these photos! I didn’t take apart the motor since I “get it”, but that was a good trivia day.

 

I had to remove the drum switch (for manually powering in forward or reverse) and then drill an access hole in the 1/4″ thick cast iron junction box for a cable grip. This was when I discovered the previous operators used a 3-conductor service cord on a 3 phase motor with no ground. The ground was an extra piece of hookup wire mashed into the cable grip, electrical taped around the machine, and eventually into the 4-prong twist-lock plug. Well, at least it was grounded.

Wiring was pretty easy after that, and the instruction booklet which came with it was very Technical Chinglish but easily decypherable (and comparable to other more English manuals for VFDs).

Has anyone seen THE USE OF MANUAL???

These things will allow you to change a lot of parameters about the motor, and you can set the V/F line to have 2 slopes for more torque in certain operating regimes, etc. They call this “arbitrary” V/F curves, but no, it’s not really that. It came with a bunch of parameters set assume 50hz mains, which I changed to 60hz. Other parameters control what inputs the drive unit listens to – I hooked up an external potentiometer and told it to use the potentiometer to control the speed, as the unit DESPITE BEING ADVERTISED WITH ONE IN THE PHOTO didn’t come with a knob on the control board! See the very first photo above.

I cut the faceplate open to try and see if there was one hiding in there or something. Nope, missing. This will become a trend.

Most of the parameters I ended up leaving stock until I had a better feel for the system, since I’d not set up a VFD before. These inexpensive units are generally open-loop VFDs – they don’t have a tachometer input, though there seems to be an option in the settings… I’ll have to look a little more in detail.  They just bang out a frequency, and you can set how fast it increases that frequency for acceleration; if you set it too fast, you fall off the optimal slip region for maximum torque and your motor actually takes much longer to spin up (Induction motors require the supplied field frequency to be just a little faster than its rotational speed for torque production).

 

I call this the DOUBLE DANGLE

 

Slowing down was the hard part. Nominally, this thing had “braking”, and included terminals for a dynamic braking resistor, subway train style. I added one found in the bowels of MITERS – a 120 ohm, 50 watt unit. A little undersized, but it’s not like I’m stopping this motor every 10 seconds for a tool change.

Despite having the options selected, I couldn’t get it to actually perform any braking. I could either 1. set the ramp-down time to nearly as long as the machine would take to coast down by itself, or 2. just use “coasting stop” mode which was exactly the same damn thing because it just lets go of the output.

Attempting to set the spindown time faster simply resulted in the unit shutting down outputs and displaying an overvoltage error. Yes, it would make sense – when the motor regenerates power into the controller, it needs to go somewhere. In EV controllers, it’s back into the battery. I’ve never heard of a ‘grid tie VFD” for controlling machines before, though conceivable it could track the mains voltage to try and dump current back into the building, but why would you do that…. Or, you burn it off in a braking resistor.

Without any of those sinks of power, the voltage on the DC power rails of the VFD will spike upwards uncontrollably. It looks like this one will shut off at 400V on the DC power bus. I investigated a little more with stopping from different speeds, and it’s definitely correlated to the energy contained in the rotor and how fast I try to slow it down. So, it thinks it’s doing braking, but nothing is happening.

Well, I could leave it in coast mode, but what fun is not going down without a fight with a poorly documented Chinese product to the death?!

 

Step 1: Crack it open. Here’s what the power stage looks like. All the familiar trappings of a motor controller are there! Immediately, I can see that one of the gate drive optocouplers is missing…. probably the one that tugs on the braking IGBT.For a rundown on the symptoms I described here, read that article. It’s nice.

With some more research (read: forum threads… literally, read forum threads, like this one and this one) I found hints that a lot of these Inexpensive Chinese VFDs ship without any of the braking components populated. Given that this thing came with no potentiometer either, I’m entirely unsurprised. What I don’t get is what market they expect to sell to; a lot of them are advertised for process pumps (e.g. water pumps, blowers, oil pumps and the like) which I presume is a thing that doesn’t really need braking and doesn’t need constantly variable speed control, but maybe just 2 or 3 speeds and an on/off.

That’s another thing about Chinesium I can appreciate, even if I find it frustrating. Everything is stripped down and rat rodded to the point of doing only 1 thing, but it will probably do that 1 thing very well.

Staring at the P+ and PR terminals for the braking resistor under a backlight shows that there’s nothing connected to PR. It looks like there should be a wire jump…

Probably to here. The missing IGBT is connected via a wire jump to something. It’s functioning (based on the pinout of most IGBTs of this package) as a common-emitter  switch, one leg tied to ground and the other leg pulling on something. That something is supposed to be the DC rail (P+) through the braking resistor (between P+ and PR). My board seems to be a newer revision than the ones found on those threads, as a lot of the parts which were 8pin through-hole parts are now SMT parts, and the layout is different. Either way, from my investigation, 2 parts are missing: Q23, the bremschopper, and PC11, the optocoupled driver which tells it what to do.

So, if I haven’t reiterated, I fucking hate digging through forum threads to find the answer to my question. All y’all need to learn to keep a website. Read on if you want to add dynamic braking to your Inexpensive Chinese VFD!

I figured the parts used for this extra drive circuit should just be the same as the rest, so I ordered a pack of the IGBTs used on the board – FGH60N60SMD. The optocoupler driver TLP701AF didn’t have an exact match in-stock at Digi-Key, so I went for a similar equipped part number, TLP701HF.  The -AF part seems to have tighter switching time tolerances. In a single switch configuration here, I figured it doesn’t matter.

By the way, fully optocoupled drive is something I really, really want for Brushless Rage… but it takes up a whole lot of space compared to some driver ICs :(

Mounting the IGBT onto the power stage required some creativity. I cut up a spare RageBridge silicone insulation tab for it, and mounted it on the heat sink plate where it should go. Then I bent the legs up to the point where they should fall right into the empty solder eyes on the board. I decided to do it this way since trying to solder the IGBT to the board first wouldn’t have guaranteed it being able to lie down flat on the heat sink.

On the board itself, I made the wire jump from Q23 to the PR terminal.

And finally, I reflowed PC11, the optocoupler, onto the board.

And you know what?! That was it!

Man, whoever made this just couldn’t be motivated to put the extra 3 parts on it, eh? Guys, we saved like 80 cents! Yay!

Granted, again, if 99% of your users just drive their hydroponic pot farms with it, they’ll never need the braking feature and you might as well leave those parts out. For everything else, there’s my fucking MasterCard. Ugh.

Here’s a test video showing the braking in action. I cycle through the viewable parameters when the motor is running so you can see the DC bus spike up before the resistor does its job.

“DCB” is an added braking option where after the frequency gets low enough, it will just short the leads of the motor together. This provides extra braking power for speeds that are too low to generate any voltage to push across the braking resistor.

So there you have it. That’s literally the only thing stopping these controllers from being more useful running machinery! Now that I have additional parts, I’m going to purchase another one and wire up the lathe too.

Beyond Unboxing: The Harbor Freight Brushless & Lithium Extravaganza – 40V Lynxx Chainsaw

Dec 04, 2016 in Beyond Unboxing, Reference Posts

Harbor Freight! Brushless! LITHIUM! IN THE SAME SENTENCE?! Words I and many others never expected to hear, much less experience in person. But here we are, in $CURRENT_YEAR, where a Harbor Freight product contains this…

Welcome back to BEYOND UNBOXING, where Charles buys small consumer / industrial devices to take apart and cruelly comment on their parts and construction. I believe in looking for parts in unexpected places and using them across intended industries, so the intent of the series is to inspire people to go “Huh… well I guess you could use it to drive my electric combination briefcase & portable document shredder”. I only reverse-engineer as far as it’s convenient to do so, because the rest of it is your job.  My previous ventures in this series have all focused on building sillier go-karts and stupider robots, and this shall continue the same trend.

Two years ago, I took apart and analyzed the Ryobi brushless chainsaw, back when these things were still relatively new and fancy. There’s been a recent explosion (and not even in the lithium sense!) of brushless lithium-ion outdoor power equipment market, which is great because those tools are more likely to have motors on the scale of one human butt-moving-power, or the 1+ kilowatt range. Now that Harbor Freight has even gotten in on the game, that’s when you know the concept has matured! Sorry Harbor Freight, please still love me.

I was clued into this when I was on my semi-weekly pilgrimage to Harbor Freight (ask anyone who knows me – this is real) and talking to them about #season3 plans when I asked about when Harbor Freight was going to start going brushless.

 

> mfw "We got something in 2 weeks ago you should see!"

 

I forgot what it was I went to Harbor Freight for, but I sure as hell left with a chainsaw for some reason. Introducing the 63287 Lynxx 40V 14″ cordless chainsaw!

Welp… it begins again. I see that the “GAS-LIKE POWER!” fat-substitute additive marketing line has since been taken over by claims such as “BETTER THAN GAS!”. I can think of a few things better than gas, such as nausea and indigestion. This is the presentation – unlike the Ryobi (whose packaging status I haven’t checked in on), the whole chainsaw ships in a box without the chainsaw part sticking out.

 

That’s because it ships disassembled, with the saw chain in a separate baggie and the bar dismounted. I think this is better for the product’s survival rates. Anyways, once you get inside, the presentation becomes a bit messier, with stuff taped in place to other stuff. But we’re not here to wax our neckbeards over how the product appears in the box – no, not all. After all, I would have been satisfied with a presentation any more nuanced than Harbor Freight staff literally throwing the chainsaw at me. I would even be okay with it if it were off at the time.

Here’s all the parts! Bigger white box is the battery charger, little white box is the battery itself.

Well, since there’s still boxes, let’s unbox them! This is the battery charger base and battery. We’ll be checking out what is going on inside both of them. The battery feels awfully small for the saw it’s supposed to be running, but that’s lithium being deceptively power dense, so I won’t prejudge yet. The battery charger feels very light – a sort of “We know this is 1 PCB inside here, but here’s our attempt to make it look like it houses a miniature nuclear power station!” design language.

The battery comes apart with just four Torx T20 screws. Nice try, product design gods. The first thing we notice is that yes, there are in fact 10 cells in there – 10 of what self-reports as Samsung INR18650-25R cells, quite a reasonable choice. The 18650 market in my opinion is just as, if not even more competitive than the flat cell market, since it’s a singular form factor used in multiple industries which production engineers can really mutually stroke over. The best commonly available 18650 cells are 3.6Ah and But Charles, this site is selling a STOP LINKING ME SHITTY CHINESE “5000mAh” 18650s BECAUSE THOSE ARE ALL FAKE. Experimental pre-release ones, as of my last knowledge sync, were approaching 4.0Ah per cell legitimately – so who knows, maybe one of these days.

The next thing we see is a 40 amp fuse.

Nope, not an electronic fuse made of MOSFETs, or a cutoff circuit made of the same. Just an honest-to-Baby Robot Jesus 40A ATO fuse, soldered in place. You blow it, you’re done! Unless you’re me and selectively bypass your fuses for extra hilarity in life. The low-cost-ness was starting to show through.

The OEM of this battery is shown on the silkscreen of the PCB. They also seem to be the OEM of the whole unit. Holy hell, they have a Brushless Drill. AND A BRUSHLESS SAW. And their choice of color coordination is based around MIKU BLUE AND BLACK! Damn, did I start a Chinese tool company and forget about it or something?

YOU KNOW WHAT THIS MEANS? HARBOR FREIGHT BRUSHLESS DRILL CONFIRMED Serious talk though – their 40V blower is the same as the Harbor Freight 40V brushless blower. I found this unit less enticing because it’s more or less a ducted fan in a tube.  But I really hope we start seeing the brushless drill soon.

Fancy little fuel gauge light on the battery, a normal characteristic of lithium drill batteries everywhere. This fuel gauge is powered by a Chinese 8051-like microcontroller

Something felt wrong, though. I inspected the board thoroughly for any signs of current measurement devices, which would let you ‘coulomb count’ and keep track of the battery state of charge. But there was no such hardware. Nor were there even cell-level taps so the controller can sense what the battery cell charge levels are and accommodate for them. You usually see this in the form of large power resistors that are shunted in and out of higher-voltage cells. The controller keeps the cells within a certain charge variation window, or can declare the pack dead to the power tool if one cell takes a dive.

I couldn’t see any circuitry at all that could be described as a battery management system. This, plus the presence of the internal 40A fuse (that needs disassembly and soldering to replace), makes me fairly sure that this battery is running by the Grace of Robot Jesus alone. The little fuel gauge light is likely just a voltage sensor.

I even stared at the underside of the board to see if there were parts I missed. Nope – besides connector pins sticking out, I could see no signs of cell taps, current sensors, or bleeder circuits.

Now, truth be told, there is precedence for un-BMS’d lithium batteries. In fact, my old e-bike battery was a solid blob of 2.4Ah 18650 cells with just a thermistor wire coming out besides the main charge-discharge wires. It’s stayed working for the past ~5 years and continues to take in 6 to 7Ah every charge. If all the cells are well-matched for characteristics, then over their design lifespan they will never drift apart in charge level enough to be dangerous. Plus, there’s a hard fuse on the outputt in case of shorts. So this is some pretty intense cost cutting, or perhaps cost tradeoffs being made; purchase better quality cells, skimp on monitoring hardware.

I’m actually not sure how I feel about this. With all the recent chatter of explosive phone batteries, seeing a pack as ‘naked’ as this is a little concerning. However, even with a BMS, if you have a counterfeit or defective cell that just decides to let go, there is actually scant little you can do to prevent exothermic events from progressing. This is part of the Curse of the Hoverboard SEG-THING, DAMMIT! we experienced last year; I’ve taken apart SIX of those things. All of the batteries have a similar BMS card on them, and as far as I can tell, they all work. But if one counterfeit cell sneaks into your poorly verified and documented supply chain, you’re done and your product’s reputation is ruined.

So really the question is how MUCH do we trust this OEM to only use well-matched cells? WE REPORT, YOU DECIDE.

So up until this point, I’ve not actually shown how the two mate together. Like basically every tool battery these days, they slide together and lock, needing you to squeeze the latch to release. Nothing surprising here!

 

Here’s the inside of the charger after disengaging the four T20 screws holding it together. The “this is one board” theory is revealed to be true. Not that it’s surprising, since welcome to 99% of all consumer electronics today.

 

There’s no intelligent battery stuff going down here, really. It’s a 42 volt power supply, probably with constant-current and constant-voltage modes that automatically switch and that’s it. Really, that’s all you need to charge lithium batteries. The simplicity of the battery charger’s LED signals on the front panel speak to this. Either it’s running in CC mode and charging the battery up to, oh, maybe 80-90% SOC, or it’s in CV mode and it’s “done”. If anything else happens, like the battery voltage to start with is too low or it stops drawing current suddenly, is an “error”. Else if it’s been trying too hard, it’s an over-temp error.

So I had been wondering about the fan – it doesn’t seem to point at anything meaningful, like at the heat sinks. So what’s it trying to cool?

 

Well, here is the battery in its home orientation. It looks like the fan is supposed to pull air through the battery case – which IS vented, so no IPxx protection for you – and help keep the cells cooler.

So in conclusion, there’s nothing very revolutionary about the battery. It’s reasonably middle of the road technology, well cost optimized, and well packaged. Time will tell if the lack of real battery management circuitry will pose a problem. Let’s move onto the more interesting problem, the chainsaw itself!

 

I put together the whole unit for fun – clearly, if you are just after the motor, you don’t need to assemble the saw.

 

The frontmost (righthand) yellow knob locks the chain bar down in place, or it dismounts the whole light-gray cover at the same time unbolting the chain bar, if you untighten it. The winged yellow knob to the left adjusts chain tension by moving the whole bar in and out. This is much the same story as the Ryobi, and seems to be common to chainsaws in general. In fact it seems to be one-better than the Ryobi because instead of tightening two nuts and a small screw to make the tension adjustments, you only handle two very large and visible knobs to make these adjustments. I dunno how helpful that is to chainsaw-monglers in real life, but I LOVE HUGE KNOBS it appears to be a better UI decision.

The disassembly begins! T-25 screws hold the handle onto the body. After those come out, the handle is removed. On the back, more T-25 screws hold the motor cover on. I basically began removing every screw in sight on the back side, and the motor cover was the the highest level group of screws. It popped off to reveal:

Okay, this is getting interesting already. We see that the motor is a rather large inrunner-type motor, instead of the outrunner type in the Ryobi. A worm gear-driven oil pump to supply chain oil is tied directly off the rear of the motor shaft. All of these screws holding the pump on can be removed now, to free up maneuvering the motor out later.

 

By the way, just out of curiosity, I took apart the tension adjustment mechanism, and it is a nifty small crown gear setup.

This crown gear actuates a threaded rod, running longitudinally here, with a nut riding on the end that pulls the bar back and forth.

The next step to disassembly is removing the motor chain sprocket there in the middle. This involves either retaining ring pliers or two small flat-drive screwdrivers and a lot of creative swearing. I used to despise retaining rings in middle and high school before I gained the tools to work with them. Now I love them! Overhaul is basically one big snap ring!

All the T-25 screws on this side pop off, and then the saw basically falls into two halves cleanly.

This thing has a nifty auto-shutoff clutch/brake that is actuated by the big black flap to the upper right. The black flap has to be pulled back for the saw to run. There is a sensing switch that otherwise prevents the motor from being started, as well as a mechanical stop that consists of a pin being spring-loaded into a hub mounted on the motor shaft. This mechanical assembly is shown in the rest state above, where it prevents the motor from turning as well as interlocks the controller.

As I have not actually chainsawed anything in half recently, I figure this is an automatic stop at the end of a cut when your saw falls through the now-cut material. Any small amount of pressure and movement seems to be enough to click the flap back to its home position.

The flap and the motor-stopping pin shown in the working position. Anyone know why this saw has such a feature when the Ryobi didn’t?

 

The controller is the next easiest thing to slip out, as it just sits in a square cubby. Along with it comes the battery connector and two switches: the trigger switch and the flappy interlock switch.

The clutch parts can be removed as soon as the saw is open.

The motor shroud comes out next after the removal of three small fiberglass-plate retainer clips held in by Phillips head screws.

 

Finally, some last T25 screws later, the motor can be lifted out.

And here it is. This is actually a huge motor. It physically outsizes the Ryobi motors by at least twice in volume and weight.  It has a 12mm double-D-to-10mm-flats shaft, similar to the Ryobi. The big nosecone houses the chain-stop clutch mentione before.

I am utterly surprised at how huge the motor is, and am even more satisfied that it’s found in a $170 NEW saw. This motor is something I’d pay $170 for, period.

The controller, though, needs some more loving. First of all, it’s ON-OFF ONLY in stock form. It ramp-starts the motor up to full speed once both AND-wired (series connected) switchs are closed. When either one is released, it hard-brakes the motor. So hard that the first time it did so, the motor torqued itself out of my hand and chased me around the shop.

I also practically destroyed it freeing it from its potted housing to take a look at the hardware. The architecture is “Classic Jasontroller” as people familiar with my brushless ESC vernacular will understand. It’s built like every e-bike controller I’ve ever seen, in other words. Discrete gate drive circuitry with big and brute force linear regulators.

The MCU is a very typical-Chinese STMicro 8-bit microcontroller, likely a genericized or pin-and-code compatible version available on the Chinese market, even though it has ST markings.

Given that the ESC is “one speed” and basically an e-bike controller, I’m not going to spend much more time talking about it. It’s a known quantity.

And a test video, where my friend forgot the “I’m done with motoring” cue and kept recording for a few awkwardly silent seconds:

So here are the guts of the 63287. My conclusion: It’s an undersized battery and undersized controller for the amount of motor that’s in this thing. Having “one speed” – that’s full speed – compared to the variable speed controller in the Ryobi makes a little more sense now. When the controller is only fully-on and the MOSFETs are not chopping current, there’s less losses to worry about and less heating. That means you can get away with a smaller controller with less semiconductors.

You’d just hope the motor never wants to draw more than 40 amps for a while. That IS a good 1500-1600 watts of cutting, mind you, and through some VERY TERRIFYING locked-rotor testing I discovered the controller does have a stall-protection cutoff feature as wel as a rotor blockage detection on starting. You haven’t lived until this motor has thrown an 8″ Vise-grip at you, but I suppose that’s pretty damn close to dying for something I proclaim to be living-related.

Without further hacking, though, the controller is borderline useless for EV purposes. I could MAYBE see a case for a robot weapon or using it in some other related application like meloncopters for fun, where you’re more likely to be running at full power. However, that battery will not last very long under said full power conditions – 40 amps will drain it in minutes, and if you go over that, you’re likely to blow the fuse up inside.

So I think we see the “Harbory-Freightyness” expressed through some interesting cost-sensitive decisions on the OEM end, such as the lack of a BMS for the battery and no variable speed control. But dat motor – let’s investigate it more.

That is an interesting-ass back-EMF waveform. Hey, this reminds me of my ‘middle finger wave’ days! I can’t even remember what I was building then, but it sure as hell didn’t work.

I spun it with my Milwaukee brushless drill (because my life is brushless) to collect this motor’s intrinsic BEMF profile, a.k.a what the motor really wants you to drive it with. To collect the vernacular “Kv” value – RPMs per volt at no-load, there’s a process involved.

You can take half the peak-to-peak value of this waveform as seen on the oscilloscope and use the relation Vpp/2 [Volts] * delta-T [seconds] / 2π [radians] = Vpp [Volts] * delta-T [seconds] / (4π) [radians] ¹. This yields a value in SI units for the BEMF constant, V*s / rad. Generally, radians are considered unitless so they are not written in unit analyses, but I like to keep them there for less confusion when converting into RPM (rotations per minute, or 2π radians per minute)

For this motor and the measurements shown, the Vpp is 21V and electrical period of the line-to-line voltage is 13.5 milliseconds. This yields a BEMF constant of 0.022 Vs/Rad, which in “Kv” form  RPM per Volt is 423.

To get the mechanical RPM of the motor, this basic RPM/V value must be divided by the number of magnetic pole pairs. 423 RPM/V represents what the “unit” 3 phase motor with 2 magnets and 3 phase windings would be. This motor has nine phase windings, but how many magnets does it have?

Three 3mm socket cap screws later and you can very carefully and gingerly work the motor apart. I chose to remove everything from the back side in order to not deal with the mechanical stop hub. The magnetic pull is very powerful and taking the motor down this far is definitely not for the faint of heart or fancier of fingertips.

Counting the magnets reveals there are 6 magnets, or 3 pairs of magnets. Consequently, the RPM/V-as-you-see-it is 423 / 3 [Pole Pairs], yielding 141 RPM/V.  As a sanity check, I actually used a tachometer on the motor being driven by the controller, and measured about 6300 RPM on ~40 volts, yielding a value of approximately 157 RPM/V.

This is a slower motor than the Ryobi’s approx. 300 RPM/V.  All other parameters being equal, this motor trades speed for torque. Since I don’t chainsaw things reguarly, I’d really be interested to see videos of this saw in competition with others to see what the variation in speed does to affect the cut. But what it means for “other” applications is the need to use less gear ratio for the same output speed and torque, possibly simplifying design.

 

The motor has a hefty fan on the end and the rotor is reinforced by a stamped steel cup that is also epoxy-bonded to the magnet and the laminated(!) rotor. I think this rotor can survive some overspeed excursions just fine.

Pretty densely packed windings. The airgap diameter of the rotor is exactly 50mm, and the stator lamination unit is 32mm long. I measured the line-to-line resistance as an average of around 39 milliohms. This puts the motor easily in the class of the common 63mm outrunners for power throughput ability. Compare Overhaul’s SK3-6374-149 lift motors at roughly the same Kv and 40-42 milliohms phase resistance; this motor has more iron and copper by mass than the SK3s, so it will be able to hold a certain power dissipation (load) for longer.

Like I said – wow, so much motor for comparatively little everything else! I guess that’s where the money went… everything certainly shows a little for it. I see this product as having a potential future upgrade path with a much larger battery and controller that can push 1.5 to 2x the power into it. That would be chasing after the Greenworks 80V tools in power, I think, having seen a GW 80v chainsaw motor before.

To use this motor well, I think it should be paired with a 150-200A controller to really take advantage of its power capability. It’s not sensored, unlike the Ryobi motor, so that complicates things a little bit – you can’t just throw a Kelly at it, for instance. Maybe BRUSHLESS RAGE a SimonK-flashed large R/C controller or whenever we see a bigger VESC design.

Anyways, is someone interested in a cordless chainsaw without a motor? Contact me. Oh, it’s also taken apart into a billion pieces. Should go back together with a bit of tinkering!

¹ Okay, so I actually confused myself a little because I haven’t mentally checked my motor math in a while. It’s often the case that “BEMF Constant” or Ke refers to the BEMF contribution of one phase. This is most commonly encountered in academic treatments of motors such as this one (See page 13 Equation 14) and this one (See Equation 7.6 in Section 7.3, pp. 36) because it is simpler to use the single phase contribution in vector math with the other three phases. There is an extra 1/sqrt(3) difference from the L2L (line to line) measured voltage versus the single phase-to-neutral (L2N, P2N) contribution. It’s how we get 208V mains electricity from 120V.  However, I seem to do things differently, concentrating on using the motor. When you power the motor in typical BLDC trapezoidal commutation fashion, you power 2 phases. Therefore, you can’t use the Ke of 1 phase only in isolation – the phase 120 degrees offet from it will contribute the additional sqrt(3) voltage. Using Ke alone as-described in those papers will get you a Kv [RPM/V] that is sqrt(3) more than reality. I had to look back through my notes and crosscheck this with physical measurements to convince myself I wasn’t going insane. Be careful with information on the Internet, kiddies.

Beyond Unboxing Returns with some #Season2 Shenanigans: Axent Wear Kitty Ear Headphones!

Jan 25, 2016 in Beyond Unboxing, Bots

It sure feels good to be back doing one of these again! It’s been a while since the last one, about little hub motors that you can now buy instead of e-mail me about; since then, they started making EVEN SMALLER ONES! Now we’re talking 8wd Chibikart Pike’s Peak Hillclimb Edition levels, or the go-kart equivalent of the Human Centipede or whatever. Your tastes might vary.

On this edition of Beyond Unboxing, we explore a product that is so quintessentially me for some reason that everyone has felt the need to go “Hey! Have you seen this thing? It’s so totally you!“. I’m of course talking about…

Little known story: The whole reason my ears existed on Battlebots, and subsequently I became known as “cat ear guy”, was because I made them as a knockoff of Jamison’s ears which were a directly inspired knockoff of the Axent Wear. See, unlike Jamison, I never finished mine, so they were merely hollow shells. Not only that, but I basically brought them as an afterthought – as a “okay, might as well look goofy if needed” accessory stuffed into the very top of my luggage.

In fact, his knockoffs were so convincing that many people also told him that “Dude, you got ripped off!” when they heard of the Axents.  Ah, the circle of Internet fame.

This does seem a little out of the ordinary as something I would just go out and buy, since it’s not some kind of obscure motor controller or power tool… but there’s a story to that too. Apparently the producers of Battlebots were at CES 2016, saw them, and were reminded of me. It helped that (allegedly) the booth personnel were fans of the show. A week later, I had a unit in hand after it was given to them and shipped to me! Awesome. Brookstone, if you want your name on #season2, we need to talk. You guys need to put a liiiiiittle more effort into sponsorship than that, wink wink, but not much more!

So here we go… Oh boy.

Yup. #Season2 will. Be. Insane. Now, those who are genre-savvy with Beyond Unboxing posts will know that I pretty much only make these posts if I already have plans for something. In a way, they are a barometer for what I might skulk off to do next. I’ll explain how this ties into the #Season2 (I will pretty much only refer to #Season2 using a hashtag, by the way) plans soon.

At first, I didn’t really intend to take these apart. But then I was showing somebody, and I dropped them. And then, I only had one side’s lighting left over… uh oh!

Get ready for some Beyond Unboxing, where I take these apart gratuitously in order to see what might have gone wrong with the wiring when they were dropped, and alongside, give a quick tour of consumer product design.

Here is the beginning of the presentation. It comes packed in a plain black, non-showy form-fitting zipper case. This is an alien concept to me, since I guess I’ve never owned “nice” headphones in my life until recently when I picked up a HyperX Cloud gaming headset secondhand, and it also had a case.

Inside the case, the headphone cable and boom mike live on the left, while an included USB micro-B cable for charging is on the right.

The unit by itself. Once again, I don’t claim to know anything about nice headphones. I assume they all have this many degrees of freedom!

I’m not sure if I am a fan of the sound yet. It’s quite “boomy”, reminding me of the times I tried some Beats by Dre – all bass and low end, and nothing spectacular elsewhere. I suppose it fits well with current pop and hip-hop music. Either way, it’s well known that I am a Hipster of the Nth Degree when it comes to music, so I explicitly absolve myself of any authority on this matter.

A closeup of the lighting effects. The LEDs are clearly white – just the plastic colored ring determines the color of the glow. My issue was that the right-hand side (as pictured, so “left ear) was very sporadic, like a connector was barely hanging on or something.

For those who haven’t seen these used, the headphones are passively powered via the cord like you’d expect – but the lighting and external speakers (in the ears) are battery-powered, hence it needs periodic charging.

Let’s start popping stuff apart. First, the earpads can easily be slipped off (I keep wanting to call them “ear poofs”, but they have a name):

This exposes four small screws to open the housings.

Use a small Phillips driver (I had a #1 – this seems to be correct) to open the housings.

Here’s what they look like on the inside. The left side has the audio input and microphone jacks. The signals travel to the other side which contains the amplifier and power supply board.

The signal input board is held in by two small screws. I also pulled out the spring clips which give the housings a bit of “detent” feel in their yokes (the forks they’re mounted to) – that’s how they stay in place if you fold them. There’s a small plastic plug that the spring clip mates with that pulls out easily. From there, the housing can be full removed…

..If you’re more careful than me. I tried to remove the housing entirely, but I misaliged the other side and broke off the other pin-like structure its mounted to. No consequence, but there will be more sloppy movement as a result. Being more careful instead of pulling harder probably could have avoided this. Alas, the difference between a hub motor and little plastic speakers.

Regardless if the housing comes off the yoke or not, the plastic accent ring and cap can be removed from the inside using four screws. Two of these are accessible only if the input board is removed.

Check out the LED ring. I plugged the board back in temporarily to show the lighting effect.

The LED board is smooth white on top and made of two pieces – the printed circuit board with the LEDs is mounted to the white ring, which is a light-diffusing plastic like what would be used on a LED backlight. This softens the glow and prevents you from seeing discrete LED dots.

A little prying and the printed circuit board comes off. The LEDs are a unique side-emitting package instead of the far more common top-emitting type.  The LEDs fire into the internal face of the light-diffusing plastic, causing the ring to glow very evenly.

This thing has become more hardcore than I had anticipated. I was thinking that there would be an easy way to change the color of the LEDs if needed. Not so much with these – they likely chose white since it can be slightly filtered by the color of the accent ring into any of their colors. Add to that the oddball package needed and your choices are limited.

The three components of the lighting accents… or Axents, if you will.

Moving to the larger board, the amplifier board – I damaged the battery connector trying to remove it. It’s held in place by a very one-way snap/detent, which I broke before getting the connector to back out. It still contacts fine however. Your experience may vary.

The other connectors are secured by a small amount of adhesive, but this comes off readily.

The amplifier board! I wish I could say something about its design, but it’s not a motor controller. I’ve not worked with audio ICs in the past, so unlike said motor controllers where I can tell you whether or not it’s worth using, the specific implementations of the ICs used are lost on me. All I know is it cannot flow 500 amps.

I played with searching for their datasheets, however, and in doing so I discovered that some of these are pretty damn obscure. As in, no English-language results worth following up on. I actually had better luck hopping on a Chinese search engine like Baidu. The vast majority of results regardless were trading websites, not manufacturer’s datasheets or similar, and they all claim ORIGINAL PART!!!! like it means something. It seems like a lot of these chips are genericized and made by many factories for myriad applications, so you just pick one off the cloud. The same phenomenon gave us Seg-things.

The major ICs listed, which I could track down anyway, are…

  • CSC8004 – SOIC-16 package, some kind of 2-channel amplifier. I could only find a datasheet for the 8002, but I assume the 8004 is just the 2 channel version of it.
  • TPA2017D2 – 20QFN package, a Class-D 2 channel amplifier. If I had to guess, this one drives the external ear speakers, since Class-Ds can push more power with less dissipation and the ear speakers do get quite loud.
  • SC51PS704 – an 8-bit microcontroller. Looks like one of many different 8051 clones – similar 8051 clones are used in a lot of Chinese e-bike controllers. So few pins are actually connected on it that I think it only handles button presses.
  • BT608M – this was the single hardest thing to find. There’s lots of places trying to sell it to me! When you start getting into places called “ICMiner” or “Ic-ic.com”, that’s when you part is obscure-ass. It’s also apparently a model of hospital bed, and Bluetooth-compatible speaker system. If I stopped searching early, I might have assumed it’s some kind of unimplemented Bluetooth hardware (but why even populate it then?). But I don’t think so – based on various side-channel mentions of it, such as this spammy blogpost, and this short title, I am led to believe it’s involved in the button-controlled volume for the ear speakers. If you can find this datasheet, you are better than me.
  • NJM2100 – a dual op-amp, SSOP-8 package.

Since these units are made in Taiwan and commissioned by a big company like Brookstone, I assume they have their entire network of Chinese parts traders which I realistically have no handle on at all.

The housing on the right-hand side contains a similarly shaped though not completely identical LED board, as well as a small battery in the hollow portion of the black cap.

 

The right side LED board taken apart. This one has more markings!

I temporarily hooked both back up to check for differences in light output and the patttern, but they function pretty much identically. By the way, as soon as you disconnect the battery, the system will not arm lights or external sound until you plug it into USB power at least once.

The ratings on the battery are obscured by a bit of rubber tape.

Scraping it off, you can see that the battery is 1.0Ah. Assuming you don’t crank the ear speakers at full tilt, this should last for several hours of using the lighting and ear speakers together. They claim 5 hours – I haven’t verified this yet, but some rough calculations – 3.7V * 1.0Ah is 3.7Wh nominal, of which 80% is typically available (assuming it lets you drain the battery to 20% SOC, divided by 5 hours gives an average usage of 0.6 watts. Plenty of sound for you and probably the people in your immediate vicinity.

None of this solved my lighting woes, though. The next step was to disassemble the headband to see how the signal cross from one side to another.

I’ll get this out of the way right now: I hate snap-fits. Hate everything about them, but they are the go-to these days for consumer products because of less parts cost (no hardware). But they’re generally one-way only – you try to dismantle them and they usually, you know, snap. Those that don’t just break off you can usually only get very limited assembly-disassembly cycles before they no longer hold.

That being said, the headband is held on by 18 terrifying snap-fits. Four are at the corners where the headband ends inside the little plastic bezels – pull those upwards (in the shown orientation). The headband itself has 10 snaps that pull towards the center of the loop:

And the method of transmission is revealed. A ribbon cable! Seemingly a somewhat fragile ribbon cable. I hooked the lighting back up to see if any joints here were loose. It seems like the very act of manhandling the ribbon cable area trying to undo the snap-fits fixed whatever the issue was, because now I had both sides of lighting again.

Okay then.

From website reviews, it seems like some times there are issues with one side completely losing functionality. I suspect an issue with either this ribbon cable (I also hate ribbon cables, but just a little less) or the interconnects between it and the left- and right-housings – tiny cables made of braided Litz wire which is enamel-coated. This strikes me as being rather fragile, though most audio signal cables I have seen are made of this wire.

A closeup of the ribbon cable. This is oriented with the inputsside to the right.

Alright, as long as I’ve gotten this far into it, let’s keep going and see what the ear speakers look like. To get to its mounting screws, there is a plastic cover which has two screws that needs to be removed. This piece is the “detent” surface for the headband adjustment, which generates the clicks you feel when you pull on it. It then slides up and away.

Three silver screws attach the ears. Two are directly accessible, the other one requires you to mash against the R+/R- connector pictures above a little bit.

Here is an ear!

After some prodding, I found that the bottom is held in by two small snaps which are easily released, but the top appears to be a plastic snap rivet which, predictably, snapped. Its wreckage can be seen at the top of the ear.

The ear speaker is a cute little 1″ driver encased a small bucket that is sealed with a ring that has some foam tape. The back of the bucket is open, but the ear is still a very small enclosure. The ear speakers sure sound like small speakers in a small plastic enclosure, like most Bluetooth speakers I’ve had the pleasure of experiencing – a ton of midrange, and not much else, muffled and tinny at the same time. An audiophile I am not.

The depth of the ear speaker.

The ear accents are constructed like the ones on the headphone housing, using side-emitting LEDs pointed into light-diffusing material. The blue speaker icon is a separate piece and easily removable.

I peeled back the rubber compound holding the LEDs to the diffuser. There’s only two LEDs here.

So there you have it! Now I have no clue how to put this thing back together! Hey Brookstone…

I hope you’ve enjoyed this tour of what a modern consumer electronics product basically looks like – lots of molded plastic, snap fits, and housing little printed circuit boards. I feel like they still have a few little quality issues to overcome, but in general the amount of effort that was put into these was beyond what I expected.

That same level of effort also makes these things much harder to modify, as I had said at the beginning. Why would I be thinking of modifying them though!? That’s because of….

#Season2, Or: BattleBots, the Anime?!

I’ve been throwing around this false hashtag #weeabot on purpose for a little while now (false meaning I don’t ACTUALLY have a Twitter or Instagram or Tumblr account where tags actually, you know, matter – I consider Facenet hashtags to be kind of vestigial) on places like r/battlebots or the BB official pages. Anyways, what it embodies is my continued unstated, half-assed life goal to increase the intersection between engineering and anime. Put simply, there’s just not enough of it – at least in meaningful ways. Just like I like my science fiction rather high up on the hardness scale, I like my engineering depictions somewhat plausible. This in general never happens.

I also have a desire to offer counterpoint to the likes of Kantai Collection, which has (in my opinion) completely ruined the mecha musume genre. I like girls and machinery, and consequently girls with machinery, but Kancolle’s character designs essentially have nothing to do with the machinery. You don’t just weld battleship parts to a schoolgirl archetype and try to sell it to me. And the worst part is, it’s spawned endless look-alikes which have the same problem. It’s gotten so bad that even Toyota has started doing it. That’s truly when your genre jumps the shark*.

I can’t not say IMPOSSIBRU, sorry.

To matter the reason, if I don’t like anything on the market, I tend to make my own. RageBridge (and RageBridge 2) was a direct response to how much other motor controllers in the market segment sucked (AND STILL SUCK).

Now, an artist I am not, but luckily I have the help of the magical and talented Cynthia, who also brought you Arduino-chan as seen here last year. Besides returning again to help with the fabrication and electrical work for next generation Overhaul, she will also be creating team cosplays uniforms designs, as well as an “Overhaul character” in the vein of the mecha musume series and the, umm, Priusettes, which you loving and adoring fans may cosplay as in the live audience! One that doesn’t suck.

Here is a preview of things to come…

So there you have it. While I’ll be cranking on making OH2 hypothetically easier to service, faster, and more reliable (read: less fail), she will be making the brand. A robot TV show is about more than just the robots, after all. And especially in this day and age, you won’t really know what becomes popular due to the Internet Hype Machine ahead of time, so perhaps this is an exciting new direction. Hell, if all goes well, we’ll have a character for EVERY  #SEASNON2 entry – there will be surely something for everybody.

And lastly – so why did I feel the need to “mod” the Axent Wear? Because the shade of blue doesn’t match the new “team color” (and robot thematic color) for OH2, digital goddess and “That girl Charles has a sticker of on everything he owns” Hatsune Miku:

Of course it’s a Miku-van

It’s more of an aqua/cyan color, which involves a wavelength of LED that is not common at all, much less in sideshooter package. What I’ll probably just do is 3D print translucent-white accent rings (the currently blue parts) and coat them with something that is more aqua. (To my knowledge, nobody makes an already-translucent aqua/cyan 3D print filament).

Oh yeah, definitely expect the whole bot – however it ends up looking – to be plastered in character stickers and corresponding thematic paintwork. Since Miku is a copyrighted character, it will probably be whatever the OH2 character ends up as. I have a few places that can provide the necessary vinyl graphics.

And finally, for something vaguely robot related…

Those are rubber bumpies, similar to the ones used on OH1 but smaller and more numerous. Yum, bumpies. All shall be explained soon – I have over sixty design screenshots of OH2 to write up as soon as I’m more than 90% sure I won’t get kickb&4lyf for doing so.

#season2 #weeabot

*Not to shit on Toyota too hard for this campaign, since they did hire many different amateur artists to make the individual designs. It’s made the Prius about 2% less horrifying in my mind.

You Won’t Believe What the Chinese Did This Time! Beyond Unboxing of a 5-inch Brushless Hub Motor, and My Upcoming China Trip

Dec 08, 2014 in Beyond Unboxing

Excuse the clickbait title, I’m practicing for my new career as a Buzzfeed blogger.

Just kidding.

A long time ago, I was a connoisseur of fine miniature hub motors. Okay, so even not-so-recently if you count the non-dedicated hub motors I’ve built, but overall, I like constructing my own custom motors for things since I get to tune them for the application. When I started building small EVs here at MIT in 2007 or so, it was a great way to motivate me to learn about how motors worked. Some (many) people have asked me why I didn’t make the hub motors my ‘research’ or thesis, which I could have, or why I didn’t start selling them, which I could also have started doing so. In fact, Chibikart’s motors were the direct result of getting some ‘pre-production’ prototypes made through mfg.com since I was entertaining the idea.

The real answer is that you couldn’t have gotten me to take it seriously enough to do either. I don’t like taking anything I do seriously (and anyone else taking it seriously is just unthinkable!). This makes me wonder some times why I’m doing such things as selling Ragebridges. I’m very weird among people I know in that I desperately want my ideas to be knocked off by the Chinese and marketed en-masse, because it means I don’t have to deal with it any more!

Hey, I hope some of them are following RageBridge 2′s development…

I regularly scout the furthest frontiers of shady Chinese component offerings (read: surfing Alibaba and Aliexpress) in the hopes that one day, some enterprising Chinese e-bike shop will awaken to the gospel of small hub motors and make the 5″ brushless size I made years ago. I’ve been watching the sizes creep down slowly. In around 2007, you couldn’t even really find brushless 8″ ones – they were mostly DC. In recent years, 6″ brushless ones have become available, but I haven’t seen then really used in anything – some times, I wonder how these Chinese shops get any business. Finally, about two or three months ago, the inevitable occurred. Someone posted a 5″ brushless direct-drive hub on AliExpress!

At the time, I wanted to pick up a few for dissection, but the high combined price including shipping put me off – I was probably coming straight off the Great Fuel Filter Debacle of Dragon*Con 2014 and couldn’t spare to drop $400 randomly. That changed a few weeks ago, when I finally decided that I had to find out what the Chinese managed to set up in my turf.

Shortly thereafter, I received a heavily-taped box with something solid tossing about inside. You never know with these sketchy Chinese vendors, so let’s see what’s inside. At worst, I’m okay with having some small cast iron billets, so there’s that.

Well, they’re definitely round. And have wires coming out of them. Once again, I’ve narrowed down the goods between either small land mines or motors!

I was impressed with the construction, to be honest. The fit and finish was decent – I personally think the days of the crude, out of round, chatter-mark filled Chinese machined product is over, unless you personally order it that way.

The endcaps are die cast aluminum, and the center shaft a fairly standard M12 thread on both sides with 10mm wide flats. A wire access hole runs down one side, measuring about 8mm diameter, so it doesn’t leave that much meat in the steel for taking loads, but the short distance you should be mounting these between forks makes it tolerable. I think one-side mounting these, such as on a Chibikart, will be unacceptable.

I very quickly cracked the casing apart by removing the radially-positioned M4 screws. I swear I’ve made this exact thing before.

I kid, of course. There’s several differences between my designs and this commoditized one. First, you have to split the motor apart to change a tire, whereas in my final few designs – piloted by Razermotor v3, Skatemotter, and Chibikart’s motors, a threaded ring clamps on the wheel, allowing it to be changeable. Yet I’ve also built motors where the endcaps have to come off to change the tire, such as the original Razermotors.

There’s upsides and downsides to both. You could argue that the lifetime of these components is not long enough to justify an easy way to remove the wheel, and I’ll totally buy that argument for these kinds of applications, but I chose to investigate how the wheel can be made easily removable just in case (or, if I ever get these strong enough to do burnouts with, of course).

Because of the lack of radial dimensional overhead needed to mount a threaded ring, they could afford to make the stator and magnets larger than I’ve been able to. I’ve never casted or molded my own tires, instead opting to stick to commercially available scooter tires, which tend to be tall in profile. As a result, I’ve been generally constrained in stator size in both diameter and width.

Not so with this. This is a full 80 x 30mm stator, with 18 poles instead of the usual 12 found in mine, and 20 magnets in the rotor. Getting custom stators made was one of the reasons I didn’t want to commit to production – they’re not single-packaged items in little ziploc bags; the tooling cost to set them up once was several thousand dollars – and that was a Chinese shop quote I got from mfg.com. Stamping 100,000 little tabs of steel and pressing them together still takes massive capital equipment.

(And no, casting iron-powder and resin material was not nearly a viable option for production.)

Three Hall sensor slots are carved into the laminations, spaced 120 electrical degrees. I stared at this for a little while, since by my general rule for Hall sensor spacing (360 electrical degrees / # of pole pairs / 3 phases), it should result in sensors that are 12 degrees apart for this 20-magnet motor. But these are visually more than that – I’d say more like 30 mechanical degrees apart.

I’m going to hazard a guess that they are actually spaced 24 degrees apart, which would mean each sensor is technically 240 electrical degrees apart – but all that does is wrap around the 360 degree mark, leaving you “120 degree” spaced sensors anyway. Still, that doesn’t look like 24-ish degrees.

The OD of the stator is 80mm even, and the ID of the magnet ring is only 80.6mm – leaving a 0.3mm airgap. Holy crap! This thing is tight. I’ve left 0.3mm airgaps before, such as in the Chibikart motors, but have generally favored 0.5mm for “Charles cares even less than the Chinese factory” tolerances.

Alright, enough gushing, time to do some Science™!

Some simple science for now. I just wanted a top speed figure, Kt, and line to line resistance – that’s all I really need to know for the time being.

This being Chinese e-Bike parts, the mini-Jasontroller I dug out of a cabinet was literally plug and play with the motor – it just needed to get to know the sensor arrangement, which it did after one full speed run. The throttle pins also plugged right in.

Gee, with service like this, why do I bother doing anything at all?!

Here’s what I collected.

  • The approximate “Kt”, or Nm/A, is 0.25
  • Therefore, the approximate “Kv”, more common in the electric vehicle vernacular, is 37 RPM/V
  • The line to line resistance is 0.21 ohms

I didn’t count the number of turns on the stator, since it’s both “Hobbyking’d” and well put together, but inverting my rough hub motor math (god that thing is old – maybe it’s time to rewrite it) yields “About 11 turns”, which is visually reasonable.

As can be seen, I take hub motors very seriously. In fact, I take all of engineering very seriously.

They can get away with having about 25-30% of the turns I have on my scooter motor because of the scaling laws of the motors. Increase the stator volume and you gain torque by dimension² – both larger radius AND longer length contribute to torque production, and more stator poles and magnet poles also divides down the mechanical speed of the motor relative to the electrical “speed” more, contributing to torque per amp.

Overall, if I start with my 36-turn, 70x20mm scooter motor with 12 poles/14 magnets and arrive at this thing, it works out closely.

Enough about the science – how does this thing ride? Ever since Kitmotter exploded (because it was made of wood) at Maker Faire 2013, Johnscooter has been sitting on a shelf. Well, I pulled it back out after getting these motors, and noticed that they could fit perfectly in between the rear forks!

However, since this motor had a fixed shaft with external threads, I had to turn the single-hole forks into “dropout” style forks by cutting a slot through to the mounting hole.

Well, that was certainly easy. Everything from here was, again, plug and play.

I’d say it looks quite good (minus the bundle of wires). The batteries needed a bit of cycling to wake back up.

Finally, it was time to con people into riding it.

The full-throttle pull is, of course, not that impressive, given that it is a small hub motor. However, it’s also not slouchy; certainly better than Kitmotter 0002 was. This is also with an unmodified mini-Jasontroller that’s putting out about 15 amps maximum, in a rather limited speed interior test. With an R/C wattmeter watching, it was never really pushing more than 200W into the motor. I recorded better results riding this thing home (I’ve forgotten how to ride a tiny-wheeled scooter) since it was able to get up to speed, pulling around 350W and hitting about 15mph (20kph) or so.

That’s as good as RazEr-original ever was! (Razer Rev is kind of a monster with my custom 3-way-Frankensteined 50mm wide stator, and is an exception to the dorky small scooter rule).

I’d say the manufacturer’s “250W” continuous rating is reasonable given this size of motor, and for added durability and thermal protection, I would infuse the windings with epoxy resin. Unlike my motors’ large aluminum shafts, the stator will have a hard time heat sinking through the steel shaft, so severe overdriving would be out of the question barring some case venting.

A bit of internet sleuthing led me to find some other vendors for this type of motor, which makes me wonder who actually makes them – I didn’t see any manufacturer’s markings at all on the inside. Here is one – UUMotor.

So what does this mean for you? Well, now with this resource, you guys can…

  1. Stop asking me about electric rollerblades.
  2. Stop asking me about that motorized suitcase / shopping cart / telepresence robot / self-folding Segway or the like.
  3. Make your own Chibikart 1! (Though you will have to modify the design for double-hung wheel support)
  4. Make your own 8 wheel drive Chibikart 1!
  5. Direct drive robot weapon? I wouldn’t go near the cast aluminum side plates, but certainly using the magnet rotor and stator in a custom design.

 

I do have half a mind to revive the RazerBlade project using this hardware and mini-Jasontrollers, but perhaps that is an exercise for one of you. For the time being, one of these motors will continue to live on Johnscooter (at least until I cook up a new Kitmotter design) and the other will be a lab curiosity. The maker universe has much to benefit from the gradual commoditization by the Chinese manufaturing cloud of once hard to access technologies, even if some individuals or companies might be impacted negatively. Hell, I should be pissed that someone else took my idea to fruition, but I purposefully did not take those actions myself, so I’m not going to complain.

So, when can I have my knockoff Ragebridges?!

Big Chuck’s Chinapalooza 2014

Speaking of China, I’m going to be in the ‘hood again in a week. The current lineup is:

  1. Shenzhen, 12/12 – 12/19. The manufacturing stronghold, I’m finally going to get to see what this place is all about. I have no agenda to pursue here, it is literally on my list because I have to see this place at least once while I’m gonna be in the area anyway. I’m just imagining a massive orbital cloud of knick-knacks, widgets, and tchotchkes here, and nobody may try to debunk said illusion in the comments section.
  2. Beijing, 12/20 – 12/27. The real reason I’m in China is for family visits, and unlike in the U.S. where I’m a southern good ol’boy (being born in South Carolina and raised in Georgia… seriously, I intend to unironically play the good ol’boy line when I run for President), I am a dirty 北京人 by heritage.
  3. Tokyo, 12/28 – 01/02. Okay, this is stretching the definition of “it’s in the area anyway” now, but I decided to turn a layover into another week visiting a place everyone has told me I need to go to. Expect me to be firmly glued to Akihabara.

I have no agenda as of the moment in SZ or Tokyo, so if you will be around, or know some places I should drop in on, or places to stay/crash, feel free to leave comments.

I’ll make a separate post with my contact/social media info in China once I get that together myself.

There will be melons.

 

Beyond Unboxing: The Great Cambridge Chainsaw Massacre; Ryobi RY40511 Cordless Chainsaw

Jun 23, 2014 in Beyond Unboxing, Reference Posts

Hello everyone,

I’ve decided that I need a career switch. After 2-3 years of being a shop ninja, I’ve decided to move on and become a…

…Chainsaw murderer. I’ll see you shortly.

This is probably the shortest turnaround time for a Beyond Unboxing post ever. Around 2 in the afternoon on Sunday, I received a tip from Shane and the motley crew at Freefly about this device and how it might be worth looking into.  An hour later, I was blitzing down Storrow Drive heading due west towards the Home Depot in Watertown, MA on a war path to obtaining one. Just to check it out. And an hour after that, it was parted out completely on my shop bench.

Why the hell do I find tearing apart consumer products so amusing? Probably because I know both how the sausage is made as well as how the sausage will be cooked and eaten. As with other Beyond Unboxing posts, the focus is how to divert these products into small electric vehicle or robotics applications, in the context of teaching newbie builders and hackers to be resourceful and to see parts everywhere.

From the past few years in meddling with lithium ion batteries and brushless motors, I’m always giddy to see them used in more and more tools and common implements, but they’ve been primarily in the domain of the ultra-high-end until recently: Spending $300-400 on a drill for parts, to me, is not really worthwhile when you can engineer around the same problem using other commercial parts, or even custom-made ones, for much less. This is part of the appeal of things like mini-jasontrollers and angle grinder gearboxes: To duplicate the functionality would imply spending an order of magnitude or more, and the chopped up commercial product would be workable for all but the most stringent and demanding of applications (Former students, I’m counting on you to put T-nuts and Jasontrollers in space).

I’m glad to see these lithium ion and brushless systems coming down in price and going up in power. The advent of the Inexpensive Chinese Brushless Motor has been beneficial to many industries. First they started small with compact drills and drivers, then moved up to saws, and now bigger power tools whose domains were previously dominated by gas engines. Once you get to things with power levels in the hundreds and thousands of watts, you can ride them. Perhaps the advent of this tool is the closing of a circle of life for vehicle builders: Years ago, kids would build shoddy vehicles powered by gasoline engined chainsaws and leafblowers. Now, they can finally do so with electric. And have it not suck.

Here’s what’s inside a Ryobi model RY40511 “40v” cordless chainsaw. I’m surmising I know (directly or through only 1 or 2 degrees of separation) the intern who first conceived this and put it together, because as you’ll see, the hardware is quite familiar….

First off, this is what the box looks like. GAS-LIKE POWER! I can’t believe you guys trademarked that. I mean, it’s basically in the vein of “polypropylene-like” modeling resins for expensive-ass 3D printers (sorry, Objet!) or “fat-like” additives for greasy fast food.

…and would it kill you to use a longer box?! What is this, Minecraft? How many of these get bent up and broken in shipping?

Putting a picture right on the box of an outrunner. Damn, I wish I paid more attention to the aisles of Home Depot now! Maybe I could have gotten on this months before!

Step 1: unboxing. This is pretty much one of the only normal pictures this post will contain, so savor it. Included is the saw unit, a battery, and a charger.

The battery in all its glory. I’d wager by the oblong shape of things, it’s an 18650 pack made with 1.5-1.8Ah “power” cells laid flat in a “W” pattern. You’ll see later that this wasn’t a bad guess – being a little familiar with the state of the industry helps (and some math: 55Wh / 40V is about 1.4, figure in some overhead).

The battery has two terminals besides the + and – called T1 and T2. Most lithium packs have a connection to the battery management system or similar, and this format varies by manufacturer.

While I was plotting the deconstruction of the saw, I put the battery on its charging dock. It’s a fast charger – 1 hour or less.

I’m extremely happy that lithium ion power tools are becoming the norm, because that means an end to the era of those irritating as fuck “Revive your battery!!!” kits and guides sold by industrial charlatans all over eBay and the like, because those clutter up every possible search you can make with power tools terms. That only “works” for nickel cells (it’s called Zapping, and it doesn’t actually fix much in the long term), and if you tried that with a lithium battery, congratulations on your newly made IED.

Taken out of the box. Where a 40-50cc gas engine would go is a big hollow battery cavity.

Hmm, weird. The tabs inside the tool would only connect to what is called T2. This will come into play later.

And here is the whole device. It weighs about 10 pounds without the battery, which is way lighter than a gas powered saw. Chain bar oil container at the front, variable squeeze handle at the back. I liked how it felt – it’s definitely designed from the ground up to be an electric saw, and not a crude rush to market retrofit of a gas saw.

That’s all the generic unboxing post you’ll get from me.

Break out the wrenches and hex keys! The majority of the body screws on this thing are T25 torx. First to come off is the chain cover, with four screws.

The two M8 nuts come off also, and the drive sprocket and tensioner assembly are revealed.

The chain and bar assembly come off easily once the nuts are removed.

To remove the drive sprocket and flange, you’ll need a snap ring plier, or some tiny screwdrivers and a bucket of patience. Retaining rings used to be my most hated component when it came to taking something apart in my middle school and high school years, because I didn’t have retaining ring pliers!

But now I love them. Welp.

The smaller case screws take T20 torx. There’s three on this side of the saw.

However, I found that the side plates were keyed into the gray top. There’s more T25 screws on the top plate, and then it lifts off pretty easily:

…to reveal the Jasontroller… uhhh, okay, Jasontroller. Two 470uF bus capacitors and discrete FETs, two per leg of the three-phase bridge, is all I can see at this point. The FETs are Alpha-Omega (what kind of semiconductor company name is that!?) AOT470 type – kind of low end of the market, but they’ll get the job done I suppose.

The board is actually quite well designed and marked. Hell, everything is labeled already! Even the motor hall sensors and the trigger switch wiring harness. The ‘throttle’ is 5 pins labeled S, S-, S+, -, and +. The “communication” wire leads to terminal T2 on the battery.

If I had to guess, this assembly contains a “throttle switch” that tells the controller you’ve hit the trigger (before the signal changes), and the S, -, and + are what would be a 3-pin Potentiometer sensing element or Hall sensor sensing element. I haven’t verified this on the actual throttle, by the way, but it makes sense.

Back to the saw! This assembly in front of the motor appears to be a bar oil pump driven from the motor, or perhaps feeding the motor. It has to come out for the motor to be removed. Two T25s screw it into the motor.

But that wasn’t all. To remove the motor, I had to be able to take the other half of the plastic shell off. This took a longer T25 bit than I had in the form of that green set. It was 5:45 PM on Sunday.

I’m proud of the Commonwealth of Massachusetts and the City of Boston for not supporting the usage of speed cameras, and of Mikuvan for not…. uhh, exploding. The closing staff at HF were waiting for me at the front door when I pulled in. Thanks guys!  This is a T-handle Torx set, 42926.

(The observant would note that the local Home Depots close at 9pm, but…)

With my newfound long-reach Torx set, the case screws come off.

The goods are within sight. Check out that motor – it’s like a pointier, more gritty version of a Hobbyking outrunner!

Hell, it even says the size on there. However, this motor house, whoever they are, seems to label their motors properly: By stator diameter and stator length! Hobbyking would actually call this, in all likelihood, a 63-54 type motor. The can length compares.

The motor is attached to the controller through these terminal block things. I guess they wanted something to distinguish them from an R/C outrunner. Should have used 4mm Bullet connectors!

The motor sits over a Hall sensor board. This board uses 120-degree oriented Hall effect sensors, but what is interesting is that they’re surface mount devices, and oriented vertically. Having a custom motor without a nosecone, unlike the R/C outrunners, would let you do that. Having the sensors in such close proximity to the magnets’ ends, not sensing through a steel can, surely contributes signficantly to their ability to not drift significantly out of time at high speeds (That video is the reason why we made those Hall sensor boards slotted and adjustable).

Removing those two T25 screws on the oil pump reveals the pump mechanism. Now, this thing is clever. So I’ve never taken apart a chainsaw before this point, so I’m not sure if this is in common use, but it’s cool anyway. The little gear inside the pump body is engaged by a helical spring slipped over the motor shaft (more visible in later pictures). This spring is a slumlord worm gear, meshing with the pump’s own gear.

I didn’t get a picture of the right side of the pump where it connects to the black rubber tube, but it’s a lobe looking thing that acts like a one-rotor gear pump. It’s enough to squirt a little chain bar oil onto the blade steadily, nothing special.

Continuing the motor removal with 3 more T25 screws:

And the system is out! I love this motor. Not only does it have a big fan cast into the end, but it has a normal shaft. It’s 12mm diameter, 10mm across flats. You can straight up slam a belt cog or chain sprocket over this and use the flats with some giant set screws and be done with it. Or, you know, just use the friggin’ chain and make a killer ice-racing machine.

I studied the plastic parts for a while. They’re mostly useless for our purposes, but looking at them is a great manufacturing study. The injection molding crew spent some time on this! And imagine those molds being made.

Here’s a close up of the controller. The construction is “jasontroller-like”. The gate drive circuitry is entirely discrete. Hell, the microcontroller is a STM8S, a staple for Chinese motor controllers. I bet this pinswaps for a generic Chinese e-bike controller pretty well.

I decided to take apart the battery next to see what’s inside. They put a bit more effort into this one: It needs a T15 security bit (with the center pin). Luckily, I had such a thing.

Four screws and the lid pops off. Holy crap, that’s a ton of electronic jibba-jabba for a battery. On the left, a big fat current sensing shunt. On the right, the battery management circuitry and charge balancing circuitry. On the very left, edge, buried under the board, were two semiconductors of some sort – I think they might be TVS clamping diodes. I decided against unsoldering each and every cell connection to try and find out, but again, it would make sense.

To lift the battery pack out, there’s two tiny hidden screws on the bottom, right where it says RYOBI. I’m going to guess that placing one of them right under the “O” was intentional.

To find hidden screws, I usually drag a screwdriver in a grid pattern around the tops of stickers and badges until it “sinks”. It is a very common tactic to hide screws under labels, stickers, and those little rubber bumpy feet if your appliance has them. Sadly, not everyone loves giant-ass cap screw heads sticking up every which way on their products like me. I’m a mechano-aesthetic snob.

A close-up look at the power side of the BMS. The 1 milliohm current sense shunt resistor has some little analog filtering passives growing on it which may or may not lead to the “T1″ and “T2″ terminals. Again, to find this out for certain is your job required unsoldering 12 cell tabs, and I wasn’t going to delve in that deep yet.

Again, if I had to guess, these do not (or do not only) lead to the T1 and T2 terminals, but is also used by the BMS to determine if it has to cut off the battery pack current.

BAM! Who was spot on about the battery? Here’s a LG Chem 21865 1.5Ah “power” cell. I say “power” because there’s often 2 ways you can optimize your lithium ion battery: for power or for energy. It all depends on how thin your terminal plates and separator is (the thinner, the more volume is occupied by active anode and cathode material, but the more resistance and hence less ability to dump amps). Most power tools are going to use “power” cells, most cell phones and low drain devices “energy” cells. For instance, in the 18650 (one size smaller) size, 3Ah “energy” cells are becoming common, and these are the next larger size and only 1.5Ah. But as will be seen, they will push current.

(Today when I learned about the world of customizing electronic cigarettes. What the great carbide-tipped fuck? Seriously, it’s like the old adage of racing – “if it moves, race it”: If it’s a electromechanical device, mod it.)

With the saw fully vivisectioned (never before has this term worked so well, since everything is still working!), let’s start doing some science.

The “throttle” is a plunger switch – on the side, it says it’s a Defond model EGA (see page 44 of this catalog). As suspected, it’s an ‘enable’ switch, plus a 3 pin potentiometric element. Which pins are which, I haven’t dug into.

First, the motor running at top speed (it sounds awesome) draws anywhere between 4.2 to 4.4 amps at the battery voltage measured at this instant in time (39.2v).

No-load waveform of the motor, showing voltage (39.2V) and electrical frequency (1,389Hz)

Scoping two of the phases tells me that at full throttle (100% pwm – no switching waveform seen, just the commutation frequency cycling of the FETs), the motor spins at 1,389Hz, or about 12,000 rpm. To get from electrical Hz to mechanical RPM, you take this waveform frequency ( “electrical cycles per second” ), multiply by 60 (“electrical cycles per minute”), then divide by the number of pairs of magnetic poles of the motor. For this motor and many R/C outrunners like it, it’s 14 magnets, so 7 pole pairs. You arrive at 11,905 RPM, with some amount of error nobody cares about outside of an instrumentation course at MIT.

At this speed, with the Hall sensor timing given, the motor’s Kv (“volts per RPM”) is approximately 300: 11,900 RPM / 39v. This is fast for a motor of this size, so to be useful in a vehicle, it will require significant gearing.

I next measured the low end – what the controller will run the motor at if you tell it to do so at the lowest possible speed. What I noticed right away is that there is a speed-dependent cut-out, presumably to prevent saw damage in the event of the chain getting stuck. Let’s find out what this is:

Cut-out speed of the controller, under load, 66 eHz or 500 RPM

Often, these motor controllers will hold the motor spinning down to a lower speed than the minimum speed they will start up at, termed the cut-out speed. For this controller, it was 66 eHz, or roughly 500 mechanical RPM.

By the way, I tested all these speeds by grabbing the motor while it was spinning, wearing leather welding gloves. At one point, the glove started smoking when I did a haul all the way out to about 65 amps. Do not do this. Ever.

If you do, do not grab the pointy fan bit.

Cut-in speed (minimum speed) of the controller, approximately 350 eHz or 3000 RPM

However, the minimum cut-in speed of the motor was about 3000 rpm. This implies the following:

  • The motor must be able to start up with relatively small load and get to this 3000 rpm speed quickly
  • Once there, it will happily be loaded to any degree provided the speed does not fall below 500 rpm.
  • I wasn’t able to accurate characterize the startup torque available during the startup routine, because that required too many hands.

This may ruin the usefulness of this setup for go-karts and related (e.g. no foot-starting available), but should be still useful for scooters (push starts with feet is part of the game). I try to tell people to model controllers/motors with low speed lockout similar to sensorless motors: the motor shouldn’t be able to tell that you are there, and this is accomplished with sufficiently high gearing.

With a 300 RPM/V motor, you need plenty of it anyway!

I was curious about what the T2 pin connection on the saw’s connector led to. Scoping it, I saw something which was basically an analog voltage that varied with the current being drawn. Zooming in close enough to the scope showed the PWM frequency, so I’m pretty sure this is just a straight tap from the T2 terminal of the battery pack, possibly corroborating both tool and BMS having access to the current sensing shunt in the battery.

I couldn’t tell what the sensitivity was, given that I was out of hands. It seemed nonlinear: 4 to 6 amps occupied a 1-volt division, but so did ~20 to ~35 amps (did I say something about the glove smoking… I was dumping 900 watts into myself here). So there may be something else at play.

Next, let’s find out the resistance line-to-line of the motor. This is the determinator of how much the motor can pull, current-wise. Using the 4-wire method, I got that it was about 29 milliohms. Solid – this is on par with an R/C outrunner of similar size.

(The 4-wire method is basically: Two terminals whose ONLY JOB is powering the device under measurement, two terminals whose ONLY JOB is to measure something. This isolates the effects of parasitic resistance in the power wires from the sensing wires.)

By the way, in 2.00gokart, every student characterizes a motor for Kv and R in the fashion just presented.

One last thing I wanted to find out is if the controller was stupid flexible enough to run without the battery and its sensing circuitry. Hey, the absence of the battery current sense line would mean it’s drawing 0 amps all the time so it shouldn’t ever turn off, right!?

The answer was yes, it will run off just any old power supply. No hackery needed. Supply 38 volts, turn motor.

It will in fact run down to 20 volts.

summary

So what do we have here?

The Ryobi 40V cordless chain saw is:

  • A 300 rpm/V, 14 pole, 63xx class, 29 milliohm brushless motor with a 12mm flatted shaft and beefy aluminum mount
  • A controller with Hall sensors, a free plunger throttle (add your own lever/knob), and maybe an irritating speed-dependent cutout that will cause loads slower than 500 rpm to not work.
  • A battery and charger with internal battery management circuit that can dump at least 60+ amps for some time.

Gee, that sounds like a go-kart or scooter to me. Thanks, Ryobi!

I invite anyone else who is curious to pick one of these up and maybe try running it in something. I’d say you would be hard pressed to find matched components of this power level for less than $200, battery included. The downside is that a spare battery is $100+ by itself, but as can be seen, the controller will happily use any ol’ battery. I’m curious to see how the speed-dependent cutout affects real world operation, since I couldn’t get a good handle on how much available torque it has between 0 and 3000 RPM, the controller’s “minimum speed”.

As technology marches on, so the spoils of yesterday’s cutting edge shall become available to the homebuilder/hacker. Hopefully this series will contain some more interesting tools and equipment in the future!