Deathblades: The Double DECer board

Once upon a rainy day in Boston, Charles sat in his free scrounged office chair, slumped over the armrests. He was focused intently upon his 17″ LCD monitor, its glow filling the darkened, humid room. The ambiance was only disturbed by the sound of raindrops upon the dusty window, whose blinds were drawn such that he did not have to think about the fact that it was raining outside and he really, really hates rain and doing anything or going anywhere in the rain so he didn’t go MITERS to keep adding sensors onto the motors and…

Alright, that story went nowhere.

I did take today to think a little more about controlling the Deathblades. At this point, I knew that

  • I was going to use the Maxon DEC modules
  • XBEE radio units would handle communication between the input device and the skates.
  • … There will be a handheld control input device. With, like, an XBEE in it.

However, all these thoughts a controller do not make. Taking advantage of the rainy day, I took my Course VI skills out on a second test drive and began laying out the internal control circuitry for the skate motors. The DECs, as bare boards, aren’t really conducive to hacking together. I would need a solution which supplies them with power and auxiliary components, and as long as I have those on a board, I might as well put in communications as well.

Now, if you had asked me even a few months ago, I’d have just whipped together something out of protoboard. But in the interest of legitimacy and experience, I’m going to have a real PCB made.

I started by drawing out the schematic of the board. Core components such as the XBEE and DEC modules were added and “wired” first, then support circuitry added as needed. I had to make several custom devices for this board, one of which was the DEC module itself.

The XBee will used in just about the simplest fashion it can be – a direct, no-microcontroller, digital and analog I/O bridge. One of its analog (PWM, actually) pins will drive the speed input pin on the DECs, and a digital I/O will toggle the Enable pins so the motors can coast – otherwise, there’s a dynamic braking effect. Because the XBees run only on 3.3 volts (Digi should fix that, really), I added a 5v to 3.3v LDO regulator, which draws power from the Hall sensor output (VCC_HALL). The DECs are rated for “35mA” output each, so I’ll see how conservative that really is.

While making this schematic, I had the chilling realization that the XBee’s 3.3 volts maximum output will never drive the DEcs to full throttle.

Uh oh. So I had to somehow level shift 0-3.3v to 0-5v. My first instinct was a noninverting rail-to-rail op-amp set to 1.5x gain (which is about the ratio between the two voltages), but that was just… so analog. The next option is a bidirectional level shifter like this Sparkfun unit, which is available for an almost trivial price. Problem is, that meant making yet another custom component. I was getting tired of having to whip up my own parts at that point, even if all it amounted to was copying and pasting footprints and symbols.

… so I took the discrete path out and spec’d some SOT-23 signal MOSFETs and 1206 SMT resistors. This will officially mark my foray into surface mount parts, something which I PROMISED PROMISED PROMISED to never EVER EVER do. But TO-92 cases just looked bad on a board, so there. There are two stages of the inverter such that the PWM signal remains rectified.

After the level shifting, the signal goes through a low-pass RC filter with a break frequency of around 160Hz before splitting to the two DEC modules.

What happens after  you make a schematic? You hit the “Board” button and Eagle piles everything onto a blank PCB representation. You then unchain your inner OCD and watch the board come together.

Well, here’s most things. I discovered that even the DEC modules will have a hard time fitting inside the ‘blades. Two reasons contribute to this:

  • Eagle’s free version limits you to 100mm long boards. The DECs had trouble fitting in crosswise because the boards are 1.75″ wide, but the internal skate cavity is only 1.6″.
  • Within 100mm, I couldn’t fit the DECs “longwise” and still make room for the XBee.

So for now, I’m going to hedge my bets on the fact that the 2.6Ah lithium polymer pack is true to its stated dimensions. If they are, then the DEC boards will be elevated above the level of the aluminum side plates, which means the boards can be 1.6″ wide with no trouble. The layout above reflects that.

Most of the way completed. The tricky part of this circuit was, oddly enough, routing the power connections. Otherwise, it still has modest componentry and convenient routing characteristics, unlike some weird shit like this.

Now the board has been routed to my satisfaction. The top layer text says “DOUBLE DEC’ER BOARD” and the bottom one “ETOTHEIPIPLUSONE.NET”, and both are in copper.

I couldn’t decide on a more productive use of the “overhang” space under the left DEC – but maybe later.

With luck, I should get these boards in the same timeframe that the USPS and China Post figure out what to do with my battery packs.

Deathblades Motorworx

To continue the tale of the Deathblades skate motor, I’ll just pick up where last night left off.

With the anchoring epoxy set on the rest of the motors, I began to lay out the Hall sensors on the first. I’m taking semi-nonlinear steps in completing the motors – building one up completely while only taking steps which I know were successful on the rest. This is different than the way I generally do things – which is all at once, consequences be damned, but the motors are very much experimental and have had alot of hours put into them already.

So here’s we hardwire Hall sensors! Yesterday, I wedged them in place just to check for spatial sanity. I followed the placement up with a drop of superglue to hold the sensors in place for soldering.

The leads were cut flush with the end of the stator laminations. Then I point-to-point connected the VCC and GND pins of each sensor with Kynar wire-wrap wire (my favorite for making quick P2P connections, and which I had commissioned a restock).

In a standard LRK motor, 120 degree Hall sensor phasing results in an actual 120 degree sensor arrangement. With other winding configurations, this could be untrue – sensors could end up in the middle of teeth, for instance. Stretching a wire all the way around the motor to accomodate true 120 physical degree sensors is kind of unwieldy, so the next best option is to flip the center sensor and place it on the direct opposite side – which really means right between the other two sensors, convenient for wiring.

As I investigated when building FVM, 60 degree sensor spacing with the center channel inverted is equivalent to 120 degree sensor spacing.

Using some 6-conductor flat insulated cable, I connected VCC, GND, and channels A, B, and C.

But wait – that’s only 5 pins. I just declined to use 1 of the conductors, but could see this being a thermistor lead or something in the future.

After making the connections, I flattened everything out to discourage side plate rubbing, then dunked the whole mess in epoxy again, and left it to set under heat and tension.

Real motor builders would never use shady 5 minute epoxy, but I’m not a real motor builder, so it’s okay. After everything cooled down, I reinstalled the stator into the motor and terminated the sensor connections in a 6 pin header.

Originally, this was a 5 pin flat (single row) header, but I discovered the idiotic way that a 1/2″ nut does not fit over 0.6″ of headers.

Oops. Off they came, and in their place, a 2 x 3 header row was installed. One row contains the sensor leads, and the other sensor power.

What’s left to do now but TEST! TEST! TEST!!???

Well, first I had to check if the sensors actually gave valid outputs. To do this, I ran the motor off RazEr’s controller and viewed the outputs on the MITERS Scope-on-a-cart (like soap-on-a-rope, but much more hardcore).

After making sure the sensors were phased correctly, it was time.

I broke out the DEC Module that was previously featured as a test subject. Two of these will be in each power unit , controlling one motor each.

Using the Breadboard Abomination from last time, I wired everything to the DEC. After playing the BLDC phase-and-sensor combination game, I discovered that the phase connections were cyclically shifted one position clockwise – A was actually C, C was B, and B was A.

Weird, considering that I installed the sensors in between the two teeth of their respective phases, but the DECs could just have a shifted state table from what I built in FVM. At least I didn’t wire up the sensors backwards or something…

Here’s a test video of me playing with the skate motor speed. Excuse the rocky start and apparent lack of rotational balance. Remember how much care I took in making the cases – they have a little bit of axial play which is being broadcast very effectively by the hollow frame.

And no, there is no reason why you would ever want a powered reverse on skates. But, it IS an option the DECs give…

next: all of them