Monday, January 9, 2017



An autopsy of the YASA was performed in lieu of its failure at competition. On site, the controller was throwing encoder faults, the reason for which became incredibly apparent once we'd disassembled the drivetrain.

Motor Exposed to the Elements

Tears T____T

Due to some negligence on behalf of the mechEs, the motor regularly sat in the shop without its dust covers on, which resulted in a foreign object entering the gap between the optical encoder and the encoder grating. One of the optical encoder housings was then bent and upon bench testing, was shown to be broken.

Top Side

Extracting the encoder board from the motor revealed a fairly run of the mill quad diff amp package that amplifies the photodiode current from the encoders to give the usable UVW output used by the motor controller. The encoders themselves are shimmed with a 3D printed member that gives the appropriate curvature when seated around the motor's circumference.

Bottom Side

The JST style connectors are for thermistor breakouts that are fed through the main "DATA" connector. Further, the board appears to have a conformal coating, presumably for HV isolation (the encoder board sits in proximity to the phase leads of the motor), however, gently probing the soldered through-hole leads showed that it didn't really do much in terms of insulation (lol).,

The replacement component comes in the form of the Sharp GP1A58HRJ00F, which is their drop in replacement for the broken part (The old part has since fallen into obsolescence).

Testing of the repaired board will continue once the rest of the drivetrain is back in order.


The motherboard and steering wheel boards were respun. The motherboard features many of the same things from last year's car, just in a condensed form. Since we were moving all of the low voltage electronics into a smaller, weatherproof box, space savings was the biggest priority. Further, simplifications to the I/O were made, which meant we could use just a single AMPSEAL 35 pin connector. Note: the relays required for the FSAE hybrid latching circuit took up a considerable amount of space.

Following last year's cue sheet, the micro takes care of the start-up sequence, and also monitors system conditions (tire pressure, motor rpm, current draw, speed, etc) which it can relay to the steering wheel micro for display to the driver.

Refinements were also made to the steering wheel electronics (see mechanicals here).

The steering wheel board was separated out into three parts: a main board that has the microcontroller that drives the main display, shift registers, buffers, and level shifters, and two LED breakout boards for indicating state of charge for the high and low voltage supplies. Having the boards separate meant that we could independently mount each section to its respective location in the steering wheel assembly, making our lives a little easier.

Development for both platforms is also done on Arduino given the low complexity and performance of the required systems.

Infotainment System

The display chosen was a 128x64 pixel Adafruit OLED module; using their included GFX library, the dashboard layout was done in a single evening.


In an effort to enhance the engineering curriculum at Tufts, a suitemate and I got involved in making some lab material for ES2, a general coding class for engineering students.

We were tasked with making a 1D and 2D scanning system that used one of the dinky ultrasonics sensors you see floating around everywhere.

To keep costs low, we decided to go with a nested approach; that is, the 1D scanner would be a subset of the 2D scanner. Pictured below is the 2D scanner - the 1D version would simply exclude the L-shaped "arm" and secondary motor, and then mount the sensor directly to the main motor stage, giving control of only yaw.

2D Lidar Scanner: Now with 50% more floating Arduino
The base plate consists of a lasercut piece of acrylic upon which the main stepper motor, arduino, and legs are mounted. The "arm" member is attached to the main motor using a set screw and shaft that's integrated into the arm's body.

Since the arm would be 3D printed, a tradeoff was made between print-time and strength: it features an I-beam structure that decreased print time and weight, and also allowed for convenient cable routing. 

The secondary stepper controlling the pitch angle, is mounted on the arm and holds the sensor using another 3D printed member.

Cable routing is done to reduce the cable strain without resorting to drilling out motor shafts.
Beginning from the sensor side, a small cavity is included past the expanded through hole for the motor shaft that feeds into a port in the arm - this will also double as the feedthrough for the motor leads. Shielded cable would be used to minimize interference between the sensor data lines and the motor lead wires.
Cable Routing
The cables then travel along the inner wall of the arm and pop out the bottom through a port located next to the main motor. 

 Also visible are the endstops - just some brass rod that's press fit to prevent either axis from over-rotating and pulling out a cable.

Electronics to be done soon...

Tuesday, December 29, 2015


Semester is finally over! Of course, this only means that the time previously dedicated to schoolwork is now consumed by cycling and CAR.

This week I've been getting the boards in line to be sent out to Advanced Circuits. Namely, the GLV motherboard, as well as the board for the steering wheel and HV panel.

A board for the steering wheel?

In addition to integrating the low voltage electronics onto a board in a reasonably sized box, the dashboard is moving onto the steering wheel. This meant I had to yet again moonlight as a MechE.

A thing of dreams @____@

The design change was motivated by the poor ergonomics of the current dashboard mounted user interface, as well as the sweet steering column connector that was discovered while overhauling the cockpit. The original plan was to have an ARM based microcontroller running the whole show, but given the limited number of pins on the connecter, I opted to run the display on an AVR, and have the motherboard talk to the dash over I2C.


In the center is an OLED display with an array of LEDs to indicated the SOC of the main and GLV batteries. In an effort to improve serviceability, the steering wheel is constructed in 6 parts: the backshell, the front grip, rear grip, LED diffuser (the acrylic bordering the screen), the face, and the quick-release adapter. The backshell can be removed for easy access to the boards inside (boards are mounted to the face).
The face and the quick release interface will all be made of aluminum, while the grips will be 3D printed, primed and coated with a rubberized finish, and the diffuser will be laser cut acrylic. The assembly is held together by socket head M4 screws.


Buttons mounted to the face of the steering wheel will ether be hardwired to the steering column connector or to the nano breakout depending on its function. Functions on the previous dash like the brake bias adjust, and cockpit emergency shut-off switch will be kept in a separate dashboard area  in order to minimize clutter on the wheel face. (read: fitting an e-stop button and a knob with a cable running off the other end is a nightmare waiting to happen).

Saturday, August 29, 2015


With but a few weeks left in summer, I decided that it was a good idea to start designing a sort of universal battery pack for silly EVs.

The goals of the project are to incorporate the following features:
  • Integrated BMS 
  • Output protection 
  • "Hot-swappability"/fancy latching holder mechanism 
The integrated BMS would likely come from one of those newfangled Chinese BMS boards flooding eBay, and a fuse integrated into the output port would prove a nice alternative to a hot, smoky death.

To elaborate on hot-swappability: the concept of having an easily removable battery unit in an EV has always been an attractive feature that is almost always countered with "I'll do it later." More seriously, doing it well involves adding some mechanical latching mechanism to hold the batteries into the vehicle along with a backplane of sorts to mate with the battery. Further, packaging becomes more important as I can no longer just shove some wires to the side and call it a day.

The idea is that I'd have at least two of these modules in parallel in any given application, allowing the system to stay on as one pack is replaced after the other (how necessary this is in a derpy vehicle is another question), as well as allowing for the increase in capacity so long as there are empty backplane connectors.

Taking a cue from modern cylindrical cell based EV packs, I started with a modular frame structure.
Buttery holders
Slots were included above and below for balance leads and space was included for the battery tabs. Holes for M2 fasteners are also there for insulation mounting.

A few test prints later, this appeared:

It fits!

Buck, buck, buck, boost
I finally got around to tuning and laying out the hysteresis controller for the buck converter.


  • FOD8314 gate driver w/optocoupling and desaturation detection
  • Totem pole output capable of providing 30A of gate drive. 

One of the reservations I have about this board is the implementation of the gate drive power.

After looking to the ends of the earth for fancy DC-DC bricks, and inverting regulators beefy enough, I finally decided to cut my losses and go with a pair of isolated bricks since, well, it's easy. Further, it would cost me all of $0 instead of whatever Vicor or Murata want to charge.


Thursday, July 30, 2015


A semester and half of the summer flew right by! A few updates:

Tufts Hybrid Racing won the electric category!
Net sleep defecit ~50 hours

As electrical lead, I couldn't be happier. Moreover, the experience of going to comp and tech was invaluable.

A few lessons:
  1. Strain relief is a thing.

    To put it frankly, most of the car's wiring is atrocious. Done with crimp terminals and wire that was often too small, things had a habit of jiggling out of place. The result would be things like relays not turning on, and safety circuits triggering prematurely.
  2. While doing hardcore stuff is awesome, it doesn't get you past tech.

    I think this is more than evident in this year's very low tech pass rates. I saw cars at comp with custom BMS solutions, hub motors (drools at IIT), integrated dash displays, CAN networks, and a whole host of innovations that I would die to have the time to implement. In the end, we didn't go that route. I'm glad that at a point very early on in the fall semester, I decided to pass on stroking my ego. Case in point: I originally planned on implementing the accumulator indicators with some fancy DC-DC bricks, however, they decided to die at comp. Not wanting to waste any more time,  an LED + resistor solution was whipped up.
  3. Documentation will save us (all)

    One thing I was very glad about was the fact that Alyssa and I had spent so much time beforehand churning out documentation by the pageload. If anything, having proper schematics and system diagrams made the inspectors more likely to cooperate and made the inspection process much simpler. Further, LOOKING AT THE TECH INSPECTION CHECKLIST BEFOREHAND will prepare you more than anything.
  4. Batteries are a pain in the ass.

    The saga began with the addition of the pouch cell rules for 2014. The rules required a host of safety feature required of li-ion pouch cell based accumulators. Namely:
      1. compression limiters
      2. padding between cells
      3. a repeating frame design 
      4. complete modularity of the cells.
          And so, about a week into the spring semester, bricks were shat and the hunt for cylindrical                 cells began. We ended up settling on the 40152 15Ah headway cells as they allowed a few                   things: 
      1. No pouch cell rules
      2. Similar pack configuration and capacity (80S1P vs. 71S1P of the previous pack)
      3. "Implementable" packaging.
          I say implementable in that we were limited by our fabrication capabilities. In the end, we had to reuse our old sidepods and jam in all of the old electronics with some new electronics and bigger cells, which resulted in a very contrived game of Tetris. I think there was about 5mm of clearance between the cell stacks and the sides of the box after putting in the FR4. Further, had it not been for the grace of UVM, the acres of Kapton tape required to insulated everything from each other inside the pack would not have existed. <3 UVM AERO <3.  

With that said, we will probably have to redo the batteries yet again for Lincoln next year lol.

Other Observations:

Car was extremely slow. The controller was throwing errors at us left and right as we put the hammer down; in my sleep deprived state, I wasn't sure if it was because of a fried/improperly installed HVD causing excessive contact resistance or the Sevcon was throwing a fit because of some ongoing throttle parameter issues. Regardless, further debugging once we move into our new shop space will definitely happen.
In other news:

I've been working with a Tufts Lab over the summer doing some work for Zildjian. In the process, there's been a necessity to interface some good ol' analog with an fpga.

Of course, this meant laying out and implementing a front-end.

Squiggles of Science
The board is meant to interface with the Atlys Spartan6 based dev board from Xilinx. The slightly totally unnecessary meanders were trace matched to 5 mil and layer thicknesses were calculated to achieve proper 50-ohm characteristic impedances for the topside traces (not that it mattered either lol) with a ground plane extended to the 2nd layer (yellow) for the topside digital traces. I ended up using a THS1007 as the A to D, which has a pin compatible sister, the THS1209, which can do up to 8MSPS if need be.

It wasn't known until much later into the project that the desired frequency regime was actually much lower than what I had designed for. I guess this is what I get for doing what the PI asked.


The analog side was pretty simple - just a few buffer amps, gains stages, an AA filter, and the level shifter required to interface with the A to D. J-fet amps were chosen for their high input impedance and excellent high frequency performance.

Stylish red wire was used to air-wire the +5V line to the buffer amps since a short developed between the trace and ground. After reviewing the Gerbers, I'm still pretty puzzled how something like this could've happened. MyroPCB, pls!?

Given that the trace was buried under the top layer, the impromptu solution was to beast it with a power supply until the trace burned out and cut a few traces. Burn, baby, burn.

Fast potatos to be discussed later...

Wednesday, December 17, 2014


With finals over, but a few days still left in semester, I took the opportunity to finish laying out what was aptly named the Nevcon Gen1.

I tried to condense the board into as small a space as possible, which meant I couldn't fit the optos and related necessities onto the board - at the very least I shaved ~$10 off the BOM, And with the relative abundance and swapability of arduino nanos, it's a feature that may be toyed with if a micro is ever soldered straight onto the board. Did I mention that the board is 3"x 2.8"? :3

Further, in cheaping out in the switching converter department, a rather unfortunate consequence was the requirement of a huge inductor. Not a huge deal considering passives come pretty cheap, but is pretty ridiculous when its footprint approaches that of your FETs.  

Speaking of FETs, they were moved to the bottom of the board for increased heatsink mounting capabilities. The arrangement appears promising, but seeing how cooling such a power dense object might be a problem, I'm quite inclined to ditch the fancy surface mount switches for some good-ol' TO-220s. 

To be continued...

Tuesday, December 2, 2014

Motor Controllerino, pls

After spending the better part of Thanksgiving break suffering from severe phase lead (diurnal living is overrated too hard), I thought it'd be wise to use the time on yet another project: a BLDC motor controller. Given that I wouldn't have the funds to complete the godly hysterically controlled buck converter until at least the end of summer, something on the smaller side could provide the amusement one needs when suffering from end of semester burn-out.

And so, the list of requirements was born.
  • 2kW continuous operation
    • This means at least 60A given a 10S pack. 
  • derpy voltage and less-derpy current control schemeability
    • From looking at homebrew controllers, open loop voltage control with block commutation seems to be the most common, but at some point current control would be nice (something, something, torque). Note that I'm avoiding fancier control schemes (sine drive, FOC), mainly because the algorithms involved typical take up more time on your cheap hobbyist microcontroller, thus limiting the commutation frequency.   
  • sensored commutation
    • Allows for starts from a stand still (extra important in vehicles such as pocket bikes and go-karts). 
  • low-cost
  • serviceability
    • I say this mainly because after having made so many boards with parts on top of parts and impossibly close clearances, it might be time to make my life a little easier when debugging. Maybe. 
Being ever so inclined to start by making a board, I went on the hunt for components. I ended up settling on many of the same components that the later iterations of melontroller used: D2PAK FETs, the same current sensor, and the same arduino; I was attracted to the power density of the D2PAK package (how heatsinkable they are is another question) and the modularity of the arduino nano, however the only current sensor I'm using will be on the DC-link. This is to avoid cost and to employ phase current estimation via techniques discussed here and here as opposed to having a hall effect sensor on each phase.

As for the drive electronics, I settled on these bootstrap ICs (LM5104) after being a little sick of discrete gate drive, which inevitably leads to a board space nightmare. Floating drive rails were out of the question considering I'd be driving FETs with under 4000pF of gate capacitance. Everything seems so cute after having to drive bricks.

Other considerations would be opto-isolating the gate drive from the arduiner - a habit I intend to continue after having seen too many micros and 74 series chips die to failures in the power side propagating to innocent logic. Note, optos with built in logic output may seem convenient, but often have propagation delays up into the tens of microseconds - not good when those microseconds constitute a nontrivial quantity of clock cycles and degrees of rotation. I'll probably end up using some variant of this (6N137).

Time for some board layout...

Saturday, July 5, 2014

A Midsummer Night's Blog Post


No matter. 



Current limited by the package leads, among other things, these are the perfect candidate for some pulsed, hard-switched, power dense goodness.

And so the journey to building a QCW bus modulator begins.

In essence, the modulator portion of your QCW coil is just a buck converter capable of producing arbitrary waveforms across the bus of your DRSSTC.

The tried and true control scheme for these guys is hysteresis (bang-bang) control, which involves turning on the high side of your buck converter when the sense voltage falls below your hysteresis band and turning the high side on when your sense falls below the hysteresis band.

In lieu of a microcontroller, I opted to make my control loop out of op-amps for noise immunity and beardy-weirdy cred.

Troller Schematic. Forgive me, for I have text overlap up the wazoo. 
The first two op amps are set up as an adder and differentiator, which produce the hysteresis band given the input waveform. These signals are then passed to the latter two, which acts as a window comparator.

The outputs of the comparators are then fed to an SR latch so that the hysteresis thing happens.

Squiggles of Science
The control loop can then be tuned using the width of your hysteresis band or some fancier processing downstream.


Special notes: the input signal is actually taken from an opto, which is filtered by an LC to reproduce the desired waveform. It's like L-C filterception. Additionally, this allows me to send square wave pulses optically, instead of an analog signal through a long length of coax, which is bound to cause massive damage pick up noise.

Here it is in board form:

Note: not fully routed not the actual board
After doing some math and running the simulation for the bus at full load in spice, I concluded that I simply couldn't find bus caps large enough and in the desired package, so, the some revisions were made to the design.

The boards are now split up into three sections: a DC-chopper motherboard, controller daughterboard, and DRSSTC with filter LC.

Can't have too much bus cap (a work in progress)
By moving the filter LC to the DRSSTC bridge, I could then populate the DC-Chopper with as much bus cap as my heart desired (and keep the ripple voltage below 5%).

The addition of the driver daughterboard would allow me to send out for plenty of driver revisions without having to spend a fortune on the whole 5.5" x 5.5" board. Oh, and did I mention how small everything is? :3

Current limiting is implemented on the driver side as desaturation detection: in an over-current state, the voltage drop across the switches increases to well above the typical ~2.0V, which is detected by the drivers, which do some fancy soft-turn off to prevent voltage spikes induced by the typically high dI/dt. The gate drivers also conveniently have built-in opto-isolated inputs.


Bluescooter got an overhaul to make it more of a reliable commuter vehicle than junkyard scrapper on the verge of collapse.

After eating through a current modded controller, a few things were changed:

1) Motor upgrade!

Sweet Bajeesus
After trolling around the internet for a sufficiently large motor, I had at some point chosen this guy:

An especially squat, low kv motor, perfect for squeezing into the tiny 4" u-channel frame. 

But everything changed when the fire nation attacked the motor went on backorder.

I was forced to look beyond Ye' Old Hobbyking, and found a cheaper, dare I say, better option:

Even with expedited shipping, the SDSHobby motor lends itself to be a good $20 cheaper than the Hobbyking equivalent, the only downside from ordering from SDSHobby being their rather small selection of EV-sized motors.

2) The controller with the infinite heatsink

After eating through a controller, and being too lazy to replace the dead FETs, I opted to avoid yet another headache by heatsinking the controller to the chassis.

Some fresh thermal grease, three holes, and some cap screws later, a happier 'troller was born.
Even on especially hot days, I've yet to find the area around the FETs go more than 5°C above ambient. 

3) It has a new caddy. 

Structural Hot Glue

Made entirely out of mystery plastic polypropylene and a bit of polycarb from MITERS. The key switch was also moved to the outer face of the port panel to accommodate for the larger motor.