A couple of years ago, I purchased a bare, used BMW M54 block on a whim. I wanted to make an end table or something out of it. Then I got the idea to make a cool automobilia conversation piece out of it. I bought 6, red, 80mm LED headlight "angel eye" rings. I want to use an Arduino to drive the LED halos.

The goal is to have 2 modes for the LEDs:

1. Static - just on

2. Flash in the M54 firing order - and be able to adjust the "throttle" with a rotary knob.

The problem is that I have no experience with Arduinos. I've built a few Raspberry Pis for different applications but never an Arduino.

My question is can I even use the Arduino to drive the LED halos? And does the Arduino have the capability to control the pattern I want?

GameboyRMH
GameboyRMH GRM+ Memberand MegaDork
2/8/23 11:58 a.m.

Yes an Arduino can do this (maybe not drive the halo lights directly due to current requirements, but can handle the logic side of things) and is probably even an overkill solution, a proper hardware hacker would likely recommend a 555 timer.

The Arduino is a fairly basic programmable control board compared to the minimalistic Linux computer that is a RasPi. You'll put the code together on a desktop IDE and flash it onto the Arduino.

codrus (Forum Supporter)
codrus (Forum Supporter) GRM+ Memberand PowerDork
2/8/23 12:07 p.m.

Yes, easily.  You will need to learn enough C to write some simple logic.  The quick-and-dirty way is to use delay loops, if you want to be more precise (and leave processing power around for potentially doing other things) then you'll want to learn how the timers work and set those up.  A rotary knob is typically a variable resistor, you measure the voltage drop across it using one of the analog inputs on the Arduino to get the setting and then use that to calculate the timing.

On the hardware front, in addition to some driver circuitry (transistors or relays) you will probably also need a beefier power supply.

 

alfadriver
alfadriver MegaDork
2/8/23 12:24 p.m.

Combine the digital outputs to digital relays and you will be all set. 
 

The good thing is that you would make a derivative of the basic blink program. But it still can be frustrating. 

Keith Tanner
Keith Tanner GRM+ Memberand MegaDork
2/8/23 1:38 p.m.

Have a look at Circuitpython and the Adafruit "feather" boards. CP is really quick to learn and while it's slower than compiled code, it's fast enough for what you want. You can literally plug in things like a rotary encoder for your "throttle", there are lots of tutorials. And their boards can also run Arduino if you want to write that.

This will control some LEDs directly including a voltage shift to 5V.  If your LEDs run a higher voltage, get the RP2040 Feather.
https://www.adafruit.com/product/5650
https://www.adafruit.com/product/4884

Here's your "throttle" knob. Nice digital signal, no messing around with analog :)
https://www.adafruit.com/product/4991

If your LEDs run on higher voltage - which they probably do if they're automotive angel eyes - you can use something like a motor driver. Basically, a fast acting MOSFET relay. I use things like this to run stuff like Christmas lights, you just feed it a 3.3V signal. They're fast enough that you can run PWM through them and actually fade the lights in and out.
https://www.amazon.com/Controller-H-Bridge-Stepper-Control-Mega2560/dp/B07WS89781

DirtyBird222
DirtyBird222 PowerDork
2/8/23 2:07 p.m.
Keith Tanner said:

Have a look at Circuitpython and the Adafruit "feather" boards. CP is really quick to learn and while it's slower than compiled code, it's fast enough for what you want. You can literally plug in things like a rotary encoder for your "throttle", there are lots of tutorials. And their boards can also run Arduino if you want to write that.

This will control some LEDs directly including a voltage shift to 5V.  If your LEDs run a higher voltage, get the RP2040 Feather.
https://www.adafruit.com/product/5650
https://www.adafruit.com/product/4884

Here's your "throttle" knob. Nice digital signal, no messing around with analog :)
https://www.adafruit.com/product/4991

If your LEDs run on higher voltage - which they probably do if they're automotive angel eyes - you can use something like a motor driver. Basically, a fast acting MOSFET relay. I use things like this to run stuff like Christmas lights, you just feed it a 3.3V signal. They're fast enough that you can run PWM through them and actually fade the lights in and out.
https://www.amazon.com/Controller-H-Bridge-Stepper-Control-Mega2560/dp/B07WS89781

What Keith said. Arduino stuff is super easy to compile and shouldn't be a terrible hard project for you. 

Keith Tanner
Keith Tanner GRM+ Memberand MegaDork
2/8/23 3:34 p.m.

CircuitPython is an interpreted language, so it's more like PHP or JavaScript than C. It all depends on your background. 

But "make LED blink" is the Hello World of microcontrollers :)

You'll need to log in to post.

Our Preferred Partners
y6ByhaHGXTbfqrzMuivihIl84ZDTdjO88MbQ22JmbXAFrVfYuypb0F3YbA7juBHt