Adding the necessary to the extremely economical illumination
When I bought these bike lights in August, there was only one or two vendors selling them, and they were all the same item.
I've added that first AliExpress link to the components section.
True to AliExpress form, this product has propagated through a bunch of different stores, with minor permutations. It's awesome! Three months later, there's a ton of variation.
So for less than $10, and in some cases less than $4, you can get a whole mess of different paper cover styles, and probably different LED colours.
Any combination of the word "32 LED Bike Spoke Light" or similar will yield results.
I would suspect that the PCB is identical, but I'd love to get some confirmation! I'd also love to get other people playing along at home - This product is neat and well worth the pocket change, even without a customisable add-on board.
Gotta redo it, though.
Had some out-of-civilisation time this weekend to chill and work on boards without distractions.
J2 will be a 1.27mm pitch SMD male header, soldered onto the original microcontroller's empty footprint. Thanks to @christoph and @zakqwy for sanity checking my footprint and stopping me from doing something dumb like special ordering 0.65mm pitch headers.
This is my third board in Upverter, and I'm actually pretty impressed!
It also saves history states in a fun way.
So I laser cut the outline to make sure it will work with my requirements.
It definitely won't. It extends way too far in both directions. I'll redesign the PCB to extend down, just to the left of the LED line.
Fortunately, I think I'll be able to manage shoving it into the case when I have the planar dimensions correct.
I'm still intending to put a scope up to the communication pins on the black box microcontroller at some point, but I don't expect to see anything, or if I do, be able to have any sort of effect on the system.
So the clear solution is to pull the microcontroller off, and then solder some headers in its place. Like how SMD JTAG headers are done.
With a daughterboard that connects to those headers, the world is my oyster in regards to hacking projects. The most obvious first step is to add a Hall Effect sensor, so I can detect wheel rotation.
Other than that, I was able to almost wholesale copy the schematic from #PIC-On-The-Go, which means I also have all of the components on hand. It really was the perfect pinout. I have enough space to do everything I want, and nothing more.
Let's take a closer look at the electronics.
It's extremely difficult to photograph the traces underneath white solder mask, but behold, my best attempt:
From here, and then with a quick assist from my handy multimeter, I have drawn a schematic!
There were a few funny things with this circuit.
The whole bottom-left section, and the connector are unpopulated - Cost reductions on display. U2 is likely an I2C flash chip, all connected to a 4-pin connector and some power switchover circuitry. AT24C02 fits the pinout of the chip, but any flash chip is identical, pretty much.
Not shown are the duplicate LEDs. Matching LEDs on each side are in parallel. On one side, they count from 0-15, and then on the other from 16-30 (there are two D17s, and no D31).
The LED is array is set up in an interesting configuration where each high-side control can select a bank of four LEDs, while the low-side controls which LED in the bank is on.
R11 is a light-dependent resistor, and along with S1 (the vibration switch), this the microcontroller is woken up only when it is dark out, and the device is moving.
Concentrating on the microcontroller, the unusual power and ground pin locations ruled out all of the listings on Digikey.
The first one I found that fits the bill is the EM78P153B. It's manufactured by Elan Microelectronics Corp, and looks like it's seldom seen outside China. Interesting. Most of their consumer line is one-time-programmable or masked memory, so it's unlikely I'll be able to rewrite it.
Side note: someone should start a database of microcontrollers and where special function pins are, to make identification of unmarked ICs easier.
Well first you attach it to your bike.
Then you spin up the wheel.
And then it fails catastrophically. The light bar is fine, but I only managed to recover one of the three batteries.
Note: I don't have the patience to turn this into a GIF right now in any quality way. Taking suggestions or help, otherwise this link might disappear in the future!
Neat enclosure design!
Batteries go in the tube, the spring on the bottom of the PCB slides into the tube portion, and then the snap on lid has a metal plate that brings current back to the other side of the PCB.