element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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 & Partners
    Products & Partners
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • 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
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • 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
Arduino
  • Products & Partners
  • More
Arduino
Blog An Arduino/Raspberry Pi Based Wireless Light Harness
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: screamingtiger
  • Date Created: 11 Jun 2015 1:17 PM Date Created
  • Views 7894 views
  • Likes 3 likes
  • Comments 76 comments
  • wirless_trailer
Related
Recommended

An Arduino/Raspberry Pi Based Wireless Light Harness

screamingtiger
screamingtiger
11 Jun 2015

I am going do this small side project as a way to take a break from my main project.  For a basic introduction please see my original blog post at http://www.element14.com/community/people/screamingtiger/blog/2015/04/20/a-small-project-idea--wireless-trailer-lighting-control

 

If anyone has concerns about my project, please post them in that thread.  I have changed the design slightly after doing  some research and testing.  I am also going to have a control panel in the car with me so I can monitor things as well as manually test the lights.

 

The car has running lights, brake lights, and turn signals all on separate channels.  However the trailer lights only have 2 channels as the running lights also function as turn signals. My initial analysis was incorrect that the running lights also function as brake lights.

 

First a tentative parts list and then I will explain.

2X Arduino mini pros 16mhz boot loader

1X Raspberry Pi model B

1X 2.5" TFT touchscreen LCD

1X 4 channel mechanical relay

6X AMS1117 SO-223 5V regulators

3X NRF24L01+ wireless transceivers

1X 1.5 watt solar charger

3X enclosures

1X 20,000mAh (20Ah) 12V lead acid battery

1X hobbyking 5V/5A regulator

1X 1000 mAh 2s LIPO

 

Explanation of parts :

There are 3 units involved. We have the unit that reads the car's lights, the unit that controls the trailer lights, and the unit that acts as a control panel.  All 3 are connected via the wireless adapters.

 

2X Arduino mini pros 16mhz boot loader

These will be used for the units that read the lights and control the trailer lights.  I have some of these on hand is why I went with them and the small footprint will allow me to tuck it away nicely.

 

1X Raspberry Pi model B and 1X 2.5" TFT touchscreen LCD

This will function as the main control panel with a simple interface.  The Pi attaches easily to the LCD which is why I chose this route.  Its way overkill but I feel it will be useful for other projects that also need a remote or control panel.  The control panel will allow monitoring as well as manual control of the lights for testing.

 

1X 4 channel mechanical relay

The stock lights on my trailer pull 2A for the brakes lights per side, and 500 mA per side for the running lights.  Originally I was going to use a mosfet but I see no reason with this high of current.  The brake lights will be turned on at the same time so the relay will see 4A.  However the running lights will be on separate channels as they also function as blinkers.  The 4th channel I may use to turn on internal lights in the trailer remotely.

 

6X AMS1117 SO-223 5V regulators

These small regulators will be used to power the Arduinos off of the main 12V sources which come from the vehicle as well as the 12V battery in the trailer.  They are also used to read the  vehicle lights.  My plan is to splice into the lines of each light the same way I did before when installing an off the shelf light controller.  The lights will be routed to the 5v regulators which then step down the voltages to 5V for reading via the GPIO pins on the Arduino.  I will need 4 regulators to read the lights.  1 for the brake lights, 1 for the running lights, and 1 each for each turn signal.

 

3X NRF24L01+ wireless transceivers

These 2.4ghz transceivers are similar to an I2C connection and a serial connection combined.  Each one has an ID and you can broadcast information. I will have a small protocol in place for error correction as well as some minor tamper proofing.  I don't want a rogue 2.4ghz signal to be able to mess with my lights.  I will be using a command set that requires a sequence of bytes in order to validate commands.

 

1X 1.5 watt solar charger

These can be had from Harbor Freight and low cost.  I decided that the trailer might as well be "green" and charge its own battery.  Besides its just another thing for me to forget to do.

 

The rest of the items are self explanatory and used to house the items and power the Pi.

 

I may choose to get some LED based trailer lights, but I am going to stick with the stock trailer lights for now until I have a working project.

  • Sign in to reply

Top Comments

  • mcb1
    mcb1 over 11 years ago in reply to screamingtiger +3
    Joey Did you remove the jumper .. JD-VCC to VCC ? You apply the 12v to JD-VCC NOT THE VCC PIN The 5v on the VCC pin is to power the Optocouplers ... Also note that these turn on with a LOW so you need…
  • Robert Peter Oakes
    Robert Peter Oakes over 11 years ago in reply to screamingtiger +2
    80mA for Arduino and 1A for lights adds up to 1.08Amps, not 1.8. This would provide a much longer life time (18.5 Hrs) so even with brakes you should easily get 10-12 Hr (Unless you're a heavy breaker…
  • clem57
    clem57 over 11 years ago +2
    Totally amazed is the word today. Plus a tropical depression has taken over here. LOL
  • mcb1
    mcb1 over 11 years ago in reply to screamingtiger

    They certainly look like they solve some of the issues ...

    They add a regulator for the power but don't mention anything about level conversion on the inputs....

     

     

    This morning while stuck behind traffic, I noticed the delay with LED v Lamps on the car in front..

    LED's have an instant illumination v parts of a second to fully illuminate a lamp.

     

    I'm sure you have already but for anyone else ....You probably want to ensure you minimise any transmission delay when activating the Brake Light.....

     

     

    Mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • screamingtiger
    screamingtiger over 11 years ago in reply to mcb1

    I did some more research and there is a "fork" of the repository for the RF24 where someone fixed many of the issues including the weird delay issue.

    I also 1 day shipped some of the sockets they make for these:

    http://www.amazon.com/gp/product/B00VFNZN8K?psc=1&redirect=true&ref_=oh_aui_detailpage_o00_s00

    Given I can get the uno and nano to work with these ok and not the mini, leads me to suspect my 3.3V regulator must be noisy.  I ordered some caps but these little sockets have significant filter caps on them already as well as a 3.3v regulator.  I wish I would had seen them.

     

    Going to go work for a bit will report back.

     

     

    If I cant get it work will try the expensive XBEE or whatever they sell on Amazon.  I get free 2 day shipping.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • mcb1
    mcb1 over 11 years ago in reply to screamingtiger

    Joey

    Are you stuck with using these WiFi devices.

     

    There are some very useful RF transceivers in a multitude of frequencies, that we used in the Forget Me Not challenge.

    http://www.element14.com/community/community/design-challenges/forget-me-not/blog/2014/10/20/eldermon-enocean-external-sensors-graphing

    Eric provided all the necessary information ...and I have linked to it in the above post.

     

    I brought my units from here.

    http://www.anarduino.com/?cid=4

     

    I'm not exactly sure where they are in the states, but it's got to be quicker than Asia.

     

     

    Mark

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • bobcroft
    bobcroft over 11 years ago in reply to screamingtiger

    Joey, Google CISECO  they make wireless modules that work with the Arduino and Raspberry PI.  The operative word is WORK!  These modules work extremely well, are easy to use and very reliable.  They are not made in China but in the UK.  They are more expensive at about £10 per module but they will save many hours of wasted time trying to your existing modules working.  There is a lot of support available for the CISECO stuff and they are essentially a transparent wireless bridge between devices on a one to one, one to many and many to many basis.  Each module can have a unique ID and anything you can send by a serial link can be sent via a CISECO module.

     

    There are also the notorious ESP8266 modules but I have yet to see a reliable module to module set you using them.  There are lots of examples of using them to the web.  I have not found anything that works reliably on a device to device basis let one to many or many to many.

     

    I have no connection with CISECO apart from being extremely pleased with their very high quality products.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • screamingtiger
    screamingtiger over 11 years ago

    Well guys not to be a negative nancy BUT...

     

    The RF24 library has some serious issues.  Its not very easy to use.

    Using the examples provided, I did get the code to work using a UNO and a Nano.  I am having much less luck with the pro minis and powering with a 3.3V regulator.  I have some .1 uF CAPS coming tomorrow but that wont solve 2 major issues:

     

    There is no way to detect the status of the radio, the examples themselves think that they are receiving and transmitting data successfully even when the radio is not even attached.  Therefore its impossible to tell what the heck is ever going on.  I am not familiar with SPI yet so maybe there is hope.

    Another issue is I was sending incremental numbers in a loop (1,2,3 etc) which worked great.

    Then I added a delay statement to only send every 1 second.  It breaks.

    SO I added a non blocking non interrupt delay using micros(), same issue.

    SO I decided to only send data when the counter is at 1000,2000 etc..  Same issue.

    What I found is that I MUST keep sending data nonstop.  If I stop, the radio link dies.  What this means that as fast as possible I have to send zeros or something with non meaning.

     

     

    If you google RF24 and delay you will see many people have this issue.  I thought it may be an interrupt or timer conflict but nope  image  It seems if the data stops for more than 10 milliseconds things go wrong.

     

    SO one other admission of mine is that nrf24l01 I bought are directly from CHINA.  They cost .50 cents USD each.  image

     

    Can anyone recommend a wireless system that works and has good drivers for arduino?  XBEE?

     

    I don't have  much more time to work on this and I cannot spend a lot of time getting buggy stuff to work because I have my own bugs to fix. I understand the RF24 is free but it needs serious work IMO before it is truly useful for anything other than example youtube videos.  I did find a guy who wrote SPI code himself I am looking into that next.

     

    Sorry I am negative, its late here and I have been working hard on this with little results.  I may just choose to use two UNOs since they appear to work ok short of the 10 millisecond issue.

    • Cancel
    • Vote Up 0 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 © 2026 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.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube