Wednesday, December 17, 2014

SLEEPLESS (IN SEATTLE) LAYOUT AND DESIGN REVELATIONS

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

WHERE DID ALL THE TIME GO!?

No matter. 

IGBTs! IGBTs! IGBTs!

LOOK AT THESE IGBTs!



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.

Eagle'd:



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.

IN OTHER NEWS:

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:

http://www.hobbyking.com/hobbyking/store/__18179__Turnigy_Aerodrive_SK3_6354_215kv_Brushless_Outrunner_Motor.html

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:

http://www.sdshobby.com/emp-n-series-outrunner-brushless-motor-n6354200kv-p-2486.html

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. 


Fin.

Monday, April 28, 2014

Neglected blog is neglected

This blog is still alive! I'm just super hosed at the moment. Expect induction heater documentation sometime into the second week of May. Sorry, Charles >____<.

Saturday, March 8, 2014

Scooter Recap


After having a working scooter for nearly a week, I can conclude that, while definitely delayed, there was gratification.

Further, it's worth noting that after thoroughly testing said vehicle, I can accurately report some of its idiosyncrasies.

1) RPM limit

Using the sensorless jasontroller (350W yiyun yk85s) definitely has its benefits: it costs next to nothing, is very small, and is extremely easy to set up. However, as I discovered only after several motor cutouts, its commutation frequency is limited to 550Hz (electrical). Check out Charles' blog post for details. And while scooters with larger, lower kV motors may graze this limit, my spunky 280kv motor is well above it, eliciting many a drivetrain failure early on in its derpy little life. (Sounds like a job for custom motor controller  Hobbyking airplane ESC man!)

2) Controller modding is almost definitely required

350W out of the controller is boring. Heck, 500W was too. In fact, to get the acceleration to something usable on a day-to-day basis required that I decrease the shunt resistance with solder globs. Controller output currently sits at ~800W.

It's as easy as popping
open the controller...
Finding the shunt resistor
(in this case, a piece of wire)
And globbing on some solder. 

Note: for a slightly more legitimate solution, you can cut the piece of wire and solder in an SMD resistor on the traces on the bottom of the board.

3) Hot motor is hot

Among the many valuable skills an EV builder must have, being able to translate sketchy Hobbyking ratings to IRL ratings is necessary. As it stands, the current motor is rated for 1.5kW*. It's important to remember that this motor is meant for R/C plane duty, which has a significantly lower inertial load as compared to that of a vehicle. Further, the typical outrunner is exposed to much greater airflow when not mounted to the inside of a piece of u-channel.

*kiloWalruses

Le Result:

In the end, with a 10S2P pack, I ended up getting 4 miles of range (the distance between my dorm and MITERS) with an average speed of 14 mph.

After-trip charge revealed an effective capacity of 3.1Ah

These are quite reasonable numbers considering the route there was very hilly, and that my downhill speed was artificially limited by the commutation frequency and my rolling resistance (no throttle going downhill).

The average grade was found to be 0.2%, so my mileage wasn't too far off from what I'd get on a reasonably flat route.

If I were to stay with the same motor, I'd probably go for a lower voltage pack at a higher capacity (I can only utilize so many rpm), choose a lower gear ratio (currently 11:55), or just go for a lower kv motor.

It also turns out that it take less time to get to MITERS on the scooter than it does to train.

Yay!

And on that note, happy scootering!

Sunday, February 9, 2014

Pseudo-Solder Paste, Shiny Knobs, and Jason Whisperers

Roughly three quarters of the time it takes for a project to be completed falls into at least one of the following categories:

a) waiting for things to get shipped
b) waiting for funds to appear to buy materials

And while the prudent observer might point out that neither of these things would happen if I planned ahead of time, it's worth mentioning that b) is almost always the precursor to a), and b) is a struggle that I probably won't overcome until I get a real job. lol.

Anyway, all this waiting is what led me to delve slightly deeper into the world of hand-etched pcbs. Most notably, that thing where you tin your boards.

Done mainly to protect the copper from oxidizing, I was initially repulsed by the idea of having to spend hours pushing around a blob of solder on a board until I got a semi-acceptable layer on my traces and planes (inevitably causes n solder bridges to form). However, everything changed when the fire nation attacked I discovered this page.

The process entails covering your board with flux and grating solder over it, forming a pseudo-solder paste, which you then apply your iron to. 

It's magical.


(bunny music courtesy of the youtube video editor)

And so I spent the better part of an evening working on finishing the board and populating as much as I could of the tube amp in progress. Special thanks to Kramnik for giving me a pair of 9 pin tube sockets for the time being.

*sockets not pictured
Of course, this project wouldn't be complete with shiny knobs.

Definitely worth the $3 from Mouser
This weekend was then topped off with getting the long overdue scooter in a rideable state.

Subdued last time by a thought-to-be zorched motor controller, the ailment was remedied by none other than Charles, the Jason-Whisperer.

It simply took one well timed roll of the drive wheel to trick the no-stall detection on the Yiyun yk85s. Or what is academically known as wizard magic.

And while born from black magic, the scooter was a little disappointing on its maiden voyage due to a less than charged battery. (Hence the lack of video.)

Nevertheless, jankiness abounded as the inaugural ride involved more than a few zip ties.

Totally legit


The original bottom cover was a panel of acrylic that sat flush against the two legs of the u-channel, however,  I underestimated the depth of the battery pack with PET insulation, causing the cover to bulge. Luckily, I happened across some polyethylene scrap at MITERS (and by scrap I mean large and kind of melty piece). 

The lesser known geological formation, Mt. Plastic 
After two hours on the mill, I had a piece of specially machined Tupperware. The plastic was then secured to the bottom using the original drilled and tapped holes for the acrylic bottom cover.

Scooter Sans Brake
Now in scooter form!

All that's left is machining a rear end out of polycarbonate and solvent welding it together; I've since dropped the proposition of making the back out of aluminum due to the high cost/low benefit.

Oh, and the brake. Yeah.

Thursday, January 30, 2014

This Week on Things Done at Midnight...

I recently had a hankering for a pair of Superlux HD 681s, which are some of the best cans you can buy at the bag-of-rocks price-point (or, so the internet tells me).

But before getting into such shenanigans, I thought it'd be a good idea to have a decent amp to go along with them. I found among other designs, Pete Millet's "Starving Student" hybrid headphone amp, which, as its name implies, is meant for people like me. huehuehue.

Note: The potentiometer package is a placeholder as the real pot which will have wires that run to the front panel. 

Of course, the original Pete Millet design seems to have been so widely popular that the original tubes (19J6) are virtually gone from the marketplace, which helped spawn another version using the 12AU7 (The design I'm copying, which is available here).

I haven't been able to find any measurements for the 12AU7 variety, but the 19J6 variant has an impressively flat response, and the neverending head-fi thread about this object make this venture very promising.

Opting to do this on the classier side of things, I acquired a lacie hard drive case from James as the main casing.


The plan is to cut the thing to fit the depth of the PCB and then mount the board inside with some standoffs. Unfortunately, the case doesn't come with a slot for the PCB to slide in.  

The front and back panels are going to be lasercut - a decision based on my desire to avoid having to precisely drill out the corresponding holes for the power and volume knobs. It would also allow for the power indicator LEDs to nicely illuminate the interior of the amp. 

I realize that the hole for the rear power socket  is on the wrong side according to the countersunk holes. However, this won't matter since the countersinking will be done by hand after the basic shapes are cut out.

I've decided to add aluminum accents around the tubes to hid the edges of the tube socket holes.

I sourced most of my components from digikey to save on shipping, using mouser for the odd tandem potentiometer and a few knobs. The tube sockets are from ebay.

The total component cost came in at around $50 (~$70 if you count the enclosure and shipping),although you could very easily take off ~$10 by not buying fancy aluminum knobs and a two-pole rotary switch.

To be continued...

Sunday, January 19, 2014

Batteries, A Lack of Aluminum, and Mystery Boxes

Last time on ScooterQuest™(or rather, what I did during winter break), I finished assembling the 10S2P pack. 

HDPE on the work area helps prevent accidental shorts.

Recycled from two 6S2P packs floating around MITERS, it was originally wrapped in some forearm-sized heatshrink that was at one point cut in two and then rewrapped in electrical tape. Welp. 

Of course, the whole idea of having an uninsulated pack of LiFEPO4 cells crossed my mind well before I started, so I opted to heatshrink the thing in PET. 


The cheapest source being my preferred $0.99 beverage above. Note that the 20 oz. variety appears to be the perfect size for 2P packs. Further, starting with plastic that's already near diameter of your pack will yield the best results.

It's also important to heat the plastic evenly and to assume shrinkage at the edges by at least 1cm as to avoid gaps in your insulation. 

Following the advice of Charles, I made sure to route the balance leads on the side of the pack as to avoid a burny death. 

A wheel well-type object was folded then attached to the bottom panel of the scooter to keep debris from flying into the electronics. Given that it isn't a structural feature, it was made out of sheet aluminum and attached with screws to the bottom panel. 



Speaking of missing components, I quickly realized that I needed more aluminum to build the caddy assembly. 

Since the entire thing would have to be milled, I opted to save myself the trouble and do it on the CNC. This meant modeling the parts in solidworks.





The hella switch and battery connection have been integrated into the front panel for easy access. 

In other news, I recently came across this on kickstarter. 



Their instructable revealed the inner workings.

An ATtiny that turns on a few LEDs and plays noises when activated by a crude, but effective capacitive touch plate.

Oh, and it's powered by a USB wall charger with wires soldered to the AC prongs.

 ಠ_ಠ

Don't get me wrong: it's a fairly nice object, but there were a few key design qualms that kept me from purchasing said object:
  • Several box joints are used to keep the lid and bottom together, which, in the event that the joint fails, would cause the thing to plop out of its enclosure and expose an uninsulated AC line. 
  • It's too small to be a hanging lamp, yet too large to sit on a desk without taking up too much space.
  • It's too dim a light source to justify as a functional lamp
  • Aesthetically, the joint construction lends itself to having jagged lines. 
  • The silkscreen only looks good when the thing is on. 
  • For what's inside, $49.95 is ridiculous. 
And so, I spent the following evening sourcing parts and making a model in solidworks.


The question mark spaces will be filled with black or smoky acrylic. 

The current cube configuration is 3' to a side, making it a little bigger than a tree ornament (heck, it could probably be one too). 

Its purpose is to comfortably fit on a desk as an ornament providing a bit of extra light when needed.

To be continued...


DISASSEMBLING MOTORS, TINY BIKES, AND A SHAFT

Hello again! Project directions have shifted quite drastically since last post. While compiling the bill of materials for Tee-mobile, it b...