The Smell of Molten Projects in the Morning

Ed Nisley's Blog: Shop notes, electronics, firmware, machinery, 3D printing, laser cuttery, and curiosities. Contents: 100% human thinking, 0% AI slop.

Category: Electronics Workbench

Electrical & Electronic gadgets

  • Bafang Battery Charge Port: Internal Wiring

    Bafang Battery Charge Port: Internal Wiring

    Short-circuiting the Bafang battery’s charge port may have done anything from completely destroying the battery management circuit to just welding a brass nugget onto the port’s center pin. The main output to the bike motor remained functional, so my friend used it on rides over the next few days to reduce the charge level.

    Meanwhile, I peeked inside the undamaged battery on Mary’s bike:

    Bafang battery interior - overview
    Bafang battery interior – overview

    The battery pack is neatly shrink-wrapped and firmly glued into the plastic shell, with the battery management PCB on the other side of the battery. Some gentle prying suggests it will be difficult to disengage the adhesive, so getting the pack out will likely require cutting the blue wrap, extricating the cells as an unbound set, then cutting the blue wrap to release the wires.

    A closer look at the nose of the battery:

    Bafang battery interior - front
    Bafang battery interior – front

    The large red wire entering on the left comes from the motor connector, loops around the nose of the battery, and probably connects to the battery’s most positive terminal or, perhaps, to the corresponding BMS terminal.

    The medium black wire from the side contact of the coaxial jack (atop the pair of red wires) burrows under the battery and likely connects to the most negative battery terminal. This is the charger plug’s outer terminal.

    The small red wire from the center contact of the coaxial jack (between the medium black and red wires) goes to the charge indicator PCB in the nose of the battery. This is basically a push-to-test voltmeter with four LEDs indicating the charge state from about 40 V through 54 V. The small black wire from that PCB burrows under the battery on its way to the BMS.

    The medium red wire from the center contact goes to the BMS.

    There is no way to determine how much damage the short might have done, although the silicone-insulated wires should have survived momentary heating, unlike cheap PVC insulation that slags down at the slightest provocation.

    Removing and replacing the coaxial jack requires Cutting Three Wires then rejoining them, a process fraught with peril. You must already have a profound respect for high voltages, high currents, and high power wiring; this is no place for on-the-job learning and definitely not where you can move fast and break things.

    With this in mind, the only hope is to remove the nugget and see if the battery charges properly.

    The trick will be to do this without any possibility of shorting a metallic tool between the center pin and the side contact.

  • Bafang Battery Charge Port: Whoopsie

    Bafang Battery Charge Port: Whoopsie

    The Bafang mid-drive e-bike kits I installed on Mary’s Tour Easy recumbent and a friend’s Terry Symmetry used the “Ultra-Slim Shark” lithium battery, a rectangular lump with a tapered snout:

    Bafang BBS02 - Terry Symmetry full assembly
    Bafang BBS02 – Terry Symmetry full assembly

    The battery has a key lock on its left side:

    Bafang battery - lock
    Bafang battery – lock

    The lock might deter casual thievery, but really prevents the battery from bouncing out of its mounting plate while riding.

    The right side has a charge port closed with a rubber plug:

    Bafang battery - charge port - closed
    Bafang battery – charge port – closed

    The cover protects a coaxial jack with a 5.5 mm OD and a 2.1 mm center pin:

    Bafang battery - charge port
    Bafang battery – charge port

    My friend in Raleigh generally removes the battery before hoisting the bike into the back of her car to haul it to a friend’s house for their companionable rides: not lifting an additional seven pounds is a Good Idea™.

    A momentary distraction in the middle of that process caused her to insert the brass key into the charging port, rather than the lock. The key put a very short circuit between the coaxial jack’s side contact and the center pin, melting the key tip and welding a brass nugget onto the side of the pin:

    Bafang battery - damaged charge port
    Bafang battery – damaged charge port

    The charger plug normally sits almost flush to the port’s surface:

    Bafang battery - charge plug
    Bafang battery – charge plug

    The nugget keeps the plug out the damaged port, preventing the plug from making electrical contact:

    Bafang battery - damaged port - plug
    Bafang battery – damaged port – plug

    She owned the problem and immediately bought another battery, which tells you the value she places on riding her e-bike.

    Verily it is written: let someone who is without whoopsie cast the first shade.

    Any takers? Yeah, the way I see it, someone who says they’ve never done anything quite like that is either not doing anything or not telling the complete truth. For sure, I’ve done plenty of inadvertent damage!

    Here’s the problem:

    • The damaged battery is the better part of 600 miles away from my shop
    • Civilians cannot ship 560 W·hr lithium batteries through any parcel delivery service
    • Civilians cannot fly or take the train with such a battery, either
    • Driving 1200 miles twice is out of the question for either of us

    How would you proceed?

    More to come …

    For reference:

    Basically, it is possible to ship lithium batteries up to 100 W·h.

  • Halogen Blinky Test

    Halogen Blinky Test

    Dropping the ordinary flashlight bulb into the drawer where it belonged revealed what I think is a halogen flashlight bulb, so I rebuilt the blinky test setup:

    Halogen flashlight bulb test setup
    Halogen flashlight bulb test setup

    This time I used a BUZ71A MOSFET (13 A, 100 mΩ RDS) driven with a 10 V gate pulse to make sure it acted like a switch instead of a current sink.

    The first attempt looked … odd:

    Halogen 3V - no cap - 4ms 1A-div
    Halogen 3V – no cap – 4ms 1A-div

    The gate pulse is yellow, the drain voltage is magenta, the bulb current is cyan at 1 A/div, and the timebase ticks along at 2 ms/div.

    Moving the magenta trace to the supply voltage on the other side of the bulb produces even more weirdness:

    Halogen 3V - no cap - Vsupply - 4ms 1A-div
    Halogen 3V – no cap – Vsupply – 4ms 1A-div

    Apparently, slugging a 3 A bench supply with a 3 A pulse lasting only 4 ms causes distress of the output tract.

    Kludging a hulking 22 mF (yes, 22000 µF) cap across the power supply provides enough local storage to make things work properly:

    Halogen 3V - 22000µF - Vsupply - 4ms 1A-div
    Halogen 3V – 22000µF – Vsupply – 4ms 1A-div

    With the cap in place, the drain terminal looks less unruly:

    Halogen 3V - 4ms 1A-div
    Halogen 3V – 4ms 1A-div

    The drain voltage starts at about 600 mV with the 3 A pulse, a bit more than you’d expect from the alleged 100 mΩ drain-source resistance, but those numbers are generally aspirational and the test setup leaves a lot to be desired.

    A 10 ms pulse produces a distinct flash, rather than a dull orange blip (timebase now at 10 ms/div):

    Halogen 3V - 22000µF - 10ms 1A-div
    Halogen 3V – 22000µF – 10ms 1A-div

    A 30 ms pulse reaches full brightness as the filament settles at normal operating temperature:

    Halogen 3V - 22000µF - 30ms 1A-div
    Halogen 3V – 22000µF – 30ms 1A-div

    A 20 ms flash might suffice for decorative purposes, in which case each pulse requires 90 mW·s = 3 V × 1.5 A × 20 ms of energy. Running it all day requires 7.8 kW·s = 2.2 W·h, so it’s even less appealing than that old skool tungsten bulb.

    Which is, of course, why LED flashlight bulbs are a thing.

  • Incandescent Blinky Test

    Incandescent Blinky Test

    A flashlight bulb emerged from the clutter, which prompted me to ask if it might make an interesting blinky. Spoiler: probably not.

    The bulb had “2.4 V 0.7 A” stamped on its shell, so the test setup looked like this:

    Flashlight bulb test setup
    Flashlight bulb test setup

    A list seems helpful:

    • Solder wires to bulb in lieu of a socket
    • Bench supply at 2.4 V
    • Grossly abused 2N3904 NPN transistor as a switch
    • Function generator pulsing the base
    • Scope voltage probes on base (yellow) and collector (magenta)
    • Tek current probe on bench supply lead (cyan, 500 mA/div)

    The function generator has a 50 Ω output, so depend on it to limit the base current just like it was a resistor. The output voltage is symmetric around 0 V, so apply an offset of half the peak-to-peak signal to get a positive-going pulse:

    Flashlight bulb test - function gen setup
    Flashlight bulb test – function gen setup

    A 150 ms pulse gives the bulb just barely enough energy to light as a little orange blip, with the collector voltage dropping as the filament heats up and its resistance increases:

    Tungsten 2.4V 700mA - 150ms
    Tungsten 2.4V 700mA – 150ms

    Given 350 ms to heat up, the bulb produces a nice white-hot flash:

    Tungsten 2.4V 700mA - 350ms
    Tungsten 2.4V 700mA – 350ms

    The poor transistor acts as a 600 mA constant current sink, which isn’t surprising given its 300 mA absolute maximum current rating.

    Homework: figure the base drive and current gain

    Protip: don’t do that to a cherished transistor

    The bulb resistance starts out at 0.5 Ω and rises to 2.5 Ω when the filament glows white-hot at the end of the pulse.

    Something like 250 ms produces a noticeable blink, requiring 360 mW·s = 2.4 V × 600 mA × 250 ms from the power supply. Blinking once every ten seconds all day means 8640 pulses for a total energy of 864 mW·hr; call it 1 W·hr.

    A pair of (fresh) AA alkaline cells provide 7.5 W·hr for maybe a week of blinkiness.

    A not-dead-yet 18650 lithium cell might offer 15 W·hr, but running the bulb from 3.7-ish V, rather than 3-ish V, increases the energy per pulse by 20% and decreases the run time correspondingly.

    Surely not worth the effort …

  • Incandescent Bulb Lifetime: Also Better Than Average

    Incandescent Bulb Lifetime: Also Better Than Average

    This bulb spent the last seven-plus years of its life lighting the front bathroom:

    Dead incandescent bulb - 7 years
    Dead incandescent bulb – 7 years

    The green corrosion around the tip seems strange, given that we don’t use the tub or shower in that bathroom, and I’m pretty sure it wasn’t the cause of the failure.

    My stock of incandescent bulbs will eventually run out; I must figure out how to light the deaders in an attractive manner.

  • Lyme Disease, Now With Bonus Babesiosis

    Lyme Disease, Now With Bonus Babesiosis

    Two weeks of doxycycline should kill off all the Borrelia bacteria responsible for Lyme disease, but a blood test shows the antibodies:

    Lyme test - 2021-11-10
    Lyme test – 2021-11-10

    Those antibodies will gradually disappear during the next few months and, unfortunately, a past Lyme infection does not prevent future infections.

    The tick also injected Babesia parasites which do not respond to antibiotic treatment:

    Babesia test - 2021-11-10
    Babesia test – 2021-11-10

    The “titer” refers to the dilution required to produce a negative test result, with the 1:64 reference titer representing six successive 50% dilutions. My blood required ten 50% dilutions to produce a negative result for the IgG antibodies and (presumably) six 50% dilutions from a 20% base for the IgM antibodies.

    As I understand the situation, IgM antibodies appear promptly upon infection and IgG antibodies follow along later, so my reaction to the Babesia infestation was ramping up after two weeks.

    In the Bad Old Days™, quinine was the go-to treatment for parasitic infections, but it has a host of horrific side effects at the dosage required for traction against actual diseases; tonic water ain’t gonna get you where you need to go.

    The new hotness is atovaquone, arriving as 100 ml of a yellow liquid with the consistency of latex paint, (allegedly) the taste of “tutti fruitti“, and a price (modulo your drug plan) making inkjet printer ink look downright affordable. You might expect to get a 5 ml measuring spoon along the the bottle, but suffice it to say it’s an exceedingly good thing I’m well stocked for printer cartridge refilling.

    All of the diseases and drugs list “fatigue” / “drowsiness” / “malaise” as symptoms / side effects and I’m here to tell you knocking off a couple of hours in the recliner during the day does nothing at all to disturb another nine hours in the sack overnight.

    A few weeks of low productivity in the Basement Shop™ will definitely count as a successful outcome.

    Protip: We need permethrin spray. Lots permethrin spray.

  • CFL Lifetime: Better Than Average

    CFL Lifetime: Better Than Average

    Although compact fluorescent lamps have fallen out of favor, I’m burning through a box of the things donated by a friend who upgraded to LEDs and figured I could put them to good use. In general, complex electronic doodads (like CFL or even LED lamps) used in hostile situations (like an ordinary downlight fixture) seem to fail too quickly to justify the power savings; searching for “cfl fail” will produce some evidence from around here.

    One of the downlights in the Basement Office just killed this specimen:

    Dead CFL - detail
    Dead CFL – detail

    Much to my surprise, however, it survived for more than five years:

    Dead CFL - over 5 years
    Dead CFL – over 5 years

    The previous CFL bulb in that fixture lasted only two years, so their average lifetime is entirely too short.

    A taller bulb does a better job of lighting up that corner, although it started with enough power-on hours to suggest it won’t survive for another five years:

    Dead CFL - replacement
    Dead CFL – replacement

    The ghostly humps above the overexposed glare are the long CFL tubes reflected inside the Pixel’s camera optics.

    I didn’t see much point in nailing a ceiling to too-low floor joists.