Tour Easy 1 W Amber Running Light: Firmware

Rather than conjure a domain specific language to blink an LED, it’s easier to use Morse code:

Herewith, Arduino source code using Mark Fickett’s Morse library to blink an amber running light:

// Tour Easy Running Light
// Ed Nisley - KE4ZNU
// September 2021

#include <morse.h>

#define PIN_OUTPUT	13

LEDMorseSender Morser(PIN_OUTPUT,(float)10.0);

void setup()
{
	Morser.setup();

    Morser.setMessage(String("qst de ke4znu "));
    Morser.sendBlocking();

//    Morser.setWPM((float)3.0);
    Morser.setSpeed(50);
	Morser.setMessage(String("s   "));
}

void loop()
{
	if (!Morser.continueSending())
		Morser.startSending();

}

Bonus: a trivially easy ID string.

A dit time of 50 ms produces a brief flash that’s probably about as fast as it can be, given that the regulator must ramp the LED current up from zero after its Enable input goes high. In round numbers, a 50ms dit corresponds to 24 WPM Morse.

Each of the three blanks after the “s” produces a seven element word space to keep the blinks from running together.

Sending “b ” (two blanks) with a 75 ms dit time may be more noticeable. You should tune for maximum conspicuity on your rides.

1 W Amber Running Light - installed front
1 W Amber Running Light – installed front

On our first ride, Mary got a friendly wave from a motorcyclist, an approving toot from a driver, and several “you go first” gestures at intersections.

Works for us …

4 thoughts on “Tour Easy 1 W Amber Running Light: Firmware

  1. Many years ago when the Fresnel Lens was first being developed for use in lighthouses and other Aids to Navigation, testing showed the shortest flash duration that could be seen from an observer on the rolling deck of a ship was 0.3 seconds. I would assume that is still valid today and would tend to not have any flashes shorter than 0.3 seconds. Yes I see some flashing that is shorter, but I am cautious with safety items.

    Good job on the light

    1. Motorcycles can have headlights modulated at less than 4 Hz, although I rarely see anything like that. Bike running lights on the rail trail repeat groups of one to four pulses at maybe 2 Hz, with the pulses being very brief flashes. The first flash attracts your attention and the next flash locates the bike, at least in the daytime. At night, a blinking light is a Bad Idea™, because you disappear between blinks.

      Having ridden in front of Mary for a while, the Morse B is ON about half the time and is plenty visible.

      The taillight version will have an inverted output and send either I or S, so it’ll be ON almost all the time with two or three short “occultations”.

Spam comments get trashed, so don't bother. Comment moderation may cause a delay.

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s