6G Celicas Forums

Welcome Guest ( Log In | Register )

> Selfmade Sequential Shift Light
post Nov 17, 2013 - 4:36 PM
+Quote Post
Hafkai



Enthusiast
*
Joined Dec 9, '05
From Germany
Currently Offline

Reputation: 0 (0%)




It´s not the most usefull thing but i just felt the urge to build something like this wink.gif .... the core of this little project is a Arduino Micro, a very small but capable microcontroller board. I´m not a fan of huge shift lights that go on all of a sudden so i tried to build a sequential shift light myself, it took me some time to get the Arduino to do anything without any programming knowledge but i somehow managed to make it work smile.gif

This is the outcome:

Arduino Micro Shift Light

Test setup



I used my mini DSO as signal generator, a wonderful little tool.







 
Start new topic
Replies
post Nov 20, 2013 - 1:38 PM
+Quote Post
Hafkai



Enthusiast
*
Joined Dec 9, '05
From Germany
Currently Offline

Reputation: 0 (0%)




This is basically how i made it, would have been a lot easier with normal LEDs but i wanted them all to be able to blink blue so i had to use RGB LEDs.
I put 1000-2000 Ohm resistors in front of every used LED pin, they were still way to bright but thanks to the PWM outputs its easy to dim them and to make any color as i did with the yellow stage.



And this is the code for the Arduino, not perfect, i still need to get some kind of rpm or frequency counter working, for now the code counts the time between the pulses:

QUOTE
int rev = 12;
int ledGr1 = 5;
int ledGr2 = 13;
int ledGr3 = 11;
int ledG1 = 6;
int ledG2 = 9;
int ledRo = 3;
int ledBl = 10;
int ledAll = 8;
unsigned long duration;

void setup(){
Serial.begin(19200);
pinMode(8, OUTPUT);
pinMode(rev, INPUT);
}
void loop(){
Serial.print("Duration: ");
Serial.println(duration);
duration = pulseIn(rev, HIGH);

if (duration < 800 && duration > 100) {
digitalWrite(ledAll, HIGH);
delay(40);
digitalWrite(ledAll, LOW);
delay(40);
}
if (duration < 2800) analogWrite(ledGr1, 20);
if (duration > 2850 || duration < 800) analogWrite(ledGr1, 0);
if (duration < 2500) analogWrite(ledGr2, 20);
if (duration > 2550 || duration < 800) analogWrite(ledGr2, 0);
if (duration < 2300) analogWrite(ledGr3, 20);
if (duration > 2350 || duration < 800) analogWrite(ledGr3, 0);
if (duration < 2000) analogWrite(ledG1, 20);
if (duration > 2050 || duration < 800) analogWrite(ledG1, 0);
if (duration < 2000) analogWrite(ledG2, 60);
if (duration > 2050 || duration < 800) analogWrite(ledG2, 0);
if (duration < 1500) analogWrite(ledRo, 40);
if (duration > 1550 || duration < 800) analogWrite(ledRo, 0);
if (duration < 1100) analogWrite(ledBl, 20);
if (duration > 1150 || duration < 800) analogWrite(ledBl, 0);
delay(50);
}

Posts in this topic
- Hafkai   Selfmade Sequential Shift Light   Nov 17, 2013 - 4:36 PM
- - PegGTS   Really cool! Good job   Nov 17, 2013 - 7:51 PM
- - delusionz   awesome   Nov 18, 2013 - 11:48 AM
- - ClevelandGaint   Thats prettty sweet, nice work   Nov 19, 2013 - 11:54 PM
- - Malhar95   Would you awesome and show us how you made this wo...   Nov 20, 2013 - 10:25 AM
- - Hafkai   This is basically how i made it, would have been a...   Nov 20, 2013 - 1:38 PM
- - angel_st   It is really impressive, good work. I have a quest...   Nov 29, 2013 - 11:02 AM
- - mkernz22   Looks like I'm going to have to make one some ...   Nov 29, 2013 - 11:32 AM
- - Hafkai   QUOTE (angel_st @ Nov 29, 2013 - 5:0...   Nov 29, 2013 - 2:38 PM
- - seancarsonuk   Hi, Just wondering what spec diodes you used betw...   Feb 16, 2014 - 12:10 PM


Reply to this topicStart new topic
4 User(s) are reading this topic (4 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: February 22nd, 2025 - 6:01 AM