New DIY dynamo light project

For discussions about bikes and equipment.
Brucey
Posts: 47278
Joined: 4 Jan 2012, 6:25pm

Re: New DIY dynamo light project

Post by Brucey »

that'l do it [probably].......
-------------------------------------------------------------------------------
~~~~~~~~~~~~~~~~~~~~~~Brucey~~~~~~~~~~~~~~~~~~~~~~~~
edocaster
Posts: 565
Joined: 10 Apr 2013, 10:43pm

Re: New DIY dynamo light project

Post by edocaster »

Thanks Cyclothesist, but the real credit should go to the Pilom site (a German chap called Martin, I believe). My attempt is merely a remix.

As for Brucey's tantalising bottle dynamo solution, I would surmise it is mechanical (otherwise why only bottle dynamos?).
edocaster
Posts: 565
Joined: 10 Apr 2013, 10:43pm

Re: New DIY dynamo light project

Post by edocaster »

Here's an update on this project and various things I've dabbled in.

I got a bit sidetracked by looking at 3D printing, which is a whole rabbit hole in itself. I had a few other things I wanted to try 3D printing for, so this gave me an excuse to get an entry level printer. It works well so far, but I'm still tuning aspects.

3D printing, as currently available to consumers, consists of a couple of main options - resin printing, and FDM (fused deposition modelling). I've gone for the latter, as it is most common at the entry level. It works much like a cake icing dispenser, depositing plastic along paths, in layers. The inherent limitations are that strength is weaker between layers (i.e. the way you can break a Kit-Kat between bars). But with careful design something useably robust can be made.

A 3D printer is also very useful for prototyping anyway. For example:

Bracket and mount.jpg

The above is a bracket I made for an existing light mount I have (the Smart Polaris mount, which I believe is also compatible with the Busch & Muller Ixon IQ). They fit well:

Bracket and mount 2.jpg

...but only because this was the second iteration, after I added 0.2mm clearance to most mating surfaces. Tolerance for design has to be experimented with. I could use a third party service to make a better and more sturdy mount. For example, JLCPCB, who I'm already using for boards and components, can do 3D prints in nylon or ABS, which would be more structurally sound than the PLA (polylactic acid) I've used for the above - PLA being a kind of 'beginner' filament everyone uses for FDM printing, but is somewhat limited by a very low melting point. But without experimenting I would have sent them the wrong size, and would have to put in a second order, etc.

Meanwhile, I put in my order for the PCBs. From:

Main PCB diagram.png

...to:

Main PCBs.jpg

As before, the minimum is 5 boards, and 2 with SMD assembly.

Main PCB and enclosure.jpg

...they fit in the enclosure I bought.


More pics in the next post.
Last edited by edocaster on 15 Dec 2023, 11:19pm, edited 1 time in total.
edocaster
Posts: 565
Joined: 10 Apr 2013, 10:43pm

Re: New DIY dynamo light project

Post by edocaster »

In addition to the main PCB, we need separate PCBs for the LEDs as, unlike the Pico 30 I resurrected above, we want the LEDs on dedicated metal-cored PCBs (although I did outline above that vias connecting different board layers could make non-metal PCBs work).

MCPCB.jpg

These fit on the Crivit light's original reflector snugly:

MCPCB and reflector.jpg

The reflector will need some surgery, however, as it was designed for one LED. So I'll have to increase the opening for all three LEDs. Hopefully I don't accidentally destroy the reflector. Looking back on this, it would have been better to get a spare Busch & Muller Cyo reflector for this project. But that's pure conjecture, as I don't really know how the beam will end up.

A note on costs getting these boards made - they came in at just under £25. The costs ballooned somewhat as there are two sets of boards and JLCPCB charge extra fees for components that are not on their 'basic' list. I avoided populating most of the board, but used them for the two MOSFETs. Without them, the price would probably be lower by about £10.

What next? Quite a laundry list of things to do at some point:

- Solder the LEDs to the MCPCB
- Modify the reflector
- Components to add to the main PCB: Some resistors, 4 capacitors, the standlight charging subcircuit that was made earlier, the flip-flop subcircuit bought for the prototype, connectors, indicator LED, and the parts necessary for the standlight.
- Finish designing the plastic parts to add to the enclosure and print them
edocaster
Posts: 565
Joined: 10 Apr 2013, 10:43pm

Re: New DIY dynamo light project

Post by edocaster »

I had a chance to do most of the items on the bullet point list in my last post.

Modifying the reflector hole for the LEDs was surprisingly easy, as the ABS reflector is quite easy to cut.

3LEDreflector.jpg

The rest of the board has been populated.

populatedboardrear.jpg

Sizing was quite conservative, and I probably could have got away with a smaller enclosure (the current design is a 52*52*100mm enclosure, but when buying I saw 42*42*80mm was available). The three tuning capacitors are smaller than their through-hole equivalents, while still having respectable specifications.

And, finally, when testing by spinning by hand... it worked, but the standlight capacitor (which was crocodile clipped in for this test) didn't seem to be doing anything. It was charging up, as I could see the voltage rising on my multimeter. But when the wheel stopped spinning... no light.

That was frustrating. So I did a careful check for continuity on all connections (I was most worried about the LEDs, as hotplate soldering is a very new process for me, and hard to get feedback on). Ultimately, I tracked down the problem to the current sense resistor.

boardcurrentsense.jpg

...which is at the top right of the board here. As can be seen, it's somewhat brown, and was reading an open circuit. Turns out that when I scavenged it from another item, I probably killed it with heat. I do need to work on my desoldering game. (There's also quite a lot of flux on the board which I need to clean off at some point.)

So I replaced it with the 0.25 ohms resistor I used when prototyping (the one in the image was 0.2ohms, to see if a brighter, but less long-lasting standlight would be ideal).

Finally, on testing the 0.25 ohms resistor did indeed work, and the standlight functions. I tested the supercapacitor voltages during run-down, and the 3 farad capacitor bank went from 5V to 1.8V in 2m32s, to 1.0V in 3:39, and to 0.9V in 4m19s. The brightness seemed very good for at least the first 2 minutes. Even at 1.0V it was very serviceable. So I'm happy with a 0.25 ohms sense resistor, and 0.2 ohms probably would have discharged too fast.

Beam-wise, it's certainly slightly more diffuse than the original Crivit's beam. This is no surprise, as the 3.5mm Cree LEDs are noticeably larger than the original single 3.0mm Osram, but at least the overall shape seems to still preserve a cut-off.

I'm now on the last bullet point item, which is the enclosure, and bringing it all together.
edocaster
Posts: 565
Joined: 10 Apr 2013, 10:43pm

Re: New DIY dynamo light project

Post by edocaster »

Building the light with 3D modelling is probably the biggest time sink so far, but that's largely because of learning, plus the huge range of possibilities leading to a temptation to tinker.

In case it's useful for anyone, here's what I've done, as a complete novice to CAD.

Firstly, I'm using Autodesk Fusion 360, which has a free hobbyist licence. I've not run into any major limitations yet, but it's not the most intuitive program. For a complete beginner, this tutorial playlist has been invaluable: https://www.youtube.com/playlist?list=P ... Y8ipVvFsIp (although sped up by 1.5x, as he's a slow talker). The main thing is that this CAD software is parametric, which means you should try to draw with exact dimensions, and store those dimensions as variables which can be changed later. This way, a model can be tweaked far down the line with less chance of breaking anything.

A set of calipers is super-useful too. E.g. for measuring the dimensions of the aluminium enclosure I'm working around, and various interface elements like switches and a remote jack. Even then, it sometimes takes a revised print if a fit was off, which is where the parametric aspect of CAD really helps.

Design is entirely down to personal preferences and limits in knowledge. In any case, for the rear here is the design in CAD:

Fusion360 rear case.png

And after printing and adding some of the interface parts:

Rear case.jpg

(There is a momentary switch under there, plus a 2.5mm jack - possibly not the most robust or weatherproof option, but that's the current choice.)

And fitted on the enclosure:

Rear case fitted.jpg

The initial mount for the reflector was a pleasant surprise in fitting snugly, as measuring such a curved item was part guesswork:

Reflector mount.jpg

Things like self-tapping screw holes are the result of experimentation. This is where having a 3D printer rather than relying on an external service has been justified so far.
Cyclothesist
Posts: 1110
Joined: 7 Oct 2023, 11:34am
Location: Scotland

Re: New DIY dynamo light project

Post by Cyclothesist »

It's looking good. A project like this makes you appreciate the hours of design and prototyping that goes into even your average bike light.
edocaster
Posts: 565
Joined: 10 Apr 2013, 10:43pm

Re: New DIY dynamo light project

Post by edocaster »

As previously mentioned, designing the shell has taken the most time. Not because there are any optimistic design or styling goals, but just rather getting ideas into a workable form while learning CAD has been a headache. You can spend ages trying to do something, and then only later learn a better way with a few shortcuts.

It's also very easy to end up designing something which doesn't fit, as something else is blocking access, etc.

The rear of the case was fairly straightforward, as most items were at right angles to each other. The front of the case was another story, as it has to accommodate a lens at an angle.

My first attempt:

V1 shell.jpg

This was based on a transparent plastic piece I had from a clock. Making a screw-on retainer was pretty elaborate, but ultimately this just wasted too much space and was fairly ugly.

V1 shell front.jpg

...and messing up some measurements meant the reflector sat unnecessarily deep.

My current approach is:

V2 shell.jpg

...which is a lot shorter. In this photo you can see the rear of the first light and it's attached innards (including the supercapacitors stuffed inside a piece of inner tube), ready to be transferred to the second design. This is plugged into the board, as that is the main way that this light can be assembled and disassembled - a key goal this time, compared to my last lights, was to make something which could be re-opened without too much hassle.

The first incarnation I did actually test out on the road, albeit not at speed, as I was waiting for some copper shims. These are to provide a thermal path from the LED's heatsink to the aluminium case (as the original heatsinks from the Lidl light aren't sized to handle the wattage this light should be able to output). In truth, if I did this design again I probably wouldn't use such a case, as the contact isn't really on a plane that can be tightened. Instead, the heatsink and the case slide in place. Hence the shims have to be sized carefully. In any case, I should be able to get a road test in soon.
edocaster
Posts: 565
Joined: 10 Apr 2013, 10:43pm

Re: New DIY dynamo light project

Post by edocaster »

Since my last post, I have been able to ride with this DIY dynamo light for a few weeks (selecting dry days, as this version isn't yet sealed). I'm happy to report that it has held up - nothing has broken or overheated, and the behaviour is all pretty much as designed.

The beam is fairly good. A lot better than the Pico 30 I resurrected up thread. It doesn't really have a sharp cut-off to compete with the B&M Cyo Premium I also have though, or even the original Crivit light, but it has a general fade to a dark upper half:

Standlight wall beam shot.jpg

(Yes, I see a face in it too...)

Note that this was a beamshot of the standlight against a wall. Also, the hotspot is slightly exaggerated by the camera. In motion, the two additional LEDs add some illumination to the sides too. In fact, the beam is very wide - the above photo is about 90 degrees across.

The lack of a tight cut-off is slightly disappointing, but I can point the brightest part of the beam in the mid-range, and illumination is good. Overall, it definitely makes better use of the available light than a round beam.

The standlight is good, certainly better than any of the passive versions I built before. With both this light and the B&M Cyo standlights on, I would say the peak brightness is similar, but the Cyo's is a pencil thin portion.

For a remote switch, I had printed a design built around a small tact switch:

DIY remote switch.jpg

The fiddliest part there was building around a switch cap (scavenged from an old TV remote). That worked fine, but the shape was a bit taller and angular than ideal (I also left space in the design for a second switch, which could be potentially of use in future). Basically, totally fine for the flat part of a handlebar.

I had actually decided on a 2.5mm remote jack because it is used by wired camera remote controls (largely Canon), so was going to buy a Canon-compatible remote rather than building my own, although the camera remote form factor isn't great. But I recently stumbled across a switch built for a bike horn, retailing for just £6, which also uses a 2.5mm jack:

Remorp remote switch.jpg

So I'll now try this one out instead. It can fit more comfortably close to typical drop bar hand positions. Interestingly, it's a two-stage switch, even though my light makes no use of the extra switch. That could be really useful in future. Why? Because I may consider a next light build :D In short, while I started off wanting manual control over switching between voltage doubler and full wave rectifier... to be honest, it's not super useful. It's just something I got used to on my last light. In practice, I mostly want brightest, unless climbing slowly.

What a bar-mounted two-stage switch could be useful for is dipped beam/high beam. The full press would switch between modes, while the half press would flash a high beam (if not already in that mode).

Alas, at this stage I have no real plans. I think to make this worthwhile the cut-off would have to be tighter. Anyway, I'm glad I got a working light out of this current project before the clocks go forward, lol.
lucasdupuis32
Posts: 17
Joined: 5 Sep 2024, 11:56pm

Re: New DIY dynamo light project

Post by lucasdupuis32 »

I'm also building my own dynamo light and I just came across this thread, what a discovery ! It is a goldmine of information.
I also plan to use pilom's 12th circuit. If I understand correctly, your initial plan was to use a single XHP35 emitter, but in the end you chose to use 3 LEDs, may I ask why ?
I'm gonna try to replicate your standlight feature with a XHP35.
FYI, I found a pretty nice lens for such a DIY project, it's the "Filippa" made by LEDiL, and it's StVZO compliant which means it has a beam cutoff for riding in traffic.
edocaster
Posts: 565
Joined: 10 Apr 2013, 10:43pm

Re: New DIY dynamo light project

Post by edocaster »

lucasdupuis32 wrote: 6 Sep 2024, 12:24am I'm also building my own dynamo light and I just came across this thread, what a discovery ! It is a goldmine of information.
I also plan to use pilom's 12th circuit. If I understand correctly, your initial plan was to use a single XHP35 emitter, but in the end you chose to use 3 LEDs, may I ask why ?
I'm gonna try to replicate your standlight feature with a XHP35.
FYI, I found a pretty nice lens for such a DIY project, it's the "Filippa" made by LEDiL, and it's StVZO compliant which means it has a beam cutoff for riding in traffic.
I'm glad you find it useful. It's certainly worthwhile - I've used this light almost every time I've used the bike it's on, and it has worked well over the last few months, with no problems with fast descents in terms of overheating. The one mishap I had was off the bike which I'll detail below.

Regarding the emitters, I did use the XHP35, but added two additional standard ('3V') LEDs (in parallel with each other and in series with the XHP35, above the XHP35). The reason for this was the standlight didn't initially work when it outputted to the same LED chain as it was charging from. This seems to be because its output was attempting to go back into the charging circuit. So the standlight output must be prevented from going back into the charging circuit. This could be done by just a single diode between the top of the circuit and the XHP35, with the standlight output going to the junction. I thought that was a bit of a waste, so used LEDs instead - I knew from previous experience that running what is effectively a 5-LED series light from a dynamo is viable. (The reason for there being two extra LEDs was just for balance reasons (one on each side of the main LED), although it meant I added some very small resistors to keep them in balance, as LEDs in parallel are seldom going to have the same voltage drops.)

The whole business with an extra LED(s) or a diode to separate the standlight output could be avoided if you ensure that the standlight charging and discharging are two separate states that can't occur at the same time. How this could be done would be a little trickier and would probably involved monitoring speed - i.e. getting into the region of the frequency to voltage converter which Pilom's circuit 12 has, which I avoided. But if you are building circuit 12 it's worth considering.

Good job on finding the LEDil Filippa. It seems designed for 3535 sized LEDs, which the Crivit reflector wasn't.

Which gets me to the one minor mishap I had, which hopefully others can avoid: when I put the light together I thought the XHP35 was a little too large too really collimate sharply - it is in the 3535 format, but the dome takes up almost all of the dimensions. But this was the HD variant and I remembered that for the prototype I used the HI variant, which has no dome, and the bare emitter takes up about a quarter of the 3535 footprint. So I figured I would solder the HI to a spare LED board and swap out the boards. I did it and... dead light. I desoldered and checked - the HI LED was now dead.

I thought I was very careful to not plug up the light and try and use it without LEDs attached, as that will charge up the caps and then kill the LEDs once connected. But I forgot that the standlight circuit will also do the same, as a boost converter with no output will promptly charge up a cap and beyond. So, at some point after detaching the original LED, I must have turned the standlight switch on or short-circuited it. Lesson learned. This can be avoided by adding no-load protection to the standlight circuit, discharging caps before soldering LEDs, or just being very careful. In any case, I went back to the original HD LED, and that's the LED I've used ever since.
lucasdupuis32
Posts: 17
Joined: 5 Sep 2024, 11:56pm

Re: New DIY dynamo light project

Post by lucasdupuis32 »

Thank you for your detailed answer, and for the warning about your mishap.
I just bought the Filippa lens from Mouser Electronics as well as the XHP35 which should work since it's a 3.45x3.45mm emitter.
If I manage to finish this project I'll post a picture of the beam.
Another question, what software did you use to simulate the circuits ? I'm also trying to simulate mine before ordering the PCB. I had a course on Power electronics and MATLAB Simulink two years ago but it seems like I've already forgotten most of it :?
How did you model the current source AKA the dynamo ? How did you find the relationship between the source frequency and the actual speed of the bicycle ?
Cyclothesist
Posts: 1110
Joined: 7 Oct 2023, 11:34am
Location: Scotland

Re: New DIY dynamo light project

Post by Cyclothesist »

I'm interested to read how edocaster did it too. I'd approach it like this:-
If you turn the dynohub attached to a multimeter or a scope you can count the number of a.c. cycles per revolution. The
wheel will travel π x Diameter in one revolution. So
Speed = Frequency/(a.c. cycles per rev) x π x Wheel Diameter
If you measure the wheel diameter in metres that will give speed in m/s.
Jdsk
Posts: 28215
Joined: 5 Mar 2019, 5:42pm

Re: New DIY dynamo light project

Post by Jdsk »

Cyclothesist wrote: 7 Sep 2024, 5:00pm ...
If you turn the dynohub attached to a multimeter or a scope you can count the number of a.c. cycles per revolution. The
wheel will travel π x Diameter in one revolution. So
Speed = Frequency/(a.c. cycles per rev) x π x Wheel Diameter
If you measure the wheel diameter in metres that will give speed in m/s.
One of our B+M rear lights has a "braking" mode. No accelerometer... detects the AC frequency. : - )

Jonathan
Cyclothesist
Posts: 1110
Joined: 7 Oct 2023, 11:34am
Location: Scotland

Re: New DIY dynamo light project

Post by Cyclothesist »

Jdsk wrote: 7 Sep 2024, 5:02pm One of our B+M rear lights has a "braking" mode. No accelerometer... detects the AC frequency. : - )

Jonathan
A clever bit of design!
Post Reply