February 20, 2011
This is pretty much a copy of what I did in the upstairs kitchen, but with more attention to detail because there’s no molding to hide behind. It’s a little heavy in its use of aluminum.
December 24, 2010
Things are looking up, slightly. Some time ago I picked up a “Really Useful Box” at Staples. The rectangular board fits nicely inside. A larger version of the same box, would include enough room for the battery switch and battery. The box itself is not entirely watertight; it needs a bead of silicone around the rim. Note: Really Useful Boxes has a bizarro shipping policy for tiny boxes; $10 will ship up to 5 boxes, which arrive in an comparatively huge double-layered cardboard, suitable for shipping something heavy and delicate, not a handful of tiny plastic boxes.
Here’s the box, with the shunt resistor and “indicator” LED siliconed onto the outside.
Stacked on the larger box:
December 3, 2010
Headlight mounts always end up looking a little clunky, and are a little hard to adjust. This one works better than most I’ve tried, and looks better too (at least, relative to the others). You’ll have to take it on faith that the shape is pretty good, but the shape is pretty good, meaning, it throws a lot of light down the road, not too much too high, and makes a nice puddle around the front of the bike. I solve the light-in-eyes problem with low-beams; this one’s not too bad, but the amber low beams, mounted low, aimed low, are vastly better.
December 2, 2010
Figured out the wax thing (probably). I suspect that the BuckPuck has an overheat circuit, and was still hot from the melted wax when I tested it.
The official bottle-cage container was not at all durable, and really a waste of money. Instead, I am using a tighter-fighting, cheaper, with reliable screw-top, Trader Joe’s Peanut Butter jar. Also, I decided to ditch the 8xAA battery pack, and will either use a 9 volt battery, or am 8xAAA pack, which can fit into a little bubble wrap to protect the electronics, while still leaving it loose.
New effort, being tested:
In a (particular) bottle cage:
Lid off, showing holes for wires (not yet sealed) and easily accessed standlight-controlling chip, with switch and over-voltage LED. The battery switch PCB (itself coated in wax) flips up out of the way to allow access to the battery.
I’m not 100% sure on the wax potting; it adds weight, which is not for everyone. I’ve also laid out the circuit on a larger rectangular board with room for zip-tie-downs for the large capacitors, which is a lighter-weight way to immobilize them. However, it doesn’t fit as well into a cage-compatible container.
Interestingly, the battery controller is very sensitive to static discharge; touching any part with a finger after turning it off, tends to turn it back on. I’m not sure this matters, but it would be nice to make it be a little less excited about turning on.
November 27, 2010
I’m still tweaking the software. Latest mistake on my part was getting the numbers backwards for the on/off counter, so right now it is a little too happy to turn on. This doesn’t necessarily run down the battery; if the battery comes on when the bike is moving “too fast”, the effect is to dim the lights slightly as the system voltage drains into the battery, and the batteries are (slightly) charged.
I added a switch to allow me to force the batteries on; in theory I could use the bike as a battery charger, though it would take hours, but the main goal is to permit the lights to stay on arbitrarily long if you need light (fixing something by the side of the road, for example). With the bike stopped, toggling the switch off-on-off turns the lights off immediately. Usually.
“Debouncing” the circuit has been a little tricky. When the microcontroller decides to “turn off” the lights, it is really turning off its own power, as well as the power to a beefy trio of capacitors, an op-amp, and a little switching power supply. It doesn’t just go to sleep, and sometimes thinks it sees signals as things settle unevenly towards zero (somewhat like HAL singing Daisy). So, timers and wheel turns are taken on faith as they occur, but for purposes of detecting switch movement, and for resetting the software to its on-the-road state, there are counters. A net of 313 (1/10th second) samples must agree before the switch is judged to have a value. For purposes of deciding that the bike is no longer sitting still, 8 zero crossings (one foot of motion, can be back-and-forth) must occur. This is partly necessary because there can still be voltage to the microprocessor even when the lights are out (surprise!) as the big caps slowly drain.
Packaging has been a pain. Originally I had intended to pot the controller in wax, but when I did that, for some reason it didn’t work. It half-worked, but I couldn’t get the lights to go on. Quite depressed, I got it out of the wax, checked the wax to see if it was conductive (shouldn’t be, but you never know), and discovered that now everything was working perfectly. Maybe I goofed somehow on the light test.
So, instead, and especially for this one where I am still taking it apart and putting it together again (mostly to swap out the microcontroller), things are held in place with elastic cord. I’m not entirely happy with the bulk, though part of the problem is that the bike I am testing on has no water bottle cage. An 8-pack of AA cells is probably too big, especially given that the batteries are only used intermittently.
The rear light is a win. That is a P-clamp, plus some aluminum angle stock, plus a bare LED on puck for a taillight, all but the lens painted with nail polish to keep the weather out.
I think the front light would be acceptable if I had a better place for the cylinder-o-circuits. The light bracket is made from two bell mounts, two longs bolts or screws, some aluminum stock, a mirror (to cut off some glare from other cyclists and pedestrians) and some mounting nuts. The cutoff is not good enough; I think that low beams (amber, either down low or aimed low, mounted on aluminum angle stock) will be necessary.
I imagine it would be tidier if the blue, orange, and green wires came out the bottom of the circular PCB, through aligned holes in the bottom, additional (blue, red, black, white) ran up to the battery switch, and then an AAA battery pack was cradled in something squishy below the switch.
Wow. (Been experimenting with tweaks.) I think a few noise-reducing capacitors might be in order. Sometimes a few taps on the bike are enough to turn the lights on.
November 26, 2010
My brother wanted one of these ages ago, I realized it would probably need software.
Software had two bugs in it, initially — forgot to say “unsigned” when that was what I meant, and had a fencepost error that had the standlight on twice as long as intended.
But the circuit worked the very. first. time. I’ve never built one of these before, I was quite proud that it worked. The standlight controller contains an Atmel ATTiny85 (overkill, for now) that watches the wheel rotate by monitoring zero crossings in the AC output from the hub alternator. When the hub spins too slow, it activates a battery-connecting circuit; when it spins fast enough, it deactivates the battery-connecting circuit. If there is no wheel motion for “long enough”, it deactivates the battery-connecting circuit. I checked, with a multimeter, to verify that no current flowed into the battery when the wheel was spinning fast enough. The supply current is about 70-80 mA, which should support many hours of on-time.