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

Поділитися
Вставка
  • Опубліковано 16 лип 2024
  • 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 роки тому +8

    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.

  • @livetohash6152
    @livetohash6152 Місяць тому +1

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

  • @juanignacioschulz5015
    @juanignacioschulz5015 3 роки тому

    Excellent video, as always!

  • @AW-Services
    @AW-Services 6 місяців тому

    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 5 місяців тому

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

  • @misaelsantos7690
    @misaelsantos7690 3 роки тому

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

  • @schlotdoglaser
    @schlotdoglaser 3 роки тому +1

    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 роки тому +1

      @@ScottMarley is it in the FASTLed tutorials?. I have watched all 6 and re-watching them again

    • @ScottMarley
      @ScottMarley  3 роки тому +2

      @@schlotdoglaser yes, episode 6. There I mostly use noise for color changes, but you can apply it to whatever variable you like.

  • @tjay187
    @tjay187 2 роки тому

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

  • @Dqnc0rp
    @Dqnc0rp 3 роки тому +1

    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.

  • @smallcows4721
    @smallcows4721 3 роки тому

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

  • @andystewart9405
    @andystewart9405 Рік тому

    Great video 👌🏻

  • @gsuberland
    @gsuberland 3 роки тому +2

    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 роки тому +1

      Haha, a potential divider would have been a terrible idea ;)

  • @bunnylove273
    @bunnylove273 3 роки тому +1

    Hi bud what a interesting vid thanks for sharing 👍

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

  • @user-np4pb9fz8x
    @user-np4pb9fz8x Рік тому

    You're a genius!

  • @thecrispyfrog
    @thecrispyfrog Рік тому +1

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

  • @rtvlogames3708
    @rtvlogames3708 7 місяців тому

    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?

  • @GodmanchesterGoblin
    @GodmanchesterGoblin 3 роки тому +2

    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 роки тому +2

      @@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 роки тому +1

      @@GodmanchesterGoblin really useful, thank you very much.

  • @YanLipavsky
    @YanLipavsky 10 місяців тому

    Super !

  • @bangunsetyoanggoro6156
    @bangunsetyoanggoro6156 3 роки тому

    Nice

  • @latenightas5138
    @latenightas5138 2 роки тому

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

  • @stevechung3595
    @stevechung3595 11 місяців тому

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

  • @darkphotons101
    @darkphotons101 3 роки тому +1

    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 роки тому +2

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

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

  • @luigidedom3570
    @luigidedom3570 6 місяців тому

    could you add an option for the rear park lights

  • @VMalthane
    @VMalthane 2 роки тому +1

    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 роки тому +4

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

  • @marcosdasilva7409
    @marcosdasilva7409 3 роки тому

    SHOW. 👍

  • @rajureiki1922
    @rajureiki1922 Рік тому

    super duper i like it

  • @larryr8492
    @larryr8492 3 роки тому +1

    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.

  • @JH09SUMIT
    @JH09SUMIT Рік тому

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

  • @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 роки тому +1

      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.

  • @TagFul19
    @TagFul19 3 роки тому

    We had the same idea gg xD

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

  • @OldePhart
    @OldePhart 3 роки тому +1

    what were you using for your voltage simulation?

    • @ScottMarley
      @ScottMarley  3 роки тому +1

      I'm using www.falstad.com/circuit/circuitjs.html. It's great, I use it a bunch!

  • @williamlowry6890
    @williamlowry6890 3 місяці тому

    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

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

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

  • @RGBW-DRL
    @RGBW-DRL Рік тому

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

  • @girrrrrrr2
    @girrrrrrr2 2 роки тому +1

    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 роки тому +1

      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!

  • @chrisroberts7573
    @chrisroberts7573 3 роки тому +1

    Could you show the same on a multicoloured led single strip.
    Also add reverse and side light

    • @ScottMarley
      @ScottMarley  3 роки тому +2

      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.

  • @livetohash6152
    @livetohash6152 Місяць тому

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

  • @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 роки тому +1

      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!

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

  • @vipinvg2048
    @vipinvg2048 2 роки тому

    Which software using for stimulation

  • @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 роки тому +1

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

  • @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 роки тому +3

      Absolutely. I'd recommend an i2c accelerometer. There's plenty of tutorials if you search for Arduino i2c accelerometer.

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

  • @razvaniovan6213
    @razvaniovan6213 2 роки тому

    Hello.could you please tell me a code or link to buy the 5v buck regulator module please?

    • @ScottMarley
      @ScottMarley  2 роки тому +1

      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

  • @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
      ua-cam.com/video/Xwo-F7Z49xQ/v-deo.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 > ua-cam.com/video/I50uEt_F3Mw/v-deo.html 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.

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

  • @muzammilali9700
    @muzammilali9700 2 роки тому

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

    • @ScottMarley
      @ScottMarley  2 роки тому

      GitHub page is in the description

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

  • @general23cmp
    @general23cmp 2 роки тому

    Why not use a 5v regulator? I’m not an electrical expert.

    • @ScottMarley
      @ScottMarley  2 роки тому +2

      You could do that, as I mentioned in the video, there are loads of ways you could make this work :)

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

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

  • @nitinmahanure1988
    @nitinmahanure1988 Рік тому

    This code is not run

  • @killmind
    @killmind 3 роки тому

    TÜV sagt nein!

  • @NE_boy
    @NE_boy 10 місяців тому

    Complicated