External interfaces

DSRC External device interfacing

DSRC is capable of driving a few external devices:

  • BT single relay for audio signals (horn) - Note that although is works, there are questions on it's reliability

  • WiFi single relay module for audio signals (horn)

  • Wifi four relay module for audio and visual signals (horn and lights)

  • Experimentally, it can also drive a NeoPixel style 4 digit (mm:ss) timer display (be aware this is a totally DIY build)

In case your visiting just to get hold of the latest relay firmware, I'm including that information first, so it's easy to find :o)

EXTERNAL RELAY FIRMWARE

With DSRC V2.0 (onwards) you can interface with an external four relay wifi module (as we already could for a single relay unit), which will enable control of 3 signal lights and a horn.

The following are links to the DSRC V2.0 (onwards) associated firmware files:





During testing, I managed to reverse polarity connect my single 12Vdc relay unit, which 'killed it' :o(

The replacements I got were 5Vdc, which wasn't a problem, but I found that they require the opposite logic for relay On/Off.

So here's a reverse logic version:



EXPERIMENTAL - CONNECTING VIA A LOCAL NETWORK

To test if DRSC external devices can be operated successfully whilst connected to a local network router, modified versions have been created which allow configuration of local network credentials via a web browser.

Once configured you can connect your Android device to either directly to the external device (as before), or via the local network (once you have the allocated IP address).

The modified version are:





Notes:

  • You will need to compile the code and upload to the ESP-01 that comes with the module (we use the Arduino IDE, and a programming interface- see pictures below)

  • The two firmware version are not compatible, due to the way the modules internally control the actual relays. So ensure you use X1 for single relay , and X4 for four relay.

  • DSRC's defaults for the four relay module are:

      1. - Audio signal (e.g. horn)

      2. - Class A visual signal (also Class for single fleet)

      3. - Class B visual signal

      4. - Prep visual signal

Typical programming interface

ESP01 fitted for programming

DSRC Quick Guide - Firmware

Many thanks to Keith Sykes for creating this very useful guide on how to get an external relay unit working with DSRC

Keith has also kindly created a simple guide on the installation and configuration of the Arduino IDE for DSRC firmware installation.

DSRC audio and visual signals

DSRC (as of V1.9) is able to send the following audio, visual signals, and clock, when on the Setting Screen:

  • Wifi On/Off and horn is 'checked'

  • Wifi signal lights is 'checked' (if lights are to be connected)

  • Wifi timer display is 'checked', and intensity 'Level' set as required (if timer display is to be connected)

  • Correct 'Wifi device info' is entered (DSRC has the defaults already entered to match the DSRC firmware) .

AUDIO:

      • Attention

      • Class up, Prep up, Prep down

      • Start

      • Individual Recall

      • General Recall

      • Clear General Recall if rolling starts paused

      • Pursuit early and delayed starts

      • Abort start(s)

      • Abort race

      • Shorten course

      • Finish

      • Pursuit race duration completed

      • Manual (at any time, and on for as long as the 'HORN' button is pressed)

VISUAL:

      • Class A up (also used for single fleet races)

      • Class B up (used if even rolling start is paused)

      • Prep up

      • Prep down

      • Odd start

      • Odd start Individual Recall (also used for single fleet races)

      • Odd start General Recall (also used for single fleet races)

      • Even start

      • Even start Individual Recall (also used for single fleet races)

      • Even start General Recall (also used for single fleet races)

      • Pursuit delayed 30s or 20s to start Class up and Prep up

      • Pursuit delayed 10s to start Prep down

      • Pursuit delayed start Class down

      • Abort start(s)

      • Abort race

      • Shorten course

      • Finish open

      • Plus cancels for Abort start, Abandon race, IR, GR, Shorten course, and Finish open

TIMER:

      • Countdown (in Red)

      • Elapsed time during race (in White)

      • Elapsed time post race end (in Blue)

      • Timer can have 4, 5, or 6 digits e.g. mm:ss, h:mm:ss, or hh:mm:ss

Notes -

Timer display requires more complex hardware than the simple relay units for horn or horn/lights, and should be considered Experimental at this point.

The firmware contains the definitions for the audio and visual (four relay only) signals e.g. horn duration and repeats, lights on/off, flashing duration.

So it is possible to 'tailor' these signals to suit your specific requirements. But you will need to recompile and upload 'your' version to the WiFi module(s).

External modules (examples of what we (Keith & I) used for development and testing)

Bluetooth - Single

No firmware needed

Wifi - Single

Firmware = DSRC_X1_v?.ino

Wifi - Four

Firmware = DSRC_X4_v?.ino

Light Sequences explanation

Light Sequences explanation.pdf

Timer display

Although DSRC is capable of driving and external NeoPixel style clock (and signal panels), the current release firmware for the relay units ignores the clock output (if activated via the 'Wifi external clock' setting).

See future development page for more info.

If anyone wants to try this, then please contact me for details of how it can be accomplished :o)

Tests of latest 'all functions' firmware, including:

  • Horn relay control

  • Lights relay control

  • Timer display

  • WiFi configuration of local network (optional)

LED FLOODS TESTING - May 2020

To see if these cheap 50W LED floods will be bright enough for our local clubs (LSC Peterborough), I'm simply mounting them on a piece of wood (ex pallet), which I intend to strap to our flag pole (old mast).

I've arrange the mounting screws for each light, so I can quickly rotate them 90Âş for testing either way, plus in when horizontal the separation between lights is larger.

Need to sort the wiring, and then hope I get the chance to take them to the lake, set them up, cycle (for the exercise) round to the opposite bank to a simple visibility test.

LED FLOODS

Test mounting - Vertical

LED FLOODS

Test mounting - Horizontal

LED FLOODS

Mains side wired up to lights and SSR module.

Note- None of this is destined for real world usage, just for testing

LED FLOODS

NodeMCU with one level convertor

Note - Was planning to supply VIN from USB power pack (see notes below)

ALL features test rig

More details on the board I've been using to test the ALL features firmware, which consists of:

ModeMCU development board, with builtin Wifi

DC to DC logic level convertors, to ensure 5V logic output to NeoPixels, etc.

One smoothing capacitor (as advised for NeoPixel use)

Everything is jumper connected, so that I can easily reconfigure without a soldering iron :o)

Note the main power for the NeoPixel strip is on a separate connection, direct to 5V supply

ALL features

D1-Mini (Clone)

More details on the D1-Mini Keith's been using to test the ALL features firmware, which consists of:

Wemo D1 Mini (Clone) dev board with builtin Wifi

DC to DC logic level convertor, to ensure 5V logic output to NeoPixels.

PCF8563 Real time clock - So Time available when not connected to DSRC

4 Digit TM1637 Led Clock Display- Mounted on rear of main clock

Note the main power for the NeoPixel strip is on a separate connection, direct to 5V supply

Floods testing - 13-May-2020

Thought I was ready to go, but when I powered the control box with a USB power pack to GND and VIN (like I do for Arduino Nano), it didn't like it...

I spend a while pulling it all apart, as I'd only just finished building the board, and thought I must have something wrong.

But it seems VIN is more 'particular' about the input voltage, and if the power pack isn't at max charge (I assume, not tested), then it fails to operate...

As I wanted to test the LED Floods ASAP, I used the USB connector for the power pack, and used VV for the HV on the logic convertor, and also to power the SSR module.

This worked, but I need to look at how I'm going to power the MCU in future... Probably 12V, as I'm going to need that for other stuff (Horn, Timer)

Possible integration of shore to boat system for hearing impaired

Having been separately involved in the design, development, and testing, of a shore to boat 'safety' system that included a basic race countdown.

I wondered if I could integrate it with the DSRC external interface, so that the lights (LEDs) on the remote 'boat box' where synchronised with the DSRC outputs.

Robbie's Larger Timer

Here's the mockup of my planned larger timer display (still only 4 digits, but enough for LSC), and a couple of 'light block' for signalling (Class, Prep, etc.)

On this one, I'm trying 12v LED strips for i.e. I can use a 12V battery to drive the whole external system)

The strips aren't evert LED addressable, rather every 3, so I've designed the sizing around multiples of three:

  • Each digit segment is 6 LEDs, which means 2 addresses per segment

  • The separator is a compromise of 3 LEDs (usually 2)

  • The light blocks are planned to be 15 LEDs per row, with 4 rows per block

Robbie's Larger Timer

Here's the first stage of construction:

  • LED strips cut to length, and applied to backing

  • The overlay is my planned route for the the data lines

Haven't yet decided on how many power insertion points I'll need, but looking initially at:

  • Start of strip

  • Mid-Digits (i.e. at separator)

  • Start of blocks

  • End of strip

DSRC - WiFi 'HUB'

To address the potential requirement for DSRC to 'drive' multiple WiFi devices at the same time (e.g. Relay units, Timer display, Repeater App, ?), I've been testing the use of a central DSRC WiFi 'hub', which will 'repeat' any/all DSRC commands it receives, out to all devices connected to it.

For the 'hub' in my testing, I've been using a ESP-01 (ESP8266), with a limit of 4 possible connected devices, but it may be possible to included the 'repeat' capability into the firmware of say a relay unit (but the impact on that units 'normal' operations i.e. driving the relay(s) is unknown as yet)

The hub is running in AP mode, and uses the same IP address and port usual i.e. 192.168.4.1 port 23

So instead of connect DSRC to say a single relay unit, you connect to the hub (via your devices wifi settings as normal, just a difference name)

Any relay units, etc. would need to have modified firmware (I've only created a single relay version so far), was acts as a WiFi client, and connects to 192.168.4.1:23

Once these connection are made, any DSRC commands will 'route' via the DSRC hub, to any/all devices linked to it at the time (FYI - there are no checks)

Below is a demo video I made, using a single relay, and an Android App connect to the hub, as well as the tablet running the DSRC app:

Lakeside Sailing Club (LSC) - V2 Race Box

Have been building this up for the last few weeks, with live testing at LSC.

Rather than the usual wifi x4 relay module, this uses a TTGO T-Display, driving a x8 relay board (only using 4 relays at present)

Note - This box, and the temporary light panels are not designed to be out in the rain, and are currently set up under a 'viewing' area attached to our 'club hut'

It currently contains:

  • TTGO T-Display (ESP32 based), which both controls the relays, and displays the light states (really a demonstrator )

  • X8 relay module (wire via level convertor to TTGO)

  • 12Ah seal battery

  • 12V to 24V DC to DC convertor - for LED flood (4x30w total)

  • 12V to 5V DC to DC convertor - for TTGO, level convertor, and X8 relay module (non-wifi)

  • 12V Battery monitor (there to see how the battery fairs post races)

  • 3 x 2pin 'splash proof' connector - for Class, Prep, and remote horn unit (existing horn box)

Still to add:

  • USB 5V socket to power/charge the Android device running DSRC (in case its battery starts running low)

LSC - v2 Race Box - 13-May-2021

Battery monitor added

Battery Monitor

Wired to the 12VDC distribution