blinker for motorcycle

Hi guys,

I'd like to use an Andruino to pimp the light of my motorcycle.
In general I want to catch the information, if the left or right side is blinking. If so, of course the regular blinkers are supposed to blink.
But also I want to solder my own parking light with white and yellow leds or rgb leds. Those should regularly enlight white, but if the blinkers are active, the related parking light (left / right) shall not shine white anymore, but also blink yellow.

Later if this is working, I also want to add a gyroscope so that I can trigger, if the motorcycle still is tilt or not (to stop blinking automaticly)

But since this will be my first Andruino and electronic project, I would appriciate some ideas of what kind of sensors, leds and other material I could use. Also how to put all that stuff together or maybe a nice tutorial how to get started with electronic development.

Thanks a lot!

OK, sounds a good project to start with. Not so sure about a gyroscope to detect tilt (is that what you mean, when the bike is parked up?) but that's for the future.

I'm sure others will chip in with what you need (apart from an Arduino Uno or Nano) but if you want to watch a few beginner videos that also detail some basic hardware then head over to my YouTube channel as it has just the sort of video for newcomers to the Arduino World, aka Arduinites. You can even subscribe so you don't miss future videos and I get a buzz that people find them interesting. URL is in the footer of this post.

As a starter, get your UNO (it's easiest to work with for a beginner, not so fiddly as a Nano) and get the example blink program uploaded and working - it could be the foundation of your project!

Cool project!!!!

But since this will be my first Andruino and electronic project...

If you haven't done any programming, you need to learn a little programming and a little electronics.

I'd recommend you start with some of the simple [u]Examples[/u]. The examples show you how to hook-up and blink an LED, and how to hook-up and read a pushbutton switch, etc.

PROGRAMMING
The delay() function that's used in the Blink Example probably won't work in your actual-final program. The delay() function pauses execution during the delay time, so your program can't respond to switches/buttons, or your gyro, etc, during the delay time. Most real-world programs avoid delay() or they only use very short delays carefully... You'll need to use the methods from the Blink Without Delay example (also explained in the post at the top of teh forum about doing several things at the same time.

The two most important concepts in programming are conditional execution (if statements, etc.) and loops (doing something over-and-over, usually until some condition is reached). Once you understand those two concepts, you're on your way to understanding how to put a program together.

HARDWARE - ELECTRONICS
There are two categories of LEDs. There are "regular" or "standard" low-power LEDs, and this includes RGB LEDs and "high brightness" LEDs. You can drive one or two standard LEDs from an Arduino pin (with the required current-limiting resistor in series).

During development, you can use a few regular LEDs and drive them directly from the Arduino

But, for your final project you'll want more LEDs or high-pwer LEDs.

If you want to drive several regular LEDs, you'll need a transistor or MOSFET for each "channel' (for each color, or for the left & right sides, etc.).

High-power LEDs (1 Watt or more) require a special constant-current driver. These are tricky to build, so if you end-up choosing high-power LEDs I'd recommend buying driver boards rather than building them yourself.

You'll probably need to do some "outdoor experiments" to see if you can get enough light from a cluster of regular RGB LEDs, or if you need to go high-power. If these are supplemental to your existing lighting, it might not be so critical, but if these are replacing your existing lights, it's very critical...

For experimental purposes you can power-up regular LEDs with just a power supply (or motorcycle battery) and current-limiting resistors. There's no need for the transistor/MOSFET if your are not controlling them from the Arduino. High-power LEDs require the driver, or you could actually get-by with a high-power current-limiting resistor.

I don't know anything about (real) gyros with microcontrollers... A true-gyro should work, but a basic solid-state accelerometer might not work, because when you turn you lean so from the bikes perspective there is no left or right force... The cornering forces push you straight "down" in the seat, not off to the side of the seat. And, I agree it's a real-good idea to save that part of the project for later... :wink: