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

Ғылым және технология

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

  • @livetohash6152
    @livetohash6152Ай бұрын

    That's fantastic!! Exactly what I needed for trailer!!

  • @duanebeyer950
    @duanebeyer9502 жыл бұрын

    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.

  • @jesse.vr6
    @jesse.vr64 ай бұрын

    That diagram visualizer website is badass. Definitely gonna use it on all my future projects.

  • @AW-Services
    @AW-Services6 ай бұрын

    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

  • @juanignacioschulz5015
    @juanignacioschulz50153 жыл бұрын

    Excellent video, as always!

  • @misaelsantos7690
    @misaelsantos76903 жыл бұрын

    your channel is amazing dude, saludos desde mexico, espero algun dia mas personas te conozcan

  • @tjay187
    @tjay1872 жыл бұрын

    Thanks for the great video! I finally got the answer about the nano booting fast enough!

  • @schlotdoglaser
    @schlotdoglaser3 жыл бұрын

    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
    @Dqnc0rp3 жыл бұрын

    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.

  • @gsuberland
    @gsuberland3 жыл бұрын

    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 ;)

  • @smallcows4721
    @smallcows47213 жыл бұрын

    GREAT VIDEO 👍 I Hope I can re create this once I get my own car

  • @ScottMarley

    @ScottMarley

    3 жыл бұрын

    Thank you!

  • @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.

  • @andystewart9405
    @andystewart9405 Жыл бұрын

    Great video 👌🏻

  • @user-np4pb9fz8x
    @user-np4pb9fz8x Жыл бұрын

    You're a genius!

  • @bunnylove273
    @bunnylove2733 жыл бұрын

    Hi bud what a interesting vid thanks for sharing 👍

  • @thecrispyfrog
    @thecrispyfrog Жыл бұрын

    Hi Scott, great video as usual - keep them coming. Q - will the same Zener diode method work with 24V vehicle electrics?

  • @YanLipavsky
    @YanLipavsky10 ай бұрын

    Super !

  • @GodmanchesterGoblin
    @GodmanchesterGoblin3 жыл бұрын

    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.

  • @latenightas5138
    @latenightas51382 жыл бұрын

    Hello, I was wondering what the setup would be for say an led matrix sequential for the turn signal?

  • @rtvlogames3708
    @rtvlogames37087 ай бұрын

    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?

  • @bangunsetyoanggoro6156
    @bangunsetyoanggoro61563 жыл бұрын

    Nice

  • @stevechung3595
    @stevechung359510 ай бұрын

    regarding to the brake light. how to make it has 2 levels of lighting?like taillight + brakelight

  • @grantayson7938
    @grantayson79382 жыл бұрын

    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

  • @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 ?

  • @williamlowry6890
    @williamlowry68903 ай бұрын

    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?

  • @larryr8492
    @larryr84923 жыл бұрын

    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.

  • @VMalthane
    @VMalthane2 жыл бұрын

    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

    2 жыл бұрын

    Thank you www.falstad.com/circuit/circuitjs.html

  • @luigidedom3570
    @luigidedom35705 ай бұрын

    could you add an option for the rear park lights

  • @darkphotons101
    @darkphotons1013 жыл бұрын

    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. :)

  • @JH09SUMIT
    @JH09SUMIT Жыл бұрын

    How do I get them to stationary white after the turn signal switch is turned off?

  • @eRiCrAvEn28
    @eRiCrAvEn283 жыл бұрын

    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.

  • @androkolikk
    @androkolikk10 ай бұрын

    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 Жыл бұрын

    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

    Жыл бұрын

    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!

  • @rajureiki1922
    @rajureiki1922 Жыл бұрын

    super duper i like it

  • @livetohash6152
    @livetohash615226 күн бұрын

    My question is, how do you remove the bulb, to use the led, in such a way they don't fast blink??

  • @chrisroberts7573
    @chrisroberts75733 жыл бұрын

    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
    @craigrobinson68123 жыл бұрын

    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!

  • @marcosdasilva7409
    @marcosdasilva74093 жыл бұрын

    SHOW. 👍

  • @OldePhart
    @OldePhart3 жыл бұрын

    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!

  • @grantayson7938
    @grantayson79382 жыл бұрын

    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

  • @RGBW-DRL
    @RGBW-DRL Жыл бұрын

    I want to make this .how can I make a coutome board like this

  • @malnilantha4419
    @malnilantha44193 жыл бұрын

    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!

  • @theuglyhiccup8956
    @theuglyhiccup89563 жыл бұрын

    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.

  • @TagFul19
    @TagFul193 жыл бұрын

    We had the same idea gg xD

  • @RolanJerrier
    @RolanJerrier3 жыл бұрын

    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 kzread.info/dash/bejne/iqujj6hwipefqLQ.html

  • @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 > kzread.info/dash/bejne/e2lk16etj6mZfdo.html but I can't figure that out either!

  • @razvaniovan6213
    @razvaniovan62132 жыл бұрын

    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
    @vishalvaradraj22 жыл бұрын

    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.

  • @SwapnilBBagul
    @SwapnilBBagul2 жыл бұрын

    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.

  • @vipinvg2048
    @vipinvg20482 жыл бұрын

    Which software using for stimulation

  • @ScottMarley

    @ScottMarley

    2 жыл бұрын

    Link in the description

  • @stephengrattage5219
    @stephengrattage52193 жыл бұрын

    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.

  • @muzammilali9700
    @muzammilali97002 жыл бұрын

    kindly share the Arduino Code file and wiring drawing please...

  • @ScottMarley

    @ScottMarley

    2 жыл бұрын

    GitHub page is in the description

  • @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
    @general23cmp2 жыл бұрын

    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 :)

  • @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.

  • @jeremyboven
    @jeremyboven2 жыл бұрын

    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.

  • @nitinmahanure1988
    @nitinmahanure1988 Жыл бұрын

    This code is not run

  • @killmind
    @killmind3 жыл бұрын

    TÜV sagt nein!

  • @darkphotons101

    @darkphotons101

    3 жыл бұрын

    Hence the disclaimer

  • @NE_boy
    @NE_boy10 ай бұрын

    Complicated

Келесі