Тёмный

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

Scott Marley
Подписаться 14 тыс.
Просмотров 53 тыс.
50% 1

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

Наука

Опубликовано:

 

19 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 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.
@livetohash6152
@livetohash6152 Месяц назад
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
@tjay187
@tjay187 2 года назад
Thanks for the great video! I finally got the answer about the nano booting fast enough!
@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.
@smallcows4721
@smallcows4721 3 года назад
GREAT VIDEO 👍 I Hope I can re create this once I get my own car
@ScottMarley
@ScottMarley 3 года назад
Thank you!
@thecrispyfrog
@thecrispyfrog 2 года назад
Hi Scott, great video as usual - keep them coming. Q - will the same Zener diode method work with 24V vehicle electrics?
@andystewart9405
@andystewart9405 Год назад
Great video 👌🏻
@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.
@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 ;)
@bunnylove273
@bunnylove273 3 года назад
Hi bud what a interesting vid thanks for sharing 👍
@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.
@user-np4pb9fz8x
@user-np4pb9fz8x Год назад
You're a genius!
@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?
@latenightas5138
@latenightas5138 2 года назад
Hello, I was wondering what the setup would be for say an led matrix sequential for the turn signal?
@YanLipavsky
@YanLipavsky 10 месяцев назад
Super !
@stevechung3595
@stevechung3595 11 месяцев назад
regarding to the brake light. how to make it has 2 levels of lighting?like taillight + brakelight
@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.
@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
@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. :)
@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?
@bangunsetyoanggoro6156
@bangunsetyoanggoro6156 3 года назад
Nice
@VMalthane
@VMalthane 2 года назад
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
@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 ?
@luigidedom3570
@luigidedom3570 6 месяцев назад
could you add an option for the rear park lights
@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
@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!
@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.
@JH09SUMIT
@JH09SUMIT Год назад
How do I get them to stationary white after the turn signal switch is turned off?
@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.
@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!
@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!
@TagFul19
@TagFul19 3 года назад
We had the same idea gg xD
@RGBW-DRL
@RGBW-DRL Год назад
I want to make this .how can I make a coutome board like this
@rajureiki1922
@rajureiki1922 Год назад
super duper i like it
@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.
@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
@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.
@marcosdasilva7409
@marcosdasilva7409 3 года назад
SHOW. 👍
@livetohash6152
@livetohash6152 Месяц назад
My question is, how do you remove the bulb, to use the led, in such a way they don't fast blink??
@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!
@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.
@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 ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Xwo-F7Z49xQ.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 > ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-I50uEt_F3Mw.html but I can't figure that out either!
@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
@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.
@vipinvg2048
@vipinvg2048 2 года назад
Which software using for stimulation
@ScottMarley
@ScottMarley 2 года назад
Link in the description
@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.
@muzammilali9700
@muzammilali9700 2 года назад
kindly share the Arduino Code file and wiring drawing please...
@ScottMarley
@ScottMarley 2 года назад
GitHub page is in the description
@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.
@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 :)
@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
@killmind
@killmind 3 года назад
TÜV sagt nein!
@darkphotons101
@darkphotons101 3 года назад
Hence the disclaimer
@nitinmahanure1988
@nitinmahanure1988 Год назад
This code is not run
@NE_boy
@NE_boy 10 месяцев назад
Complicated
Далее
FastLED Basics Episode 1 - Getting started
17:59
Просмотров 271 тыс.
DIY Sequential LED Turn signals for any car.
9:11
Просмотров 166 тыс.
Beautiful gymnastics 😍☺️
00:15
Просмотров 2,8 млн
Controlling WS2812B RGB LEDs
6:34
Просмотров 43 тыс.
12V WS2812B 3-wire LED Strip with Arduino Uno
10:15
Просмотров 57 тыс.
Watch this before buying LEDs
19:47
Просмотров 2,2 млн
I’m Never Buying LEDs Again! EASY DIY WLED!
13:11
Просмотров 1,2 млн
EASY Custom Sequential LED Turn Signals
8:01
Просмотров 45 тыс.
Смело ставь iOS 18
0:57
Просмотров 277 тыс.
Здесь упор в процессор
18:02
Просмотров 362 тыс.