I wonder if you good folks can help and advise me on the feasibility and optimal solution to achieve a little Arduino based project I’d like to undertake. I have had a rummage about in the forums and internet but hope that someone can provide a little more focussed opinion.
To develop a Arduino controlled ‘daylight running light’ system for a motorcycle. The aspiration would be to have 4 x 10W LED lights (similar to these on ebay: 12V Car Motorcycle 10W LED Daytime Running Light Electronics, Cars, Fashion, Collectibles & More | eBay) two LED’s would be mounted on each side of the bike. I’d like that they could be run in three different modes (four if you count OFF as a mode).
Mode 0: All 4 lights off
Mode 1: All 4 lights on.
Mode 2: Outer lights both on permanently, the inner pair would periodically flash (with user selectable variable timing / adjustment).
Mode 3: Linked to the horn. When activated, this function would override modes 0, 1 and 2 to do a wig-wag sequence on each sides pair (symmetrically i.e inner pair double flash, outer pair double flash, inner pair double flash etc) whilst the horn is pressed and continue for a further (3 or so seconds after the horn button is released) – reverting to whatever mode was selected prior to the horn being activated.
Modes would be selectable by a three way switch on the handlebars such as this on ebay (Headlight Lights Handlebar Switch Gear http://r.ebay.com/6zMVY6) plus a connection to the horn circuit.
There would need to be a fused, master power / override / isolator switch etc.
May I respond in-line to your email? Please see below.
Your input is 4 position switch with position 0 being off.
Answer: Actually, mode 0 (off), mode 1 (all lights on), and mode 2 (one pair of lights on and another pair intermittently flashing) is a three way switch. The horn button is already on the bike and wired to sound the horn. I was going to tap into that feed to provide a high state to trigger the wig-wag function of the lights that overrides any other function.
You want the control 4 high power LEDs and a horn (more or less individually) depending on the position of the switch.
Answer: Yes please. Each state of the switch (plus horn override) would provide a high state on the appropriate GPIO on the Arduino.
You can certainly do that with an Arduino with maybe 5 relays. I'd recommend a nano. It is small and you can program it easily by connecting it in-situ to a laptop for programming adjustments.
Answer: Thank you, I shall research the Nano. Any ideas about a pre-built board that will work 'out of the box' with that to provide the solid state relays? I was thinking four LED MOSFET drivers. Not mechanical relays because of vibration and also to get that wig-wag effect and fast on/off it needs solid state components.
The logic to test the status of the 3 position switch and the horn button and activate pins on an Arduino (nano for example) accordingly is relatively simple.
If I read correctly now, you have only got three output groups, inner lights, outer lights and horn.
For testing of the concept, and getting the software right, you can build something on a breadboard.
You can see many examples of controlling high output Leds (LED arrays) here:
A commercial, out of the box, solution is unlikely.
It would help to give the thread a title that would attract the attention of interested parties, like "daylight running lights for motorcycle", instead of "advice sought for an Arduino project". Anybody who posts in the "project guidance" forum of the "Arduino" site falls into that category.
There certainly are many higher power switching interfaces on the market for the Arduino. I have come across them in my browsing, but passed by, as I don't need any at the moment.