Super simple controller for Motorcycle LED lights

For automobiles, especially motorcycles, auxiliary lighting that augments the headlights can be quite useful, particularly when you need to drive/ride through foggy conditions and poorly lit or unlit roads and dirt tracks. Most primary lighting on vehicles still relies on tungsten filament lamps which have very poor efficiency. The availability of cheap, high-efficiency LED modules helps add additional lighting to the vehicle without adding a lot of burden on the electrical supply. If you want to add brightness control, you need to either buy a dimmer module, or roll your own. [PatH] from WhiskeyTangoHotel choose the latter route, and built a super simple LED controller for his KLR650 bike.

He chose a commonly available 18 W light bar module containing six 3 W LEDs. He then decided to build a microcontroller based dimmer to offer 33%, 50% and 100% intensities. And since more code wasn’t going to cost him anything extra, he added breathing and strobe modes. The hardware is as barebones as possible, consisting of an Arduino Nano, linear regulator, power MOSFET and control switch, with a few discretes thrown in. The handlebar mounted control switch is a generic motorcycle accessory that has two push buttons (horn, headlight) and a slide switch (turn indicators). One cycles through the various brightness modes on the pushbutton, while the slide switch activates the Strobe function. A status indicator LED is wired up to the Nano and installed on the handlebar control switch. It provides coded flashes to indicate the selected mode.

It’s a pity that the “breathing” effect is covered under a patent, at least for the next couple of years, so be careful if you plan to use that mode while on the road. And the Strobe mode — please don’t use it — like, Ever. It’s possible to induce a seizure which won’t be nice for everyone involved. Unless you are in a dire emergency and need to attract someone’s attention for help.

Continue reading “Super simple controller for Motorcycle LED lights”

Hackaday Prize Entry: A 7805 Replacement

The 7805 voltage regulator is a great device if you want a simple way of bringing a voltage down to 5V. It’s a three-pin, one-component solution that puts out five volts and a lot of heat. Simple, not efficient. For his Hackaday Prize entry, [K.C. Lee] is working on a much more efficient drop-in replacement for the 7805.

Linear regulators like the 7805 are great, but they’re not terribly efficient. Depending on the input voltage you might see 50% efficiency. Going to a switch mode supply, that efficiency shoot up to about 90%.

For his drop-in replacement, [K.C. Lee] is using the LM3485, a switch mode regulator that only needs a few extra parts to turn it into a replacement for the 7805. You will need a cap on the input, but you should already be putting those in your circuit anyway, right?

The 2015 Hackaday Prize is sponsored by:

Redlining Your CPU via Automotive Tachometer

Many CPU-usage widgets have stylistically borrowed from vehicles, displaying something mimicking the tachometer found in the dashboard. [Pat] took it a step further and tried his hand at re-borrowing this style. He figured, why not use an actual physical tachometer to display how hard the CPU on his Raspberry Pi was revving?

With the goal of tuning 0-100% CPU usage to 0-8000 RPM on the tach, the first step was diagnosing the range of PWM input frequencies that moved the needle across the tach’s full arc. Using his Tektronix 3252C function generator he quickly determined 0-440 Hz would be needed and graphed a handful of intermediate points. The response curve was not linear, so he drew up some fudging guidelines to make all the datapoints match.

Next, he wrote a few lines of Python (he shared) to make the Pi to poll its CPU usage and translate it to the proper frequency. The Pi makes outputting easy, GPIO pin 11 carried the signal to a 7404 for buffering, then out to the tach. The automotive tach itself ran on 12V, but its input signal required only 5V so he pulled a 7805 from his parts bin.

Once it was all put together it worked beautifully using just the one extra component. Some might see this as more clever than USB dependent or Arduino bloated based tachometer hacks.

See the video after the break of the tach twitching even when the mouse moved, and pegging the red when opening a browser. No more need to use up valuable screen real-estate (or use a screen at all) if you want to see at a glance when your Pi is putting in work.

Continue reading “Redlining Your CPU via Automotive Tachometer”

A Detailed Look at the 7805 Voltage Regulator

We’re quite sure that all hobbyists have used the 7805 voltage regulator at least once in their lives. They are a simple way to regulate 7V+ voltages to the 5V that some of our low power projects need. [Ken Shirriff] wrote an amazingly detailed article about its theory of operation and implementation in the silicon world.

As you may see in the picture above such a regulator is composed of very different elements: transistors, resistors, capacitors and diodes, all of them integrated in the die. [Ken] provides the necessary clues for us to recognize them and then explains how the 7805 can have a stable output even when its temperature changes. This is done by using a bandgap reference in which the difference between transistor base-emitter voltages for high and low current is used to counter the effects of temperature. As some elements looked a bit odd during [Ken]’s reverse engineering process, he finally concluded that what he purchased on Ebay may be a counterfeit (read this Reddit comment for another opinion).

First Stab at Motion Sensor to Disconnect a Car Charger



[Pixel] just sent in this automotive hack which disconnects his car charger when the vehicle stops moving for at least 10 minutes. Why would you need such a thing? The 12V outlet in his vehicle isn’t disconnected when the ignition is turned off. If he leaves a charger plugged in when parking the car, he often returns to a drained battery.

The fritzing diagram tells the story of this hack. He’s using a 7805 to power the Arduino mini. This monitors an ADXL362 accelerometer, starting the countdown when motion is no longer sensed by that chip. At the 10-minute mark the N-channel MOSFET kills the ground side of the outlet. Good for [Pixel] for including a resetable fuse on the hot side. But it was the diode all the way to the left that caught our eye. Turns out this is part of a filtering circuit recommended in a forum post. It’s a Zener that serves as a Transient-Voltage-Suppression diode.

Another comment on that thread brings up the issue we also noticed. The 7805 linear regulator is constantly powered. Do you think putting the uC into sleep and leaving the linear regulator connected is an adequate solution? If not, what would you do differently?

Cooling fan speed controllers do it by generating heat


We’ve never torn one apart ourselves, but it boggles the mind just a little bit to learn that these cooling fan controllers generate heat to do their job. We’d bet we’ll get shouted down in the comments, but doesn’t this seem counter-productive?

At any rate, we enjoyed reading two posts on this topic. [Göran’s] first adventure with the hardware started when he was trying to design his own speed controller. He saw a reference design in the LM7805 linear regulator datasheet which allows the adjustment of the output by changing the ground reference. When fed with 12V this ends up putting off some heat but it is a simple and reliable solution. He was a bit surprised to crack open a Zalman module and find the exact same circuit inside.

The controller in the background is an eBay purchase. He cracked that one open as well (that’s the link at the top) and found a circuit with a linear regulator in it, but this time it was a TL431 adjustable regulator. So here are our questions: Which one of these two is better and why. And can you do it relatively inexpensively without generating as much heat?

Multi-Function Bench Power Supply

Concerned with your project’s power consumption but don’t want to constantly leave an ammeter wired in series with your power supply? [Rajendra] feels your pain and has recently documented his solution to the problem: a variable-output bench top power supply that clearly displays load current consumption among other things!

Everything is wired up in a nice roomy enclosure that has front-panel access to ±5V and variable outputs, an adjustment potentiometer, and even an input for an integrated frequency counter. A PIC16F689 MCU runs the show and displays the variable output voltage and current on a 16×2 character LCD. Although clearly useful as is, the PIC has plenty of I/Os and muscle left for future expansion and a capacitance meter has already been hinted at as and addition for version 2!

Continue reading “Multi-Function Bench Power Supply”