DIY Microcontroller Based Step-up and Step-down LED Drivers

It’s possible to design your own switching LED drivers using a microcontroller as its PWM source.

Some of my LED lamps and bike lights use microcontroller based LED drivers. The microcontroller used include ATtiny85 and ATtiny84.

With a lower supply voltage, you might find your energy savings significant when using a switching LED driver. If you need to power a 3.2V white LED with LiFePO4 cells which are 3.2V each, you likely need two cells for stability. With a step-down driver, the efficiency is around 85%. With a current limiting resistor, the efficiency falls to 50% with more waste heat!

With a microcontroller, there’s more flexibility. You can adjust the driver’s feedback voltage and drive current, and add more features.

With an adjustable feedback voltage, you can decrease the drop-out voltage of the driver and you don’t have to change resistors to adjust the drive current.

With an adjustable drive current, you can increase the lumens per watt rating of your LEDs when dimming. At a lower drive current, a high end LED can have 200 LPW. Near its maximum current, it can fall to 100 LPW even with PWM dimming. If you installed a lower current rating LED, you can update the code to lower the current.

The features that you might add to the driver include button control, brightness adjustment, potentiometer control, battery monitor, maximum duty cycle, memory of settings, and sleep mode.

When designing a boost driver, it’s important to have fuses and overvoltage protection in case of errors in your program or your output disconnects. I’ve often burned my components when designing boost drivers.

It’s recommended that the transistor has a high Vds and power rating. TO-220 packages usually are preferable to TO-92 or SOT23 packages because they can handle more power.

I find that oscilloscopes make troubleshooting easier. I tend to keep the circuits simple and my circuit boards custom made so that troubleshooting is easier.

I might experiment with even higher voltages because it can drive more LEDs with fewer drivers. If you’re using a 12V power supply, you can use a single driver to power 20 red or yellow LEDs, or 15 white LEDs! You might be able to drive even more depending on your components’ ratings. With a step-down driver, you can power only four red or yellow LEDs or three LEDs from a single driver.

Possible project ideas include bike lights, flashlights, desk lamps, work lights, and grow lights.

If you’re not comfortable with designing boost LED drivers, you can try buck drivers. There’s no need to worry about overvoltage and there’s less risk of overcurrent. To prevent damaging your LEDs while testing, you can connect them to a current limiting resistor. You can still use fewer drivers and have more power by selecting higher current LEDs, or connecting more cells in series.

On Instructables, there are microcontroller based LED driver projects.

How to Make a Superlight Bike for the “Concours de Machines” — Off The Beaten Path

The official results of the 2017 Concours de Machines are in! Peter Weigle’s machine did even better than we thought: Lightest bike: First place Choice of the jury: First place Technical points (bonus for features, penalties for problems): First place Zero penalties for technical problems Faster than required speed on each stage: zero penalties Overall: Second […]

via How to Make a Superlight Bike for the “Concours de Machines” — Off The Beaten Path

Putting Our Lives on the Line

Off The Beaten Path

corner_adams

Testing bicycles may sound like a dream job – you get to ride all kinds of bicycles without having to pay for them – but it comes with risks. We ride the bikes hard, although we don’t abuse them. We are smooth riders, so we don’t stress components unduly. Even when riding the bikes as intended, problems often manifest themselves during our two-week test. We’ve tested more than 60 bikes, and there have been a number of close calls and actual injuries.

On one test bike, the headlight fell off and hung from its wire, dangling in the spokes. On another, a poorly mounted front fender broke loose and wrapped itself around the front wheel during a high-speed descent on a busy road (below). I was lucky not to crash, but a friend of a friend suffered a similar failure on a bike from the same maker and is still…

View original post 807 more words

My Fenix PD35 TAC Flashlight

 

I bought the PD35 TAC flashlight from Vancouver Battery. It’s a 1000 lumen tactical flashlight that can light up to 200m.

 

It came with a holster, a manual, and spare O-rings and switch cover.

The flashlight has general and tactical modes. In general mode, it remembers your brightness selection when you turn it off. It can last from 1h 10min in turbo mode to 140 hours in eco mode! In tactical mode, it always starts at turbo mode followed by strobe and low.

This flashlight can be life saving in an emergency. In tactical mode, you don’t have to look for the turbo setting when your adrenaline level is high. Since it’s easy to carry every day, you’re more likely to use it when it’s needed. This flashlight may deter wild animals.

 

I carry the flashlight in its holster attached to my belt. It’s powered by a protected 18650 Li-ion battery.

Most of the time, I use the tactical mode. If it’s too bright, I aim it away slightly, using the side spill which reduces glare. It’s possible to do the same in general mode if you keep its setting at turbo. This is useful because many other models from Fenix don’t have tactical mode.

I bought it because it has a good balance of battery life, mode selection, light output, beam distance, weight, and size.

A Better Way to Mount Lights

Off The Beaten Path

light_mount-1_blog

Small parts often get overlooked, but they can make a big difference in your cycling experience. Take light mounts, for example. Adjusting the angle of your headlight beam is useful: In town, you want to angle the headlight low so it doesn’t blind oncoming traffic. Out in the mountains, you need a higher beam. Otherwise, you ride into the dark when you descend at speed and go into a dip in the road.

Yet trying to adjust the headlight by hand usually results in one of two outcomes: Either the mounting bolt is really tight and doesn’t move at all. Or light moves to the desired position, but the bolt turns and loosens in the process, and soon the light rotates on its own.

Of course, your headlight should never come loose. In the real world, even if it’s tight to start with, vibrations tend to loosen many headlight mounts, no matter how much Loctite you…

View original post 582 more words

Tire Pressure Take-Home

Off The Beaten Path

un-meeting_uphill

What is the “correct” tire pressure for your bike? The simple answer is: Whatever feels right to you. Confused? Here is how it works:

In the past, many riders inflated their tires to the maximum pressure rating. Now most cyclists now recognize that the optimum pressure often is much lower.

But what is the right tire pressure? At Bicycle Quarterly, we’ve done a lot of research into the rolling resistance of tires at various pressures, and on various road surfaces.

BertoPressChart

Frank Berto’s tire pressure chart (above), first published in Bicycle Quarterly many years ago, has received much attention. (Note that the weights are per wheel, not for the entire bike.)

Berto made the chart in the 1990s, when tires were much narrower. Hardly anybody today still rides on 20 mm tires, and even 23 mm are on their way out! At the other end, 37 mm no longer is huge, as many of us…

View original post 948 more words