Archive for the 'Stuff' Category


Brushless Rage: The Final Board Revision, For Real This Time

Jul 16, 2017 in Stuff

It’s getting closer! This will be a minipost addressing the last design conundrum in the signal board – how to get the optocoupler input to play nice with a programming linker.  Last time, I discovered that the USB linkers didn’t play nicely with my oddball bidirectional optocoupler setup, so I halved the bidirectional opto and pushed a new board revision. Clearly, I didn’t get to the bottom of what the mysterious 1-wire bidirectional serial-like bus of the popular SimonK/BLHeli bootloaders want, so here is my short investigation.

What happened was while I could use the R/C input side of the optocoupler, the programming header only worked without a pulldown resistor. This, of course, meant the optocoupler no longer worked, so I was still in the same state as before.

I already understood that my preference for pulldown resistors is the opposite of “normal” practice which is pullup resistors, but wanted to try to see if it would play anyway. I guess not :(

So I fully decoupled the opto to watch what the bus wants to do when it’s being programmed. Here’s the sequence of exchanges between the programmer and the board. The programmer talks in 3.3v but the microcontroller responds in 5V, then there is an idle waiting period which is pulled high.

With the programmer plugged in but not transmitting, the line is pulled high to 3.3v. This works with the bootloader detector in the firmware such that when it wakes up, it will not activate the main program if it detects logic high for a certain time period.

The programmer initiates communication first at 3.3v. I wonder if it’s 3.3V because it’s an easy voltage to regulate down to from the 5V of the USB connector, and keeps the programmer compatible with controllers that might use 3.3V (as not all micros have higher voltage tolerant pins).


And the chip responds using 5V (or if this were a 3.3v board, it would also be 3.3v). I can’t be arsed to actually decypher or research the bus, I just want my electrical interface to work.  Open-collector (pull-up) logic buses have a benefit of being able to tolerate different voltage levels on different devices like this, so I guess that’s why it’s more standard practice!

As I feared, my pull-down style optocoupler forced the bus idle state too low for either process to begin. It seems like the default state is high impedance or at least a VERY high resistance pullup, because this was taken using a 10K pulldown resistor (which caused the opto to be extremely noisy, so it was going to be unusable)

Okay, okay, fine. I’ll change the opto circuit to be a pullup like a competent EE and use the Inverted input setting in SimonK.

Some little blue wire edits to the board to change the configuration permanently, and we have a working board which can both program with a USB linker AND take opto-isolated R/C signal in! The irony is not lost on me that the original, unmodified I2C bidirectional optocoupler circuit would have worked just fine with the bus, but I’m not going to go back to it at this time. :’(

Oh, by the way, the LEDs? They’re also pulled up by default and the chip pin is driven low or turned off to light them. Like the opposite of how I want it.

Alright, time to commit the Little Blue Wires to the board. I swear, this is the last revision! Right now with the edited board, all I need to do is flash the initial firmware payload on using a chip socket. From there, I can then use the AfroESC USB dongle to talk using the PROG header. A commercialized Brushless Rage will come with the bootloader-enabled firmware and Reasonable Settings already written.


Detroit Maker Faire is coming up in 2 weeks, and I’m intending to take a batch of Brushless Ragebabies there to get them whipped into shape! And coming up soon, a writeup on modifying the FiTech Fuel Command Center to not melt down.

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.

The Life of Charles: Untold Tales of February Through Now-ish; BattleBots, Markforg3d, 2.00Battleship, and Chibi-Mikuvan Upgrades

Jun 16, 2015 in Chibi-mikuvan, Electric Vehicle Design, Events, Stuff

Isn’t it sad that the last meaningful post on this site was in February? I think it’s a travesty. A combination of perfect storm factors has overwhelmed even my blogging habits. I’m kind of like the Waffle House test of blogging – if even I stopped blogging, you know some shit went down. And I do have some very interesting news to report. In no particular order of criticality or intensity, I present…

  1. The extent of what I can say about Battlebots on ABC before the season premier!
  2. I got a new shiny thing, a MarkForg3D Mark One continuous-filament 3d printer!
  3. Porting (heh) 2.00gokart to the water: The making of 2.00Battleship for this summer’s SUTD program.
  4. When it’s not robot season, it’s go-kart season. Time to make some changes to Chibi-Mikuvan!


Big Chuck’s Japan-o-rama 2014: Tokyo, Akihabara, Robots, and Vans

Jan 11, 2015 in East Asia 2014, Stuff

Update! I’ve been notified that seg-thingie was featured as a new product at CES 2015 [1] [2] [3]. Hurray! But you saw it here first on Big Chuck’s Robot Warehouse!

Continuing my tour of East Asia beginning with Shenzhen and stopping over in Beijing, Tokyo is the last stop on the way home. Originally, as I said, this trip was only going to be a Beijing stay, but I decided to take the opportunity of being in the neighborhood (for very, very broad definitions of neighborhood) to finally see the two places which I will allegedly never return from.

this is it

The place everyone and their thrice-removed Facebook friend has told me I have to go. The place I’ve been told is full of My People™ and that I will never want to leave. The origin country of Miku, vans, and mikuvans (and by extensions, Chibi-Mikuvans) alike.

Needless to say, I’m really hamming it up there for dramatic enhancement, but I was deep down quite excited about visiting Tokyo to get the ‘on the street’ story for myself, past the  “Weird Japan” websites and stories from friends. Not only that, but I tend to avoid tourist traps or the ‘usual stops’ on international trips – though there will still be some of it here because it’s friggin Tokyo – and try to get the story of the local maker scene and tour some of the industry instead. That’s just my personal preference, and I think reporting on what maker environs are like the world over will help us all gain some more appreciation of the unifying force that is making, hacking, & building.

I’m going to make no pretense of this report being some kind of review of or introduction to Japanese culture. It’s going to be shamelessly specialized towards maker folk with otaku tinges who are more into vans than they should be.  So perhaps, in a way, this is my own “Weird Japan” page that will join the ranks of others’ trip reports and photo albums on the matter, but hopefully with my own personal twist and much less hexadildopods (Don’t say I didn’t warn you…)

This is most definitely going to be another one of those ridiculously long posts that I will have to split into parts beforehand so it can be navigated. I have no less than 120 photos lined up for this page. That’s more than I typically take for an entire project build, spread over five days of running all Gaijin Smash like around the city.

  1. Day 1 (12/29): Visiting Tokyo University; a backstreet run around Akihabara; DMM.Make
  2. Day 2 (12/30): Comiket 87!
  3. Day 3 (12/31): Tokyo Sky Tree
  4. Day 4 (01/01): the Meiji Shrine; Harajuku
  5. Day 5 (01/02): Tokyu Hands
  6. Vans. Thousands of them.


What is Engineering?

Jan 28, 2014 in Stuff