Help with sequential LED delay - ATTINY

Thread Starter

hendrik6073

Joined Apr 23, 2023
4
Something like this, see attached.

Code in C or Bascom Basic or Arduino IDE. Program code into chip with Arduino.

https://create.arduino.cc/projecthub/arjun/programming-attiny85-with-arduino-uno-afb829

hi, this is a old topic, hopefully i can add a question about this topic. I use a ATTINY for a expirimental custom car indicator. Due to the on-off sequence of the indicator relay the 6 leds have to follow up quick. The program seems a bit unstable, not blinking every led every time. Could quick on/of sequence be a problem for a attiny? The picture is a test board. New board uses 330 ohm resistors for every led. Input power attiny in 5V. Thanks in advance!
 

Attachments

DickCappels

Joined Aug 21, 2008
10,067
Could a quick on/off sequence be a ptoblrm with an ATTINY? Depends on your clock, but a fraction of a microsecond should be pretty easy.

Not clear about your mention of relays, you probably realize relays need time, often measured in milliseconds in order to switch. Could that be the problem?
 

boostbuck

Joined Oct 5, 2017
381
At a guess, are you trying to sequence six leds in the on-time that the flash indicator turns the indicator on?

If so, it would be useful to have a bit more detail about the circuit you are using and how that is triggered by the indicator signal.
 

Thread Starter

hendrik6073

Joined Apr 23, 2023
4
At a guess, are you trying to sequence six leds in the on-time that the flash indicator turns the indicator on?

If so, it would be useful to have a bit more detail about the circuit you are using and how that is triggered by the indicator signal.
Yes i want to run the led chaser sequence in time the relay is on, then it turns off. When it switches on again i start all over again. What i do is connect the pcb to the plug that connects the stock bulp normally. I added a restistor so canbus does not throw a error. Would you also like to see the program i loaded into the attiny? It is just a 'set high' to the pins, with little pause in between. Than the power goes off due to th relay and it starts all over when the power comes on again.
 

boostbuck

Joined Oct 5, 2017
381
I assume your circuit tests ok on the bench, and works just fine when you manually simulate the flasher unit by switching the supply. Then I would be suspicious of the quality of the switched power to the indicator. Automotive power is notoriously dirty and requires careful filtering.

Perhaps you should avoid switching Vcc to the processor by having a filter on the board that is sufficient to hold Vcc across the off-time and sense the power arrival to switch the LEDs.
 

Thread Starter

hendrik6073

Joined Apr 23, 2023
4
Perhaps you should avoid switching Vcc to the processor by having a filter on the board that is sufficient to hold Vcc across the off-time and sense the power arrival to switch the LEDs.
testing on the bench is the next thing i going to do, going to search fot a indocator relay for that. The filter part of youre answer, i have to read more about, not familair with that
 
Top