January 27, 2017

LEM-On-A-Stick

A quick build which is incredibly useful.  Somehow I only thought of this now.

Recently Bayley and I were helping the FSAE team do some motor-debugging.  To get a good oscilloscope shot of their motor's phase currents, I borrowed the big LEM closed-loop hall current sensor from the motor dyno buck converter, wired into a ±15V supply and a sense resistor.  It proved to be extremely helpful, and in the process I realized that having a small, high-current, medium-bandwidth current probe would be incredibly handy, especially for motor/motor control stuff.

I threw together a simple current probe made from a smaller LEM current transducer powered by a 9V battery and DC-DC converter IC.  Pass your wire through the LEM, and the current signal goes out the SMA connector in the back straight to your oscilloscope.  The particular sensor I used is good for ±70A at DC to 200 kHz, making it fast enough to see effects like current ripple from switching on electric motors.



Since it's around the Chinese new year, I couldn't order boards from 3PCB in any reasonable amount of time, so I etched a board on the MITERS mini-CNC router to test the design:


I forgot to add the power switch to the Digikey order, so I tested with a piece of wire, and replaced that with a jumper later.



Here are the Digikey bits for populating one, minus the actual current sensor.  I used an LA 55-P (because I scavenged 3 a while ago),  but it could be populated with a variety of transducers depending on your desired measurement range.

I 3d-printed a little box for it:



Here are some random scope shots from an assortment of motors and controllers lying around MITERS.

This one's from someone's electric skateboard, which has an airplane ESC and a small outrunner on it.  Just spinning the wheel, the switching ripple is the same amplitude as the phase currents, thanks to the combination of slow switching frequency and very low inductance motor.  Not a good-looking waveform.


And this funny looking one is a sensorless Jason trying to commutate a small internal permanent magnet motor.



Once 3PCB comes back from holiday I'll get some proper boards made and assemble a couple more.  Here are the Eagle and gerber files if you're interested in building your own.

January 21, 2017

Motor Dyno: The Talk-To-Everything Board, and Other Updates

Here's the Talk-To-Everything Board.  The idea is that I want to be able to plug arbitrary motor controllers into the motor dyno, and control them from the UI on the computer.  There's an FTDI chip for USB to serial, with a digital isolator and isolated DC-DC converter, so that the computer is electrically isolated from whatever motor controller gets plugged in.  My favourite STM32 is broken out to a CAN tranceiver, a small buck for 0-5V output, I2C, RC PWM, TTL Serial,  differential 5V serial (like RS422), and SPI.  Even if I don't end up ever using several of these, it wasn't much extra effort to break out more interfaces, so I figured I might as well.


I moved the 'Everything-Board, plus DAQ and other sensitive analog stuff into an aluminum box with shielded cables in, to fix some more noise problems.  I also now have a big LEM closed-loop hall current sensor for measuring the buck output current.


Here's a look at the current user interface.  Notice all the extra doodads for controlling some of the test-motor interfaces.  I've also added "Profile Mode", which takes in a csv series of speeds, buck voltages, and test-motor commands with time-stamps, and plays them back on the hardware.  This way I can easily automate cycles like efficiency maps.


I'm currently in the progress of designing a new buck converter from scratch, to replace the awful pile of Prius power electronics that is the current buck.  Progress is slow, because I have very little experience with analog electronics and hardware controls (for regulating the buck voltage and current).

January 14, 2017

Return of the Snow Bike: It actually works now

It snowed rather a lot last Saturday, so I was finally motivated to get the snow bike up and running again.  Last episode, the rollers inside the treads kept jamming with snow.  I actually fixed this problem shortly after (almost a year ago now), but never quite got the electrical system to be solid.  The motor/controller was still plagued with position sensor errors, so the vehicle never lasted more than a couple minutes without breaking down.  For now, I've replaced the big 40V, 150A Kelly motor controller with a much more modest 50A sensorless e-bike controller borrowed from Dane.

Here it is wired-up and ready to go:


A closer look at the e-bike controller.  This is a 50V one Dane cracked open and modified the UVLO setpoint on:



Most of the streets were well-plowed by the time this thing got working, but fortunately someone had opened the gates to the courtyard of the Novartis building across the street from MITERS, and there was 6-8 inches of snow everywhere:


We also brought out the Atomic Thing and got to mess around on both vehicles for quite a while, until we got cold/were kicked out.



It's a bit underpowered right now - you end up holding the throttle all the way open the entire time, but still a good time.