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...


Monday, December 16, 2013

One Bit ADC and a (Not) Wheelbarrow Shaped Object

With the semester winding down, and final project(s) nearing completion, the coil was revamped and the project part of my final project was made.

Mmm remounted IGBTs
The goal was to have a working analog interrupter which would take an analog signal, such as the one coming out of an mp3 player, and then be able to play it through a Tesla coil.

The block diagram is the following:

Signal -> Amplification -> Triggering -> Poopy sparks

This led me to use an LM358 and 555 timer due to their availability. A 74HC14 was added to buffer the output of the 555 to preserve waveform integrity.

Both channels of the audio signal are sent through an inverting adder and then to a monostable 555. The trigger voltage is set using R5 and the gain of the opamp can be adjusted using R3. The output of the 555 is then buffered by the inverter and sent to the opto-out. The interrupter is optically coupled to the coil to avoid the potential ground loop. Unused inputs are grounded and decoupling caps are added appropriately. 


At this point, I was running out of time, so I quickly breadboarded the circuit which also made the system incredibly noise prone. Oops :P

Input and Output Waveforms Lookin' Legit.
Lulz.



It even did the interrupting thing!

Further testing involved hooking up a dinky little speaker to the output to test if audio came out intelligibly. 
The results:



It's important to note that because this is, for all intents and purposes, a one-bit ADC, the audio will be pretty terrible.

Nevertheless, it seemed to work on the revamped coil.

Modifications: new secondary, primary,heatsinking, and rectifier diodes.


One concern was that the bridge was blowing prematurely due to the rectifier diodes failing - perfectly valid given that they were rated for only 4A (MUR460). They were then replaced with complete overkill: some minibrick diodes Bayley bought a while ago.

Rate for 96A at 600V. Yummy. 
The assumption was that the diodes were failing short due to transients, sending X amps of 60Hz AC to V+ and V- of the inverter. Eww. Another useful feature of these diodes is that when your bridge blows, the diodes won't.

Power testing also revealed that the new bridge is now capable of doing up to 75% duty cycle.

Heatsinking was improved by bottom mounting the IGBTs and increasing thermal mass substantially.

A squashier primary was wound using the old chassis as a coil winding jig. A power drill was used to speed up the unbearable process of winding 1330 turns of 36 gauge wire.

Only took five tries...

The final secondary dimensions came out to 7" long, 3.5" OD compared to the old 10", 2.4"OD. The resonant frequency also sank from 300kHz to ~150kHz making it suitable for brick coil use. (Whether it'll stay a coil is another question).
Finished!
Unfortunately, the demo involved swapping out the secondary for a smaller one to reduce coupling - in this configuration, the coil had a tendency to be quite hot and burn-y.

For more details on the driver, you can view the project proposal here (Dropbox link).

Other news:

IT FINALLY HAS ANOTHER WHEEL

After relentlessly avoiding HSMXpress, I finally got around to generating the G-code to mill out the fork of my electric scooter on the MITERS CNC mill. 

And while HSMXpress seems to be incapable of informing the user why it failed to generate a toolpath, it can do this:



Totally worth it. So, sit back, relax, and listen to the elevator music courtesy of youtube's audio edit function.

And IRL:




Front assembly sans mounting screws, rear plate and brake. 
I opted to use a caliper brake as it requires a single mounting point on the fork and a shorter pull in terms of brake lever travel.

No longer a sad wheelbarrow!



Sunday, November 17, 2013

EPIC OCTOBER-NOVEMBER PROJECT DUMP

I really ought to start documenting projects as I go along. 

Broken down into three parts, yo.

1. Lasers!

Once on my bucket list, this blue laser pointer was what constituted an overnight build-a-thon at MITERS. In my laser-induced, sleep-deprived stupor, I forgot to document much of the build, although, there wasn't much to do to begin with.



Diode: 445nm rated for 200mW
Power: two lithium cells (7.2V nominal)
Driver: ebay diode driver (good for stuffing into small spaces)

Given that the laser diode has a TO-18 package, I had to make and press-fit the heatsink into a brass adapter ring to fit in the lens assembly. Some patience on the lathe and a bit of sandpaper made the task at hand much easier. This was by far the hardest task.

The shaft was machined out of some aluminum stock and the end cap is mounted to the body with a set screw that isn't actually a set screw for convenience's sake. The shaft was press fit into the threaded lens/diode assembly.


Setting the power output of the diode driver:

I assembled a dummy load from a blue LED and a 10 ohm resistor and then measured the voltage drop across the resistor, which gave me the current output. The diode is set to run comfortably at 40mA to give me a 40mW output. I later adjusted this down to 8mW since I found the output even at 40mA too bright to use in any useful setting (powerpoint presentations, pointing at stuff safely).

*NOTE: the TTL pin has to be tied to Vcc in order for the potentiometer to function; otherwise, the diode driver will only give output at 0mA and 500mA and nothing in between. Also, the potentiometer is continuous, so be wary of adjusting the thing once it's soldered to the diode.

Thanks to Bayley Wang for the parts/instructions.

Diagram of the construction:

One of the more interesting aspects of having a laser of such a funny wavelength is that you can cause things to fluoresce  in the visible spectrum.

blue
suddenly: violet!
It's rather unfortunate that photos can't do justice to its wonderful luminescence.

2. A wild speaker appears!



Yet another school project =_____=. Groups were given some magnets, washers, and bolts. We were then given the directive to build a functional speaker. Promising, I know.

Major difficulties: quantitative analysis of such a rudimentary system is essentially futile. I tried anyway. Kinda.

The requisite flat frequency response was to occur from 100Hz to 20kHz, which led me to try and get a mechanical resonance at slightly 100Hz. This would allow me to add a port tuned to the appropriate frequency to extend the bass range while keeping the high frequency response that I wanted.

In addition to having a flat response, this thing had to be reasonably loud; given that the speaker would have an impedance matched to the source, this meant I had a fixed length of wire: increasing the inductance would allow for more force to be applied to the coil as indicated by the Lorentz Force Law. This meant keeping the coil reasonably short and fat to increase inductance, as well as double layering the coil.

The tradeoff was that at a higher frequencies, the reactance could get as high as 4 ohms, however, that would only result in a 3% reduction in power, which was reasonable.

The choice for enclosure was acrylic due to its high compressive yield strength and ease of manufacture (laser cutter access). It also looks pretty.



Box volume was limited by the quantity of acrylic I had at hand - in good speaker design, the volume is supposed to be matched to the volume of air that the speaker displaces, its resonant frequency, as well as its mechanical and electrical Q. Again, quantities that are hard to measure. I ended up doing the thing I shouldn't do, which is stuff the box full of cotton to increase its apparent volume and the remove it until it seemed to sound best. Miraculously, the box without any additions seemed to work.

The port was also hand tuned to aroud 90Hz, which involved using an exacto knife to slowly cut away at its length (it ended up being ~1.2" in length).

Magnet arrangement was chosen mainly to achieve symmetry, but at the same time, maintain the flux density required to give the speaker enough output.

If there were one thing I'd do over in this speaker, it would be getting stronger magnets and reducing the inductance of the voice coil to maintain good output, but keep a nice high frequency response.

Magnets...!?
Lastly, the membrane, which provides the restorative force to the moving cone (made of a manila folder, no less),  was provide by some polyurethane sheet stretched and then hot glued against the frame of the speaker. This formed some semblance of a surround. The thought behind using such a lightweight material is to reduce the apparent mass that the coil has to move, which would otherwise attenuate higher frequencies.

The end result:



3. More coil things!

As part of a final project, I was granted funding for another coil. The nuance is that I'll have to make an analog interrupter that goes with it.

This will involve a revamp of Derpy coil into a separate driver and bridge to keep board costs down.

The interrupter is just a VCO made out of a 555 timer and an op amp fed with the audio. Nothing too fancy.

Current iteration of the driver
OCD has been added in the schematic, but has yet to be laid out. Just think of it as a UD, but without the totem pole driver.

More to come...









Saturday, October 12, 2013

Beepy things...because school.

As part of the course ES-93-5, "Music and the Art of Engineering", I am required to build a lot of things on breadboards.

I. Hate. Breadboards.

Or rather, I hate the fact that whatever I build on them usually requires n times more effort than what I'd put into say, etching a board, and that the breadboarded project ends up being a waste of time because at the end of the day, I have a breadboard.

That isn't to say breadboards aren't good for anything. It's just that they're terrible. 

The current assignment requires the construction of the following circuit (or something similar; the bare minimum does not require so many oscillators):


Broken down, this is a a bunch of NAND gate (with hysteresis) oscillators feeding into a power amp, specifically, an LM386, which then feeds audio to a speaker. 

Now, I find it quite quaint that my latest "project" is essentially a repetition of my first "legit" EE project, namely, a 555 timer organ I built in the summer of 2012. As someone who had a lot of trouble finding a good explanation as to how these worked, I see it fitting that I write one here. 

The concept behind signal production remains the same in both the NAND gate oscillator and the 555 timer organ of yonder: the frequency of the signal is determined by the time constant of each RC circuit formed from the output resistor and the accompanying capacitor. 

Let's look at this closely.

JP1 consists of a switch between one of the NAND gate inputs and "high" (9V), and R12 is a pulldown resistor (sets input "2" to 0V when there is no voltage applied through the switch).

Potentiometer R2, R11, and C4 consist of an RC circuit that determines the frequency of the oscillations. R26 is the input resistor that eventually feeds into the summing op-amp used to drive the speaker.

When the switch is open, input 2 is OFF, making input 3 ON. This is regardless of the value of input 1. When input 2 is ON, the state of input 1 can then alter the output of the NAND gate.

While the output is ON and there is no induced oscillation, the RC circuit charges up, but does not discharge, and it assumes steady state behavior. 

However, when input 2 is ON, the RC circuit will charge up, causing the capacitor's voltage to appear at input 1. This causes the NAND gate to change its output to OFF. It's during this off period that the RC circuit then discharges (all the while, input 2 is still ON, and input 1 appears ON for now). Once the voltage across the cap goes below the threshold voltage, the output will then go to an OFF state. 

http://upload.wikimedia.org/wikipedia/commons/3/31/Opamprelaxationoscillator.svg
One half of each cycle consists of the charging and discharge of this RC circuit (illustrated by the red waveform above). 

Thanks to the magic of hysteresis, the trigger voltage at which the NAND gate decides the voltage is ON or OFF is roughly that after 1 time constant. 

This allows us to specify the frequency further as now, the period can be defined as two time constants.

with f = 1/T, f = 1/(2RC)

This then allows us to "tune" the frequency of each oscillator with values of R and C to acquire a specific frequency, thus explaining why a potentiometer is added to the resistance of the RC circuit. 

Here is a spreadsheet of the approximate R values for a 'C' scale:


You can also substitute your own values of C. 

The (semi) finished product (note the lack of battery connectors)

Yay, beepy things!






Tuesday, September 24, 2013

Slightly less imaginary scooter



Riding my gallant steed




U-channel: check.
Motor: check.
Wheels: check.
Aluminum plate: check.

Thanks to the magic of oxyclean caffeine, most of bluescooter (yes, it has a name now), was done in the lead up to Maker Faire New York. Sadly, it wasn't completed in time for the faire due to a lack of functional waterjets, but the progress so far deserves a post of its own.

Among the first tasks completed was the fitting of the motor hardware. Since I was using a motor with a 6mm OD shaft and had an 8mm ID sprocket, I bought a bronze bushing to fill the gap.

But, as with the best laid plans of mice and men, it required some love on the lathe.

Something's telling me that I should've used a smaller chuck.
The motor shaft was then milled to accommodate the set screws, and the sprocket was slipped over the bushing to drill the hole that would let the set screw hit the mating surface of the motor. 

It turned out something like this:
Not too shabby...
Following no specific order thus far, I thought it'd be a good idea to get some work done on the chassis.
Then I realized I had to mill diagonals. Kids, don't mill diagonals. 

The process involved clamping a reference-specifically a nicely water-jetted octagon someone had left in the stock pile- against the bed of the mill and then resting the u-channel against it. The u-channel was then held in place with the magic of step clamps. 

yummy

Le result.
A few hours later, I ended up with a nearly done chassis. The only parts missing were the mounting holes for the motor, rear, caddy and fork.

Those horizontal dropouts <3
Motor mounting involved machining a set of standoffs, which were then drilled and tapped. The outer surface of the chassis was also countersunk for that extra hardcore effect.


Note: I had to mill off the top and bottom of the motor mount, leaving the motor secured by only two points. I have no idea how well this will fare in vehicular duty. There's still room for an extra standoff running from the opposite wall of the chassis, however, if need be.

In lieu of time, the aluminum rear caddy was ditched for some blue acrylic lying around at miters.













Notice the sad tip of one of the panels: this is in no way a permanent solution.

I finished up mounting all the holes and ended up with the shiny version of melonscooter's ass.

Horizontal dropout tensioners were added to prevent the chain from sagging too much and falling off. The fact that there's about 2mm of clearance between the frame and chain make this a vital addition.

Bored with the fact that I hadn't made much obvious progress, I took it upon myself to mount the fork, which made bluescooter look more like a scooter than a sad wheelbarrow.


I ended up using the same mounting hardware that came off of the razor A4 in order to avoid tapping the metric screws and machining a new mounting plate. I might end up having to mill off the sides of the plate that stick into the body cavity for space reasons, but for the meantime, it makes for a simple solution.

There was also the task of mounting the bottom cover, which would eventually play some part in keeping the batteries and motor controller from falling out.

18 holes yet to be countersunk

Anyway, it turned out pretty nice.



Next up:

Battery pack, motor controller, and fork assembly!



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...