Animated indicators (turn signals) with Arduino, FastLED and a WS2812B LED strip.

  Рет қаралды 53,424

Scott Marley

Scott Marley

Күн бұрын

I was recently asked how to connect a Arduino to a car lighting circuit to control some LED strips. As there are a number of ways to do that, I thought I'd go through some of my ideas here. This video is a bit more technical and less flashy than the last few, so if that's not you're thing you can skip this one!
GitHub page for schematics and code: github.com/s-marley/CarLights
Falstad circuit simulator: www.falstad.com/circuit/circu...
More details on optocouplers: learnabout-electronics.org/Se...
If you've found this useful and you'd like to support me to create more stuff, you can now buy me a coffee: www.buymeacoffee.com/scottmar... or buy something from Amazon UK or US at the links below. As an Amazon Associate I earn from qualifying purchases from the links below. It doesn't cost you any more and it helps me to keep making videos!
Amazon UK
3 Pack or Arduino nano: amzn.to/2OWmvJR
Amazon US
3 Pack or Arduino nano: amzn.to/3sppDvw
00:00​ - Intro
01:30 - Potential divider
03:14 - Zener diode
04:37 - Schottky diode
05:22 - Optocoupler
07:19 - Final schematic
08:35 - Hardware build
09:31 - Testing

Пікірлер: 109
@duanebeyer950
@duanebeyer950 2 жыл бұрын
This would have a very piratical use in creating a wiring harness for a trailer. They sell for $150 to $200 US and do the same thing. This looks like a much more reasonable option and will protect the signal lighting in you car when hooking up a trailer. The days of just tapping into the lights for a trailer is gone with all new cars. This looks like a inexpensive alternative. Good stuff and WELL explained. Thanks.
@AW-Services
@AW-Services 7 ай бұрын
Beautifully delivered presentation and project planning. My best tip for vehicle lighting cluster modification is to not bother... but if you do want to proceed dont hack apart your OEM units and purchase some non OEM aftermarket ones. Taking apart lighting can be tricky. Some are ultrasonic high frequently welded. Some are bonded with polyurethane. Dont forget that plastic is a thermoplastic and baking them in the oven can cause irreversible damage
@jesse.vr6
@jesse.vr6 6 ай бұрын
That diagram visualizer website is badass. Definitely gonna use it on all my future projects.
@livetohash6152
@livetohash6152 2 ай бұрын
That's fantastic!! Exactly what I needed for trailer!!
@juanignacioschulz5015
@juanignacioschulz5015 3 жыл бұрын
Excellent video, as always!
@schlotdoglaser
@schlotdoglaser 3 жыл бұрын
Weird....I was just working on your tutorials.....LOVING IT. What I am wanting to learn is to control the light to glow brighter and dim randomly.
@ScottMarley
@ScottMarley 3 жыл бұрын
If you want 'smooth random' you want the noise functions! They're not intuitive, but I do have a video about them.
@schlotdoglaser
@schlotdoglaser 3 жыл бұрын
@@ScottMarley is it in the FASTLed tutorials?. I have watched all 6 and re-watching them again
@ScottMarley
@ScottMarley 3 жыл бұрын
@@schlotdoglaser yes, episode 6. There I mostly use noise for color changes, but you can apply it to whatever variable you like.
@Dqnc0rp
@Dqnc0rp 3 жыл бұрын
Great video again. It's not just the result but all the reflections that led to it. It's very interesting and despite the language barrier I learn a lot from each video. Thanks again Scott for this tutorial.
@ScottMarley
@ScottMarley 3 жыл бұрын
Thank you! Sorry I speak so quickly, it must be difficult for non-native speakers.
@tjay187
@tjay187 2 жыл бұрын
Thanks for the great video! I finally got the answer about the nano booting fast enough!
@misaelsantos7690
@misaelsantos7690 3 жыл бұрын
your channel is amazing dude, saludos desde mexico, espero algun dia mas personas te conozcan
@smallcows4721
@smallcows4721 3 жыл бұрын
GREAT VIDEO 👍 I Hope I can re create this once I get my own car
@ScottMarley
@ScottMarley 3 жыл бұрын
Thank you!
@andystewart9405
@andystewart9405 Жыл бұрын
Great video 👌🏻
@thecrispyfrog
@thecrispyfrog 2 жыл бұрын
Hi Scott, great video as usual - keep them coming. Q - will the same Zener diode method work with 24V vehicle electrics?
@bunnylove273
@bunnylove273 3 жыл бұрын
Hi bud what a interesting vid thanks for sharing 👍
@gsuberland
@gsuberland 3 жыл бұрын
I was shaking my head so hard when you suggested the potential divider. Automotive voltages are horribly noisy and variable! Very glad you changed tact to a zener.
@ScottMarley
@ScottMarley 3 жыл бұрын
Haha, a potential divider would have been a terrible idea ;)
@user-np4pb9fz8x
@user-np4pb9fz8x Жыл бұрын
You're a genius!
@rtvlogames3708
@rtvlogames3708 8 ай бұрын
Compliments on the video! It's a simple but detailed explaination. I was just wondering if it was possible to use a 5.5V, 0.33F or 0.47F super capacitor after the buck converter to keep the arduino running between the blinks so that a more complicated animation can run. Seen as I wanted to use about 64 leds in one blinker with an arduino, converter and capacitor each, I though 0.33F would be enough capacity to keep everything running. Does this work with the diodes you named D2 or D3 in your schematic? Just to confirm my thoughts... Also, if it worked, do I need to decrease the resistor you named R7 in your schematic because of the increased powerdraw of the charging capacitor?
@latenightas5138
@latenightas5138 2 жыл бұрын
Hello, I was wondering what the setup would be for say an led matrix sequential for the turn signal?
@SimonPlatten
@SimonPlatten Жыл бұрын
Great work, I start work on almost the same with my Audi, I was trying to interface to the CANBus network, I now have a Peugeot e-208. I would like to investigate further your setup. I would also like to add brakes, reverse and night lights.
@GodmanchesterGoblin
@GodmanchesterGoblin 3 жыл бұрын
Interesting stuff - thanks for the video. If I may make one comment on supply voltages... Automotive can be an engineer's nightmare. Cold-cranking can lower the 12V down to 6V or so in some cases. And beware the load-dump spikes. Solenoids and motors can throw all kinds of junk onto the 12V supply, and short spikes in excess of 50V are not unknown. So you did the right thing with your input clamps, but you should perhaps consider the supply regulators that they use (and their input capacitors or other filter protection) to avoid nasty surprises.
@ScottMarley
@ScottMarley 3 жыл бұрын
Thanks for the advice! I was reluctant to put too much capacitance on the power input, as I presumed that would delay the boot of the Arduino (I might be wrong here, I'm no expert!). Or are you saying to make sure that any components on the power input should be rated much higher than might otherwise be the case? Or some kind of choke perhaps on the power in? It was an interesting thing to look into and is just an experiment really, always happy to learn though!
@GodmanchesterGoblin
@GodmanchesterGoblin 3 жыл бұрын
@@ScottMarley I was basically trying to say that you need to ensure that the parts on the input have an adequate voltage rating. Specifically rated regulators are often rated with maximum input voltages up to 60V or so. They should not run like that normally (too much power loss) but they will not get destroyed by the spikes. Due to battery the voltage drop on cold starts, regulators with minimum voltage low drop may also be specified. I am not suggesting you should follow this guide, but it gives some good pointers regarding the problems to avoid... www.ti.com/lit/an/snva681a/snva681a.pdf?ts=1618885870959
@ScottMarley
@ScottMarley 3 жыл бұрын
@@GodmanchesterGoblin really useful, thank you very much.
@williamlowry6890
@williamlowry6890 4 ай бұрын
Hi mate I know this is a bit of an old video but I was wondering if there would be any possible way of making the brake light section be like the taillights that are dim red when not braking and bright when braking I’m wanting to replace the rear windscreen middle taillight/brake light to something like that and also how would I go about that please and thank you
@artemmaistrenko1032
@artemmaistrenko1032 Жыл бұрын
What if I have the input signal made for WS2812B leds and I want to convert it to regular signal for break light in a car lamp? Is it possible?
@stevechung3595
@stevechung3595 11 ай бұрын
regarding to the brake light. how to make it has 2 levels of lighting?like taillight + brakelight
@fringeanomaly9284
@fringeanomaly9284 Жыл бұрын
hey Scott how could I write this program in such a way that when indicator is pressed the pattern repeats for a certain time and shuts off after that time ?
@larryr8492
@larryr8492 3 жыл бұрын
Nice. Question: Why not use 12volt LED strip and relay system for inputs? 12v coil on relay will handle auto voltage changes and SPDT can toggle between 5v and ground from nano to prevent float. What potential problems could this create?
@ScottMarley
@ScottMarley 3 жыл бұрын
You'd have to be careful regarding the voltage you are supplying to the strips remember when a car is running, the battery voltage is more like 14.5V with spikes well above this. 12V LED strips might be ok with this, or they might not, I haven't tried. You might have to put a buck / boost converter in front of the strips to give them a constant 12V. You could absolutely use relays for this, I just decided to go for all solid-state.
@YanLipavsky
@YanLipavsky 11 ай бұрын
Super !
@JH09SUMIT
@JH09SUMIT Жыл бұрын
How do I get them to stationary white after the turn signal switch is turned off?
@OldePhart
@OldePhart 3 жыл бұрын
what were you using for your voltage simulation?
@ScottMarley
@ScottMarley 3 жыл бұрын
I'm using www.falstad.com/circuit/circuitjs.html. It's great, I use it a bunch!
@androkolikk
@androkolikk 11 ай бұрын
Hello. I have a different project, but I can't find a solution. Your video looks good. There are 2 different places where I get 12v energy. When the capacitor is connected to the place where I first get energy (mirror floor lighting), the vehicle cuts the energy. If I do not connect a capacitor to the 12v part I get from the signal, the sliding signal does not work properly. This goes to the 12v regulator I bought from two different places. I am waiting for your help.
@girrrrrrr2
@girrrrrrr2 2 жыл бұрын
Im looking into implementing this for my motorcycle as an addon to the existing lights. I was wondering, is there a way to do this same thing, but have the brake lights and the blinkers on the same strip? My idea was to have the lights red when braking and then when turning blink them, and when neither have them glow white or something that way im more visible. Along with that is there a way to have it change led colors in segments? So lets say for example that I have a single strip that runs around the motorcycle, and i want to change leds 1-20 red, the 21-50 white and so on. I believe there is with some modification to the code, I just want to make sure before I get too far.
@ScottMarley
@ScottMarley 2 жыл бұрын
Anything is possible of course :) check out my FastLED basics videos if you want to learn how to code your own patterns. Good luck with the project!
@luigidedom3570
@luigidedom3570 6 ай бұрын
could you add an option for the rear park lights
@bangunsetyoanggoro6156
@bangunsetyoanggoro6156 3 жыл бұрын
Nice
@VMalthane
@VMalthane 3 жыл бұрын
Hi, I would like to know the details of software you are using for electronic simulation ? Your projects are highly impressive and I recommended to my students.
@ScottMarley
@ScottMarley 3 жыл бұрын
Thank you www.falstad.com/circuit/circuitjs.html
@livetohash6152
@livetohash6152 2 ай бұрын
My question is, how do you remove the bulb, to use the led, in such a way they don't fast blink??
@darkphotons101
@darkphotons101 3 жыл бұрын
Awesome project, interesting idea using the power directly from the lights. I assume you programmed the Arduino directly without a bootloader to minimise the powerup delay?
@ScottMarley
@ScottMarley 3 жыл бұрын
I thought I might have to do that, but in the end the delay on the car brake light compared to the LEDs is only perhaps 100-200ms which I thought was acceptable. So in the end I left the stock bootloader in place.
@Marc_Miller
@Marc_Miller 3 жыл бұрын
@@ScottMarley I wondered about this too. Seems like it works just fine. Keep it simple. :)
@chrisroberts7573
@chrisroberts7573 3 жыл бұрын
Could you show the same on a multicoloured led single strip. Also add reverse and side light
@ScottMarley
@ScottMarley 3 жыл бұрын
These are multicoloured strips, so you can make them any colour or pattern you like! I just stuck with the traditional colours in this example.
@craigrobinson6812
@craigrobinson6812 3 жыл бұрын
Hey great work! is it possible to add a "power hold" feature so that it can have a "switch off " animation and unit can turn itself off?
@ScottMarley
@ScottMarley 3 жыл бұрын
Not in the way I've done it where it gets the power from the lights themselves. You could do it of you wired it into the permeant 12V supply from the car, but that would involve running a power cable to the battery or some other circuit that was always powered
@craigrobinson6812
@craigrobinson6812 3 жыл бұрын
@@ScottMarley in my current setup I do run a permenant power already so this is no problem, a couple transistors and some code to hold them on would work well I think!
@grantayson7938
@grantayson7938 2 жыл бұрын
Hi Scott your video is incredible well done and incredible informative I have already learned so many new things and have also started following the fast led basics and more on your channel. I understand the 5v1 Zener diodes and the schottky Diode to some degree but not where to extract/insert the signal wire to activate from indicator or brake. For a slightly different project I would like to replicate your circuit and have looked at schematics but struggling slightly to iterate how the flow runs on the actual hardware when connected to the car. In your example you still have the push buttons(just to show on desk) and then also included signal from the car. If I was to only use signal from the car those switches will come out but would I need to bridge the gap or put in something in its place that's the only part I don't quiet fully understand
@ScottMarley
@ScottMarley 2 жыл бұрын
Thank you! The buttons would be replaced with the wires that normally go to the car light bulbs.
@grantayson7938
@grantayson7938 2 жыл бұрын
@@ScottMarley thanks for your speedy reply. Again I am super impressed with how the video is done really well explained, just as I said got lost from where you built it on hardware and to putting in the car and doing the testing. Awesome to see it in action. I have a screenshot of your hardware setup. It's a little difficult to see where the vehicle wires are inserted but I bought all my components and have a buck converter so going to try replicate on my bread board and then follow schematic to see how it all runs and flows from input to arduino and then arduino to the led strip. Reading through some of these comments getting a little bit of extra insight like the one comment of on cold starts with voltage drop would that put any stress on the system. And Is there a way to overcome the voltage drop or at least not have it affect these components? Or do I need to relook at what components to use especially if longevity is in mind. Then on a slightly different note, how do you get an rgb strip to show the amber like in newer cars example like with Audi sequential indicators or do they use a strip with a dedicated amber. Ive Watched episode 2 of your fast led and again very informative but then makes me wonder If possible to get that color. I've been messing around on the CHSV and with CRGB to get there but it either goes more red or more yellow not getting that proper amber color with brightness
@RGBW-DRL
@RGBW-DRL 2 жыл бұрын
I want to make this .how can I make a coutome board like this
@eRiCrAvEn28
@eRiCrAvEn28 3 жыл бұрын
Very Informative video SIR! Thank you... by the way sir, can you make the Hazard be animated both left and right at the same time too because I noticed it blinks normally? What will be the code? Thanks in Advance!
@ScottMarley
@ScottMarley 3 жыл бұрын
As everything is programmable you can make it do whatever you like! Look at the code I've used for the indicators and it should be simple enough to apply it to the hazards.
@theuglyhiccup8956
@theuglyhiccup8956 3 жыл бұрын
I've been watching your fastled videos! They are really good. I was trying to make a brake light for my bike and was wondering could this setup be paired with an accelerometer to brighten the led when the bike slows down? Say as in have regular running mode, and when it slows down it gets brighter. With a rapid sudden stop it gets even brighter. And then dim back down to the regular running mode. 🤔
@ScottMarley
@ScottMarley 3 жыл бұрын
Absolutely. I'd recommend an i2c accelerometer. There's plenty of tutorials if you search for Arduino i2c accelerometer.
@grantayson7938
@grantayson7938 2 жыл бұрын
Hi Scott. Would like to find out from you if you had to burn the bootloader for this nano you are using. I see there is no delay when you click the test buttons or when you habe connected directly to the car. I have everything running correctly and connected right but because the arduino does not have consistent 5v power it delays 1-2 seconds before the sketch runs after giving signal via button or from vehicle
@ScottMarley
@ScottMarley 2 жыл бұрын
I didn't have to, but I know others have needed to do so. It must depend on what bootloader comes preinstalled.
@grantayson7938
@grantayson7938 2 жыл бұрын
@@ScottMarley are there different bootloaders you can run while still using the arduino ide ? I don't understand if you don't mind explaining on the bootloader
@ScottMarley
@ScottMarley 2 жыл бұрын
@@grantayson7938 I'm sorry I don't have any experience in using different bootloader as it's always worked fine for me without messing with it. You might have to search online, or perhaps ask on the Arduino subreddit.
@grantayson7938
@grantayson7938 2 жыл бұрын
@@ScottMarley Thank you
@grantayson7938
@grantayson7938 2 жыл бұрын
I just did some research on uploading via a programmer(arduino uno or other) in my case using a uno to program a nano. I turned the uno into a programmer and the nano as the target quite a simple process and pin connection then hit upload via programmer and it loads sketch without a bootloader. This was my fix and now the nano starts immediately with power on
@rajureiki1922
@rajureiki1922 Жыл бұрын
super duper i like it
@vipinvg2048
@vipinvg2048 2 жыл бұрын
Which software using for stimulation
@ScottMarley
@ScottMarley 2 жыл бұрын
Link in the description
@TagFul19
@TagFul19 3 жыл бұрын
We had the same idea gg xD
@razvaniovan6213
@razvaniovan6213 2 жыл бұрын
Hello.could you please tell me a code or link to buy the 5v buck regulator module please?
@ScottMarley
@ScottMarley 2 жыл бұрын
The one you use depends on the amount of lights you have and therefore the amount of current you need. If it's a small installation, look for something around 2A or above. Something like this www.amazon.co.uk/dp/B0823P6PW6/ref=cm_sw_r_awdo_navT_g_PYWMY9E6BN4ACYH4EA9F but you can get them much cheaper from eBay. Make sure you adjust it to 5V before using it though!
@razvaniovan6213
@razvaniovan6213 2 жыл бұрын
@@ScottMarley Thank you
@vishalvaradraj2
@vishalvaradraj2 2 жыл бұрын
Thanks for the information. I was wondering if you could help me out with an arduino I’m trying to design for my car. Is there an email I can reach out to so that I can better explain the details? Tia
@ScottMarley
@ScottMarley 2 жыл бұрын
I'm sorry, I dont have time to help people out personally I'm afraid.
@marcosdasilva7409
@marcosdasilva7409 3 жыл бұрын
SHOW. 👍
@SwapnilBBagul
@SwapnilBBagul 2 жыл бұрын
Dear Scott, I need help for project based on this video. How can I contact you? Social media/email either should do.
@ScottMarley
@ScottMarley 2 жыл бұрын
Sorry, I can't offer individual help. Good luck with your project.
@malnilantha4419
@malnilantha4419 3 жыл бұрын
Try to make a complete light system ... turn, park, break, (front and rear) also with some strobe light , knight rider as an option.
@ScottMarley
@ScottMarley 3 жыл бұрын
I don't want to do that as I have no need for it, but if you wanted to then this is a good starting point!
@muzammilali9700
@muzammilali9700 2 жыл бұрын
kindly share the Arduino Code file and wiring drawing please...
@ScottMarley
@ScottMarley 2 жыл бұрын
GitHub page is in the description
@RolanJerrier
@RolanJerrier 3 жыл бұрын
Hi there… So I wired up your schematic to my vehicle, it's works perfect. I am using a single strip LED 2812b. I am also using a different code. Thanx
@ScottMarley
@ScottMarley 3 жыл бұрын
Awesome, glad to hear!
@RolanJerrier
@RolanJerrier 3 жыл бұрын
Hi I hope you can assist me here… I need to program an arduino nano with the animation as in the link. The word Nissan to be a different colour & the circle - white. Thanx kzbin.info/www/bejne/jqjSXnltj5lsrrM
@JustADumbTrucker
@JustADumbTrucker 2 жыл бұрын
@Rolan May I please have your code? I've been trying to figure out how to do all three functions on a single strip, but I am stumped! How do you create "zones" for the indicators and brake lamps? Also, I would like to have receding indicators like on the new Mustang Mach-E > kzbin.info/www/bejne/f2aTpniqlKtmg9k but I can't figure that out either!
@stephengrattage5219
@stephengrattage5219 3 жыл бұрын
Any chance of a Oled tutorial?
@ScottMarley
@ScottMarley 3 жыл бұрын
I'm about to out something up involving an OLED, but it's not focussed on the OLED as such. Is there something specific you were interested in?
@stephengrattage5219
@stephengrattage5219 3 жыл бұрын
@@ScottMarley i found your neo pixel videos very useful and just thought a video on how to create basic displays on oled screens would be a nice addition to them.
@ScottMarley
@ScottMarley 3 жыл бұрын
@@stephengrattage5219 ok, well you might find my next video and example code at least a little bit useful, it depends on how far you've got yourself! Glad you enjoyed the FastLED stuff.
@jeremyboven
@jeremyboven 2 жыл бұрын
How in the hell can I download the code. Theres no download link
@ScottMarley
@ScottMarley 2 жыл бұрын
Have you looked in the description?
@jeremyboven
@jeremyboven 2 жыл бұрын
Also I believe u can reduce the delay for brake, as even a couple hundred milliseconds can be the difference from having your rear end smashed. Lol believe theres a pre determined delay that can be reduced. To 50ms
@ScottMarley
@ScottMarley 2 жыл бұрын
@@jeremyboven go for it. This is just a proof of concept, I'd never use this on a real vehicle.
@kevinlcarlson
@kevinlcarlson Жыл бұрын
What about a buck converter?
@ScottMarley
@ScottMarley Жыл бұрын
You would need a buck convertor for each input (so three here) which seems massively overkill for something you can do with three diodes. Also, some buck converters need a minimum load on them to work stably. Here, there would be basically no load.
@kirklishman8997
@kirklishman8997 Жыл бұрын
Doesn't this interfere with your car radio when braking!!
@ScottMarley
@ScottMarley Жыл бұрын
Not that I've noticed? Is there a reason why it should?
@kirklishman8997
@kirklishman8997 Жыл бұрын
@@ScottMarley interferes with the radio .. buck regulator
@general23cmp
@general23cmp 2 жыл бұрын
Why not use a 5v regulator? I’m not an electrical expert.
@ScottMarley
@ScottMarley 2 жыл бұрын
You could do that, as I mentioned in the video, there are loads of ways you could make this work :)
@nitinmahanure1988
@nitinmahanure1988 Жыл бұрын
This code is not run
@killmind
@killmind 3 жыл бұрын
TÜV sagt nein!
@darkphotons101
@darkphotons101 3 жыл бұрын
Hence the disclaimer
@NE_boy
@NE_boy 11 ай бұрын
Complicated
FastLED Basics Episode 1 - Getting started
17:59
Scott Marley
Рет қаралды 272 М.
DIY Sequential LED Turn signals for any car.
9:11
chems
Рет қаралды 167 М.
Опасность фирменной зарядки Apple
00:57
SuperCrastan
Рет қаралды 12 МЛН
A little girl was shy at her first ballet lesson #shorts
00:35
Fabiosa Animated
Рет қаралды 17 МЛН
Best Toilet Gadgets and #Hacks you must try!!💩💩
00:49
Poly Holy Yow
Рет қаралды 22 МЛН
WORLD'S SHORTEST WOMAN
00:58
Stokes Twins
Рет қаралды 127 МЛН
DIY LED Brake Light | Arduino Controlled
7:08
IMEE MADE
Рет қаралды 46 М.
Controlling WS2812B RGB LEDs
6:34
Anas Kuzechie
Рет қаралды 44 М.
Watch this before buying LEDs
19:47
Fix This Build That
Рет қаралды 2,3 МЛН
I’m Never Buying LEDs Again! EASY DIY WLED!
13:11
TechFlow
Рет қаралды 1,2 МЛН
Частая ошибка геймеров? 😐 Dareu A710X
1:00
Вэйми
Рет қаралды 5 МЛН
Какой ноутбук взять для учёбы? #msi #rtx4090 #laptop #юмор #игровой #apple #shorts
0:18
Look, this is the 97th generation of the phone?
0:13
Edcers
Рет қаралды 8 МЛН
Looks very comfortable. #leddisplay #ledscreen #ledwall #eagerled
0:19
LED Screen Factory-EagerLED
Рет қаралды 12 МЛН
iPhone socket cleaning #Fixit
0:30
Tamar DB (mt)
Рет қаралды 18 МЛН
Yanlışlıkla Telefonumu Parçaladım!😱
0:18
Safak Novruz
Рет қаралды 817 М.