All posts by drew

Braun Type 5417 Hair Trimmer Repair

I keep my facial hair like I keep the lawn – I let it grow naturally (on its own), then trim it down every week or so and clean up the edges every other time. I do so with an electric lawnmower; not battery-powered, because I don’t mind the inconvenience of a power cord tether and I don’t want to have to replace another rechargeable battery every few years. Wait, I started this post to talk about my hair trimmer…

The Braun 5417 “cruZer6 beard&head” hair trimmer has been running well for me over the past 7+ years I think I have had it. The NiMH battery stopped holding a charge, unfortunately. Like anything I own that has stopped working correctly, I opened it up to investigate, knowing full-well that I was probably just going to replace the batteries (I have done this with countless electric toothbrushes over the years). I was impressed with the build quality, and the gasket design to keep the electronics ingress-protected; that attention to detail is likely why it has lasted so long on its own. The gasket is a molded-rubber concave profile in the lid that provides a very satisfying fit, and is secured with six ramped securing tabs that are just perfectly aligned; some high quality plastics engineering went into this electronics enclosure. There is even an expanded-PTFE breather port to equalize pressure differentials due to heat dissipation!

I cut the tabs off the old batteries and removed them, then sanded the ends of some EBL 1100-mAh low-self-discharge NiMH AAA cells and soldered them in place. I hit the power button, and… it just blinked the red LED for 5 seconds.Hmmm… maybe it just needs to be charged. Nope! After repeated charging cycles until the internal timer cutoff, it still did the same thing. I desoldered the batteries, discharged them, and put them back in to charge again; afterwards, the battery voltage confirmed that the trimmer’s circuitry is charging the batteries just fine, it is just refusing to operate!

The mistake I made was just throwing out the original batteries, because now I have no idea what is wrong and cannot test if it still operates correctly with them re-installed. Most likely, the internal battery health detection circuitry is tuned to the original batteries’ performance, and the new batteries’ low internal resistance and longer charge-profile is being rejected by the firmware. But… what if it is actually something more nefarious?

Was my modification being defeated, maybe?  I was suspicious of two small ceramic, non-conductive (potentially ferrite) beads inserted into the plastic molding (under the motor wires seen in the picture), but I’m still not sure what they are for. One theory might be a kill-switch in the microcontroller programming somehow related to disassembly; if that’s the case, then I am impressed with the level of evil effort they put into keeping the life-cycle of this product down! If not, then I honestly have no clue what they are supposed to be there for; one contacts a single ceramic capacitor (C2, maybe it is supposed to damage that component on removal?) and the other is centered on three test pads (TP17, TP18, and TP20, maybe that acts as an air-gap resonator between two pads and is coupled to the third pad for removal detection?). I want to know, but I also want to put this back together and give myself a haircut.

Whatever the case, the trimmer is in good condition since I keep it clean and lubricated, so I just located the motor drive transistor, and ran some 32-AWG magnetwire leads to a slide switch that I mounted to the outside. Now I just use a different button to operate it, and I can move on with my shorn life. :P

Desktop Speaker Mounting

Problem: Kim’s desk has an open back where her desktop speakers are placed, and they keep falling off the desk. Solution: mount them higher up off the desk, on a section of perforated metal. But first, I needed to modify the speaker cases with some mounting hardware.

Various stage of completion

I first superglued some #10-24 nuts to the top of two of the speaker case’s clamshell boss screw holes (to keep them in place), then heat them with my hot air soldering station at 200°C and pushed them into the melted plastic. This created some secure embedded threading to screw a #10-24 bolt into, through the perforated metal sections.

Mounted, quick and crooked


I began this project with the intention of creating a Theremin for my Mom, who has also been fascinated by the instrument but never had one. I have seen a lot of designs ranging from very simple to very complex, but I wanted to make something something… different. I intended to approach this project with a structured mindset in order to test my engineering abilities to follow through on a  design from inception to completion.

The final product – the Theremean!

Concept: I wanted a straightforward design with off-the-shelf components and easily-fabricated sub-assemblies, a controlled BOM with a minimum number of vendors and short lead-times. I settled on making a modified version of the Open.Theremin.Uno, in my own plastic case and using a custom PCB with my own design flare. I designed in all the standard/extra features: volume control, waveform selection, a calibrate button, power LED, calibrate LED, CV output, MIDI output, and an internal speaker tied to a switched headphone/line output. I decided to power the unit with a shielded (so it doesn’t interfere with the antennae) line power plug connected to an internal DC power supply module. I used banana plugs to make the antennae easily removable, and, finally, added the unique feature of a built-in distortion output stage, which inspired the puntastic name of Theremean!

Guts Shot

BOM: The Bill of Materials below shows all of the components that went into the final build (but not any tweaks that were made post-production). I broke the cost-per-unit down into 1/10/100 quantities to show how much it might cost if I had chosen to build these in a larger quantity; I ended up building 3 units at a cost of around $85/ea, knowing that I could build 100 units at a noticeably lower cost of $58/ea. These numbers are just for reference, though, because it does not account for any capital costs (equipment, solder paste mask), labor (I like to value my time at around $0.00/hr for personal projects; I’m doing this for fun, after all), design time, troubleshooting time, extra parts, electricity, lack of sleep, and anything else I can’t remember (due to lack of sleep?).

ManufacturerManufacturer Part NumberVendorVendor Part NumberDescriptionQuantityCost @ 1Cost @ 10Cost @ 100
PolycaseJB-35R*0000Instrument Case 5.00 x 3.80 x 1.50 in1.00$7.54$6.25$4.97
PolycaseSCREW-MBR-100PCB Mounting screws4.00$0.04$0.04$0.04
*OSH ParkTheremean V1Blank PCB - Custom Design1.00$15.59$9.37$9.37
K&S Precision Metals103McMaster-Carr7237K15Antenna Metal2.00$1.01$1.01$1.01
VishayVJ0805G106KXQTW1BCMouser77-VJ0805G106KXQTBCMultilayer Ceramic Capacitors MLCC - SMD/SMT 0805 10uF 10volts X5R 10%2.00$0.10$0.10$0.07
KemetC0805C103K5RACTUMouser80-C0805C103K5RMultilayer Ceramic Capacitors MLCC - SMD/SMT 50volts 10000pF X7R 10%3.00$0.10$0.02$0.01
KemetC0805C473K5RACTUMouser80-C0805C473K5RMultilayer Ceramic Capacitors MLCC - SMD/SMT 50volts 47000pF X7R 10%1.00$0.10$0.03$0.02
KemetC0805C682K5RACTUMouser80-C0805C682K5RMultilayer Ceramic Capacitors MLCC - SMD/SMT 50volts 6800pF X7R 10%1.00$0.10$0.04$0.03
VishayVJ0805A470GXACW1BCMouser77-VJ0805A470GXACBCMultilayer Ceramic Capacitors MLCC - SMD/SMT 0805 47pF 50volts C0G 2%2.00$0.10$0.10$0.03
MurataGRM2165C1H471JA01JMouser81-GRM215C1H471JA01JMultilayer Ceramic Capacitors MLCC - SMD/SMT 0805 470pF 50volts C0G 5%1.00$0.19$0.08$0.05
MurataGRM2165C1H331JA01DMouser81-GRM40C331J50DMultilayer Ceramic Capacitors MLCC - SMD/SMT 0805 330pF 50volts C0G 5%2.00$0.18$0.07$0.04
VishayCRCW08052K20JNEAMouser71-CRCW08052K20JNEAThick Film Resistors - SMD 1/8watt 2.2Kohms 5%1.00$0.10$0.04$0.02
VishayCRCW08051M00JNEAMouser71-CRCW0805J-1M-E3Thick Film Resistors - SMD 1/8watt 1Mohms 5% 200ppm4.00$0.10$0.04$0.02
VishayCRCW0805470RJNEAMouser71-CRCW0805J-470-E3Thick Film Resistors - SMD 1/8watt 470ohms 5% 200ppm2.00$0.10$0.04$0.02
VishayCRCW0805330RJNEAMouser71-CRCW0805J-330-E3Thick Film Resistors - SMD 1/8watt 330ohms 5% 200ppm7.00$0.10$0.04$0.02
Molex15-91-2060Mouser538-15-91-2060Headers & Wire Housings HDR DUAL SMT 6P1.00$0.43$0.32$0.28
Molex22-15-2066Mouser538-22-15-2066Headers & Wire Housings 6P RT ANGL PCB RECEP1.00$0.73$0.55$0.48
Molex22-15-2026Mouser538-22-15-2026Headers & Wire Housings 2.54MM BOARD CONN RA 2 CKT Tin1.00$0.26$0.18$0.15
Schurter3404.2416.11Mouser693-3404.2416.11Surface Mount Fuses UMZ 250 FUSE WITH HOLDER 1A T1.00$1.41$1.41$1.17
EPCOS / TDKB72650M301K72Mouser871-B72650M301K72Varistors 300V 400A 45pF Varistor1.00$1.00$0.76$0.42
Texas InstrumentsRC4558PWMouser595-RC4558PWOperational Amplifiers - Op Amps Dual General-Purpose Op Amp2.00$0.39$0.27$0.12
Lite-OnLTL2R3KGD-EMMouser859-LTL2R3KGD-EMStandard LEDs - Through Hole Thru-Hole Lamp 5mm Grn 571nm 30Deg1.00$0.08$0.08$0.06
Lite-OnLTL2R3KYD-EMMouser859-LTL2R3KYD-EMStandard LEDs - Through Hole Thru-Hole Lamp 5mm Ylw 592nm 30deg1.00$0.08$0.08$0.06
BournsPTL45-10R1-203B2Mouser652-PTL45-10R1-203B2Slide Potentiometers 20Kohms Travel=45mm Center Detent3.00$2.30$1.81$1.60
ApemMHPS2273NMouser642-MHPS2273NPushbutton Switches Momentary key DP1.00$0.83$0.83$0.71
ApemMH12Mouser642-MH12Switch Bezels / Switch Caps TALL SQ BLACK CAP1.00$0.19$0.19$0.18
KyconKCDX-5S-NMouser806-KCDX-5S-NCircular DIN Connectors 5P R/A PCB NON SHLD 10mm CIRC DIN RECPT1.00$1.11$1.11$0.77
Switchcraft35RASMT4BHNTRXMouser502-35RASMT4BHNTRXPhone Connectors SMT 3.5MM PHONE JACK1.00$0.69$0.68$0.65
Kobiconn174-R819B-EXMouser174-R819B-EXTest Plugs & Test Jacks L 1.88" 10A BLACK2.00$1.20$0.99$0.90
Cinch Connectivity Solutions108-0903-001Mouser530-108-0903-1Test Plugs & Test Jacks BANANA JACK BLACK BU-31602-02.00$0.52$0.47$0.41
Heyco1137Mouser836-1137Cable Mounting & Accessories SR 5P3-4 BLACK1.00$0.13$0.13$0.09
3MSJ-5003 (BLACK)Mouser517-SJ-5003BKMounting Hardware SMALL HEMISPHERE BLK 56 PER PAD4.00$0.11$0.06$0.06
Volex17740 10 B1Mouser686-17740AC Power Cords 18AWG PLUG-SVTS 6FT 7IN (2.0m) BLACK1.00$5.93$5.93$5.19
AVXTPSD337M006R0070Mouser581-TPSD337M006R0070Tantalum Capacitors - Solid SMD 6.3V 330uF 20% Tol. 70 ESR2.00$1.18$1.18$0.97
VishayCRCW080510K0JNEAMouser71-CRCW0805J-10K-E3Thick Film Resistors - SMD 1/8watt 10Kohms 5% 200ppm8.00$0.10$0.04$0.02
VishayCRCW0805100KJNEAMouser71-CRCW0805J-100K-E3Thick Film Resistors - SMD 1/8watt 100Kohms 200ppm2.00$0.10$0.04$0.02
VishayCRCW08054M70JNEAMouser71-CRCW08054M70JNEAThick Film Resistors - SMD 1/8watt 4.7Mohms 5%4.00$0.10$0.04$0.02
ToshibaTC7WHU04FUTE12LFMouser757-TC7WHU04FUTE12LFInverters x34 INVERTER(UNBUFF)3.00$0.43$0.33$0.20
KemetC0805C104K5RACTUMouser80-C0805C104K5RMultilayer Ceramic Capacitors MLCC - SMD/SMT 50volts 0.1uF X7R 10%14.00$0.03$0.02$0.01
MurataGRM2165C1H131JA01DMouser81-GRM215C1H131JA01DMultilayer Ceramic Capacitors MLCC - SMD/SMT 0805 130pF 50volts C0G 5%2.00$0.11$0.05$0.03
VishayVJ0805A180GXACW1BCMouser77-VJ0805A180GXACBCMultilayer Ceramic Capacitors MLCC - SMD/SMT 0805 18pF 50volts C0G 2%6.00$0.10$0.04$0.02
RECOMRAC02-05SCMouser919-RAC02-05SCAC/DC Power Modules CONV AC/DC 2W 80-264VIN 05VOUT1.00$12.78$12.60$11.11
AtmelATMEGA328P-AUMouser556-ATMEGA328P-AU8-bit Microcontrollers - MCU 32KB In-system Flash 20MHz 1.8V-5.5V1.00$3.43$3.02$2.27
MurataTZB4P300AA10R00Mouser81-TZB4P300AA10R00Trimmer / Variable Capacitors 4mm 30pF2.00$0.91$0.65$0.57
ABRACONABMM2-16.000MHZ-E2-TMouser815-ABMM2-16-E2TCrystals +/-20PPM 16MHz1.00$1.16$1.02$0.65
ABRACONABMM2-8.000MHZ-E2-TMouser815-ABMM2-8-E2TCrystals 8MHz1.00$0.93$0.82$0.65
ABRACONABMM2-7.3728MHz-E2-TMouser815-ABMM2-7.3-E2-TCrystals 7.3728MHz, 18pF 20ppm1.00$0.93$0.82$0.68
MicrochipMCP4921-E/SNMouser579-MCP4921-E/SNDigital to Analog Converters - DAC Sgl 12-bit SPI int1.00$2.08$1.97$1.49
ON SemiconductorMC74AC74DR2GMouser863-MC74AC74DR2GFlip Flops 2-6V CMOS Dual D-Type Pos. Edge1.00$0.45$0.33$0.21
Texas InstrumentsLM358DMouser595-LM358DOperational Amplifiers - Op Amps Dual Linear1.00$0.44$0.30$0.14
Texas InstrumentsCD4060BM96Mouser595-CD4060BM96Counter ICs CMOS 14-St Ripple- Carry Binary2.00$0.44$0.34$0.18
TDKNL453232T-102J-PFMouser810-NL453232T-102JPFFixed Inductors 1K UH 5%2.00$0.49$0.35$0.23

Case: The case was a standard plastic case, the JB-35R*0000 from Polycase, which I hand-machined with various holes using step-bits and blades/files. The unit in the pictures here was my first unit, with some extra “oops” holes and access to the programming header. For a larger quantity of builds, I would have paid the ~$100 setup fee to have Polycase machine these for me and add fancy graphic overlays. Instead, I created the design in Inkscape as an overlay of the manufacturer’s dimensioned drawing, and printed it out on large white label stock. After attaching it to the case, I used the black areas as a cutting template.

Front Panel Layout

PCB: While I based the design on the Open.Theremin.Uno, I made some PCB BOM changes to optimize the components and layout. I also used this as a moment to try my hand at making a board with 0805 passives; while I have experience designing as small as 0402 passives into PCBAs for work, we have those assembled professionally with pick-and-place, and I have never tried something smaller than 1206 for hand-placed SMT work. It turned out fine, and I could have made the layout much tighter if I had wanted to; in fact, in hindsight it looks like I subconsciously left as much spacing as I would have for 1206. I had the PCBs made by the always-awesome OSH Park, and I had a solder paste stencil made by OSH Stencils. Theremean KiCad Archive for download, if you’re into that kind of thing.

KiCad Schematic
KiCad Rendering – Front
KiCad Rendering – Back

Other Notes:The antennae were made from 5/32″ OD (0.128″ ID) aluminum tubes, hand-shaped and soldered to banana plugs, with some adhesive heatshrink for protection and looks. The mating blue banana jacks were used because I had them on hand already, and I used slider potentiometers with LEDs just to give it some color. I used the original Open.Theremin.Uno Arduino code without any memorable issues; I may have added a few tweaks, I can’t remember.

The distortion effect gave me some trouble; I based it on some guitar effects designs I found online, but after the build I discovered some items that needed to be changed, which are noted on the schematic.

I had some trouble with the original tank capacitor values (probably since they were selected for a different PCB design with its own internal capacitances), so I had to solder in some other values in parallel to give me the capacitance I needed to calibrate the unit correctly. An improvement in the future would be to add a digital capacitor IC (a switched capacitor bank, essentially) to allow the calibration to be automatic, because it was rather finicky.

I am happy with the final product. I kept the first one, gave one to my Mom, and gave one to my friend Sean.

UPDATE: Since the completion of this project, an Open.Theremin.V3 has been released with some newer features; most importantly, the automatic calibration that I wanted to include. But they did it with a tuned diode, instead of a switched capacitor bank (digital capacitor) like I proposed.

Dealing with DC Motor Noise

I have an inexpensive DC motor as part of a project I am doing for work; since it is a proprietary device, I cannot give any more information than is provided here. Suffice to say, it is a portable device with a Li-Ion battery pack and a custom PCB I designed with a MAX1758 Li-Ion charger IC and a baseline Microchip MCU (coded in PIC Assembly – yay!) that controls both an electronic lamp ballast and a small brushed DC motor. To help prevent noise/transients from affecting different parts of the circuit, everything gets its own dedicated power supply with some switching DC regulator ICs built into the PCB; unfortunately, that wasn’t enough!

My first problem was that the MCU would reset the second I tried to turn on the lamp ballast, which is a type of device that I deal with on a regular basis at work for driving many different kinds of mercury lamps – it is known for having an enormous inrush current, up to 5 times the steady-state current draw for the first 100ms of operation. This is due to the nature of the ballast, which requires a 300-700+ VAC “strike” in order to arc the gases inside the lamp; internally, this is achieved with a reactive circuit which resonates until a voltage sufficient enough to arc the gases occurs across the lamp cathodes. This inrush current creates a reactive voltage transient that can affect other parts of the circuit, and a quick and easy way to kill that transient is with a diode so that a transient of sufficient voltage to exceed the diode’s reverse breakdown voltage will be shunted through it and dissipated as heat. I had a few 1N4007 diodes on hand, but that’s actually a poor choice since it has a relatively high Vbreakdown – a better choice is the diode species known as a TVS diode. Of course, as mentioned on that Wikipedia page, there are other devices to choose from and the ability to know what to use where is something that can only come from experience. In this case, the 1N4007 helped enough to solve the problem for now, but a redesign will be required to achieve better long-term performance.

The next problem to come up was that the MCU would randomly reset after an indeterminate period of time of lamp/ballast operation. I took out our new oscilloscope and scoped out the voltage across the terminals of the 1.8VDC motor during operation:

2013-01-29 - DC Motor Noise - Before

Uh-Oh! +31V and -19V transients!?!? Well, that’s the nature of the beast and also the reason your computer fans use brushless DC motors. A quick search online turned up this robot-enthusiast-oriented wiki page that offered up some suggestions; with just the two capacitor method using some spare 0.1uF film caps I had around, the situation was cleaned up and I now faced a much less dire situation:

2013-01-29 - DC Motor Noise - After (2 cap)

Problem solved! The three capacitor method even helped a bit more, but I do not have a screen cap for that. I do have some candid before/after pictures, however!


I am a College Graduate!

On Saturday, May 19th, 2012, I received a Diploma for my Bachelors of Science in Electrical Engineering Physics Degree from the University of Texas at Brownsville. It was a lot of hard work and a lot of interesting and fascinating topics, and now I am ready to move on to the working world and gain some industry experience! :D

DIY Bubble Etching Tank

I finally built a simple bubble etching tank; I’ve seen people with them all over the place in the past, but I just haven’t had the desire to put one together until today. In the past, I’ve been etching my PCBs by just filling a pyrex tray with etchant, dropping the masked board in and manually agitating with a foam brush.

This new piece of equipment has these advantages:

  1. Less etchant required; the vertical tank takes up less volume and thus it is more space efficient.
  2. Air agitation; the bubbles oxidize the etchant, which allows it to more effectively etch away copper. It also creates turbulence in the liquid that helps etch very small areas.
  3. Less manual interaction; the acid in the etchant is toxic stuff, and I really need to be more careful than I have been in the past.

The tank is made from some pieces of spare acrylic sheet I had, which are put together with acrylic cement and the outsides of the joints are reinforced with hot glue (just in case). I had an old aquarium air pump around and carefully hot-glued the end of the tube across the bottom of the tank through some holes drilled into the edges; I then carefully poked holes into the tube using some very small-diameter drill bits. Of course, I tested it with water before trying it with the cupric chloride etchant seen in the photos. I found that there were a lot of droplets splashing out of the tank, so I made a small lid with a spare IC storage tube. The whole construction took a total of two hours.

UPDATE: I put together a small, adjustable acrylic rig to top the tank and hold the part being etched in place.

The green top is a piece of junk acrylic sheet that I found and drilled a series of holes into. The sticks are 1/8″ squared acrylic rods pieced into an edge and covered in double-sided tape (for some extra tackiness); the ends that meet the green top piece are sanded down to round pegs that compression-fit into the holes, which allows the spacing to be adjusted for any size board that may fit in the tank. Small holes are drilled in the pegs so that small screws can be set as an added safety measure should the weight of the board cause the peg to slip, but I’ve found that it isn’t really necessary (maybe for larger boards). In fact, the actual problem is that even the thicker (3.175mm) boards I am etching for my microwave antenna array project are able to fall off the holding rods and down to the bottom of the tank if I am not careful.

So far, the whole setup seems to work well for both developing photoresist (why didn’t I think of that initially?!) and etching boards. The only complaint I have right now is the uneven bubble cover; if the board is not moved around occasionally, the parts in the path of the heavier bubble streams etch faster than the less-covered areas. Etch times for cupric chloride etchant seem to be about 15 minutes for 1/2-oz copper and up to 90 minutes for 2-oz copper (ugh).

Fundamentals of Engineering (FE) Exam

Today was the Fundamentals of Engineering exam for me; I had to wake up at 5am and drive an hour to Edinburg, Texas. What is the FE? In short, it is an 8-hour exam that is the start of my path toward becoming a licensed Professional Engineer (complete with a stylish “P.E.” lastname-hat).

I have been preparing off and on for about 6 months now, and I think I did well; In fact, I am almost certain that I did well enough to pass. That’s all that matters, anyway, because when I get my results in 8-10 weeks, that’s pretty much the only information I will receive; whether or not I passed. Well, if I fail I will get a diagnostic report, but I really don’t think that I failed. :D

It was very challenging and exhausting; my neck hurts, but I am glad I decided to bring a pillow to sit on because I think it really made a big difference in my comfort level. The exam is split into two 4-hour sections, the first of which is a 120-question general exam that everyone takes and it covers a broad range of topics. I wish I had spent more time preparing for Thermodynamics, Chemistry, and Fluid Dynamics (a subject I don’t actually understand the reason for having in the general section), but I think the provided reference material helped me do a little better in those areas than I otherwise would have been able to do. The second section is chosen at registration-time by the test-taker to focus on a specific type of engineering (Electrical Engineering, in my case), and I found it to be much more easy-going since I was comfortable with 95% of the topics on the test (versus about 65% of the morning exam). There were only 60 questions for the afternoon section, but they were definitely more involved and some of them required some real multi-level thinking to solve (I’m looking at you, computer architecture questions!).

Like I said, though; I’m pretty confident that I did well enough to pass.

EDIT: I PASSED THE FE EXAM! Now I just need to apply for my Engineer in Training (EIT) License next week! :D