element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Open Arduino
  • Challenges & Projects
  • Project14
  • Open Arduino
  • More
  • Cancel
Open Arduino
Blog Indicator Tester
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Open Arduino to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: mcb1
  • Date Created: 7 Apr 2018 6:57 AM Date Created
  • Views 3128 views
  • Likes 12 likes
  • Comments 10 comments
  • ardintermediate
  • relay board
  • performance test
  • led flasher
  • epoxy
  • openarduinoch
Related
Recommended

Indicator Tester

mcb1
mcb1
7 Apr 2018
image

Open Arduino

Enter Your Project for a chance to win a grand prize for the most innovative use of Arduino or a $200 shopping cart! The Birthday Special: Arduino Projects for Arduino Day!

Back to The Project14 homepage image

Project14 Home
Monthly Themes
Monthly Theme Poll

 

Some time back I blogged about things going wrong

What went wrong

 

I had made some electronic Brake/Indicator units, that took seperate Brake and Indicator signals and mixed them to drive LED tailights.

image

Here in NZ and some other countries the indicator is a seperate 21w lamp and an amber coloured lens.

Older American cars simply use the same lamp as the brake light and flash it when the indicators are operated.

 

There are several ways to do it, and GM tended to use extra parts in the column switch (which fail over time or when overloaded)

 

 

I'd made several of these in a couple of different configurations, and set number 3 was offered to a local Hotrodder.

He struggled with the wiring and then hit the issue with combining tail/brake and indicator into a twin filament lamp.

His budget didn't extend to an automotive electrician and relays or whatever they would suggest (no-one else offered a solution).

 

 

 

Testing

The testing needed to simulate the product in everyday use.

This includes indicators only, brake only and combinations of brake and indicator.

Obviously they need testing before encasing in epoxy.

 

Therefore they are tested twice.

 

I could have powered the appropriate wire and checked the result, but I've found that method to have issues.

What better use for an Arduino, three relays and some LED's.

 

image

 

 

 

 

CODE

The code is below

 

/* 
  Tail light Tester 
  This turns on several relays and is used to test the LED Tailight boards 
  Sequence is :- 
  Left Ind 
  Right Ind 
  Brakes 
  Brake plus Left 
  Brake plus Right 
  Left plus Brake 
  Right plus Brake 
*/  
//Define Outputs  
const int L_Indicator = 12;  
const int L_Indicator_LED = 11;  
const int Brake     = 10;  
const int Brake_LED = 9;  
const int R_Indicator = 8;  
const int R_Indicator_LED = 7;  
int x=0;  
// the setup function runs once when you press reset or power the board  
void setup() {  
// initialize digital pin LED_BUILTIN as an output.  
  pinMode(LED_BUILTIN, OUTPUT);  
  pinMode(L_Indicator, OUTPUT);  
  pinMode(L_Indicator_LED, OUTPUT);  
  pinMode(Brake, OUTPUT);  
  pinMode(Brake_LED, OUTPUT);  
  pinMode(R_Indicator, OUTPUT);  
  pinMode(R_Indicator_LED, OUTPUT);  
}  
// the loop function runs over and over again forever  
void loop()  
{   
  delay (1000);  
// L_Indicator ON  
for (x = 0; x <=10; x++)  
  {  
    digitalWrite(L_Indicator, HIGH);  
    digitalWrite(L_Indicator_LED, HIGH);  
    delay (500);  
    digitalWrite(L_Indicator, LOW);  
    digitalWrite(L_Indicator_LED, LOW);  
    delay (500);  
  }  
  delay (1000);  
// R_Indicator ON  
for (x = 0; x <=10; x++)  
  {  
    digitalWrite(R_Indicator, HIGH);  
    digitalWrite(R_Indicator_LED, HIGH);  
    delay (500);  
    digitalWrite(R_Indicator, LOW);  
    digitalWrite(R_Indicator_LED, LOW);  
    delay (500);  
  }  
  delay (1000);  
// Brakes ON     
      digitalWrite(Brake, HIGH);  
      digitalWrite(Brake_LED, HIGH);  
      delay (5000);  
// Brakes OFF   
      digitalWrite(Brake, LOW);  
      digitalWrite(Brake_LED, LOW);  
  delay(1000);                       // wait for a second
// Brake plus Indicator  
// Brakes ON  
      digitalWrite(Brake, HIGH);  
      digitalWrite(Brake_LED, HIGH);  
      delay (500);  
// L_Indicator ON  
for (x = 0; x <=10; x++)  
        {  
          digitalWrite(L_Indicator, HIGH);  
          digitalWrite(L_Indicator_LED, HIGH);  
          delay (500);  
          digitalWrite(L_Indicator, LOW);  
          digitalWrite(L_Indicator_LED, LOW);  
          delay (500);  
        }  
  delay(1000);                       // wait for a second
// Brakes OFF  
      digitalWrite(Brake, LOW);  
      digitalWrite(Brake_LED, LOW);  
  delay(1000);                       // wait for a second
// Brakes ON  
      digitalWrite(Brake, HIGH);  
      digitalWrite(Brake_LED, HIGH);  
      delay (500);  
// R_Indicator ON  
for (x = 0; x <=10; x++)  
        {  
          digitalWrite(R_Indicator, HIGH);  
          digitalWrite(R_Indicator_LED, HIGH);  
          delay (500);  
          digitalWrite(R_Indicator, LOW);  
          digitalWrite(R_Indicator_LED, LOW);  
          delay (500);  
        }  
  delay(1000);                       // wait for a second
// Brakes OFF  
      digitalWrite(Brake, LOW);  
      digitalWrite(Brake_LED, LOW);  
  delay(1000);                       // wait for a second
// Indicator plus Brake  
// L_Indicator ON  
for (x = 0; x <=10; x++)  
        {  
          digitalWrite(L_Indicator, HIGH);  
          digitalWrite(L_Indicator_LED, HIGH);  
          delay (500);  
          digitalWrite(L_Indicator, LOW);  
          digitalWrite(L_Indicator_LED, LOW);  
          delay (500);  
if (x ==4)  
          {  
// Brakes ON  
            digitalWrite(Brake, HIGH);  
            digitalWrite(Brake_LED, HIGH);  
          }  
        }  
// Brakes OFF  
        digitalWrite(Brake, LOW);  
        digitalWrite(Brake_LED, LOW);  
        delay(1000);                       // wait for a second
// R_Indicator ON  
for (x = 0; x <=10; x++)  
        {  
          digitalWrite(R_Indicator, HIGH);  
          digitalWrite(R_Indicator_LED, HIGH);  
          delay (500);  
          digitalWrite(R_Indicator, LOW);  
          digitalWrite(R_Indicator_LED, LOW);  
          delay (500);  
if (x ==4)  
          {  
// Brakes ON  
            digitalWrite(Brake, HIGH);  
            digitalWrite(Brake_LED, HIGH);  
          }  
        }  
// Brakes OFF  
        digitalWrite(Brake, LOW);  
        digitalWrite(Brake_LED, LOW);  
}

 

As you can see it cycles around the various options, and I tested the modules before and after casting them.

 

 

VIDEO

The video shows the tester starting off.

The simulation powers the Indicator on one side, then the other side.

Brake is tested and both LED's should illuminate.

The next sequence is to have the Brake and Indicator for one side at the same time.

As the label says the unit on the left side is faulty and the LED should go out when the Indicator flashes on.

The right side operates correctly, and you can see that the front indicator and rear indicator would be out of sequence (but you can't normally see both ends of a vehicle)

 

The program continues and changes to having the Indicator on first before applying the brakes, taking the brake off during the flashing to simulate real life.

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

 

 

LED Tail Lamps

There are many LED replacement lamps available, and unfortunately many aren't very well designed.

It appears that Phillips solved that with these.

 

 

image

I've since found them here Philips Red Led Brake Lights S25 P21/5W 1157 BAY15D 12836 2 Dual Brightness

 

 

I hope this gives someone the inspiration needed to start programming with Arduino.

As the code shows it is full of delays and there is nothing complicated ... it's not complicated in what it has to do, so why make the software complicated.

As usual there are some comments so I can recall why or what I was trying to do.

 

 

Cheers

Mark

  • Sign in to reply

Top Comments

  • three-phase
    three-phase over 7 years ago +3
    Nice little project and demonstration. Thanks for posting. Kind regards
  • genebren
    genebren over 7 years ago +2
    Mark, Interesting project. It seems like a lot of work for trailer lights, but then what engineer could resist doing a lot of work just to prove that it could be done. Gene
  • mcb1
    mcb1 over 7 years ago in reply to genebren +2
    It seems like a lot of work for trailer lights They are on a vehicle, and it's not a lot of work. LED Tail lights operate faster and reduce the loading on the wiring. My 66 Pontiac had three brake light…
  • the-dubster
    the-dubster over 7 years ago in reply to mcb1

    You're absolutely right - it's a classic at Halfords, and then reviewers complain that they didn't know, even though it's written on the box!!

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • ntewinkel
    ntewinkel over 7 years ago in reply to ntewinkel

    oh and also, I had to remove the taillights from the Trillium due to water seeping into them in the winter rains... I had to remove them to seal them up better. So those are currently also still sitting on my workbench.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • ntewinkel
    ntewinkel over 7 years ago in reply to mcb1

    >My next blog might be how to do your tailights ... I still have the code.

     

    I think I still have your code here too! image

     

    The current status of that project is that I added another logic step into the flow to avoid startup timing issues. It's already wired up on my breadboard (it only required wiring up some extra gates that were sitting unused in the existing chips).

    I just need to test it... aaah time time time. That's the downside of having a regular job again. The upside is that I can now afford more parts for the projects I no longer have time for image

     

    -Nico

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • mcb1
    mcb1 over 7 years ago in reply to ntewinkel

    I might have to setup something like that to test my Trillium trailer lights

    My next blog might be how to do your tailights ... I still have the code. image

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • mcb1
    mcb1 over 7 years ago in reply to the-dubster

    the-dubster

    most are marked as 'for off road use only

    I think that's done to get around the legal implications of not correctly illuminating.

    It then becomes an owner/drivers problem.

     

    Mark

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube