HUB - Timer (PWM)

DSRC - HUB/TIMER prototype

Background

As you may be aware, both Keith and I (Robbie) have tried to use 'Neopixel' strips to create race timer displays, but the available intensity has been sadly lacking, and in no way 'visible' in sun light.

I had just about given up, but whilst researching mechanical displays and creating a single digit display using RC servo motors (which worked, but not well), I noted that the same PWM servo driver modules could also drive LEDs.

Development

So I set about designing and testing the concept of using PWM to control (on, off, intensity) of more powerful individual LEDs...

Initially I tested using a 7 segment LED display to prove the individual digit segments could be controlled (and I still use this 'rig' for software development/testing).

I then purchased some 10W COB LEDs and MOSFETS (to handle the LED currents), and constructed a single digit display for testing at our club lake (LSC).

This initial testing proved that the 10W LED should be ok for our local requirements (i.e. shore based race control, with starting line nearby)

I then made a second digit and bolted it along side the first one to form a 2 digit display, which is enough for our clubs simple requirements.

Limitations

Only one colour display (DSRC 'clock' commands' include R.G.B. levels for multiple colours). My firmware just uses the largest value in the RGB command to set single colour driver level.

Dependent on the number of digits, the 12V DC current requirements can be quite high, so I only display the count down (and intermittent race elapsed) to save the shared battery which is also driving the signal lights. That said, the design of hub/timer allows for it to be separately located from the signal/horn control box, and could have it's own 12V DC supply/battery.

How it works (operationally)

Once powered, the HUB/TIMER creates a wifi 'hotspot' for the Android device running DSRC and the 'Race box' controlling signal lights / horn to connect to.

DSRC app wifi 'commands' are then sent to the 'HUB/TIMER', which firstly 'repeats' the commands out to other connected devices (i.e. the Race box), and actions clock commands as appropriate.

How it works (functionally)

The PWM driver module (16 channel) is connected to the MCU (in our case a Seeed Studio Xiao ESP32C3) via I2C (just 4 wires).

Each PWM channel can be address separately, and its 'level' set.

The first 7 channels are connected to one digit, and the next 7 channels to the other.

The firmware interprets the incoming time and set the appropriate channels to either off or the current intensity level (calculated from the incoming RGB).

As the COB LEDs require a relatively large current, each channel is connect to the 'gate' of a MOSFET, which then controls the COB LED (using PWM).

If a 4 digit display is required, a second PWM module (plus more MOSFETs and COB LEDs) which is simply 'daisy chained' to the first (again, just 4 wires). Also note, that the PWM modules 'address' would need to be different from the first one, but this is a simple solder a link job.

Notes

A 'constant current' driver for each COB LED would normally be required, but I've tried to keep the circuit as simple as possible by using PWM to 'control' the average current being drawn. This may not be the right thing to do, and I'd be happy to receive any comments on this...

In theory, the size and number of COB LEDs used for each segment could be changed, as long as the MOSFETs (and heat sinks) can handle the current, and of course the more power used equals greater battery drain (and therefore shorter usage before recharge)

Simplified schematic

Note that is is for a 4 digit display.

Each PWN channel is connected to the segment of a digit via a mosfet

There are a number of MCUs that could be used, as long as it supports both wifi and I2C. Examples:

The power wiring is also simplified. Each COB LED is connected to 12V + and the mosfets to 12V -

Single segment schematic

Each PWM channel output is connected the 'gate' of a mosfet.

All mosfet has its 'drain' connected to negative of 12V DC supply

Each moset has its 'source' connected to the -ve terminal of a COB LED

All COB LEDs have their +ve terminal connected to positive of  12V DC supply

Below is a short video created to inform the LSC racers how the display will look during count down

Note - The brightness of the display is turned down to 10% to avoid 'burning out' the camera (brightness controllable via DRSC wifi settings)

More videos available on the DSRC Youtube channel

Seeed Studio Xiao-ESP32C3

This wifi (and bluetooth) capable module is tiny, powerful, and comes complete with an small 'stick on' external antenna to extend the wifi range.

It's very easily programmed via Arduino IDE.

For the HUB/Timer functionality, only 4 pins are used:

I'm powering it at the 5V pin as I already have a 12V to 5V convertor feeding the PWM module (to drive the mosfets)

PCA9685 16 Channel PWM

Pins on the left are for the I2C bus coming from the MCU (Xiao ESP32C3).

Pins (well holes for) are for daisy chaining to the additional boards  (if you want more than 2 digits). It's a simple mater of connecting pin to pin i.e. GND-GND, SCL-SCL, SDA-SDA, VCC-VCC. 

At top right is the addressing links. In this example all links are open, which equates to an address of 0x40. Soldering across the right most link (A0) would give and address of 0x41, and so on...

The green terminal connector at the top is for an external to power the servos, or in our case the mosfets. This avoids overloading the VCC input from the MCU.

At the bottom are the 'servo' outputs (normally PWM, v+, GND), but I'm just using each PWM to feed the mosfets, plus a common ground.

LSC demonstrator kit

LSC - Two digit timer display

This is our prototype timer display, which has been tested on live racing, and received good readability reports from a reasonable distance (circa 200m) in sunlight!

LSC - Two digit timer display (back)

Please excuse my prototype wiring, but it is supposed to be a demonstrator :o)

Haven't put the ESP32C3 on a 'proper' board yet, as I wanted to ensure it was going to work. Especially as I have added a 433Mhz module and antenna for 'remote control' testing.

Larger version - "Mk2"

Given the success of the PWM timer display at LSC, I am making at slightly larger version (approx 1.5 times bigger). 

The power of each LED COB strip remains the same i.e. 10W, but I'm hoping the 'larger digits' will be easier to read across the lake (time will tell...).

Initial mockup

To see how a digit might look using 200x10 LED COBs, I cut some cardboard strips and laid them out on a wipe board.

The current timer is shown for initial comparison...

I thought this looked good, and ordered the LED COBs, MOSFETS and associated bits.

Test fitting

After acquiring a sheet of aluminium and perspex board large enough for the two digits, I marked the LED positions, drilled the sheet/board, and bolted them in for now.

Much more drilling to do for the wiring, and I haven't made my mind up where best to position the MOSFETs. 

Current vs Planned timer display comparison

Test hanging of Mk2

As I was running the races, I took the opportunity to test hang the 'Mk2' timer display to judge what length the 'ropes' should be to allow hanging to the existing eyes.

Around 16cm should let me hang it to left, right, or centre of the target window (hung from centre eyes in photo) .

And yes, it is hung the wrong way around for the photo :o)

Road sign mockup

A friend from Peterborough Sailabilty has kindly donated me yet another old road sign (seems the signage wears out), so I can use this as both a black background and a mounting frame (as I have with the LED flood lights).

Awaiting standoffs (both brass and nylon), PWM module (so I don't have to use my test rig one) before I start the wiring...

Main components fitted

27-Jun-2023 - Finally got the main components completed and fitted to the back of the display ready for wiring up (that will take a while).

I tested the main board in the MK1 timer display, and that worked fine (so I haven't managed to screw up the wiring on that :o).

There is still a few hardware pieces to go:

PWM wiring

28-Jun-2023 - MOSFET 'gate' wiring to PWM module completed (apart from heat shrinks, so I can get at 'source & drain' pins easier)

I used the earth line of the mains cable I dismembered. The blue and brown are to be used for the 12VDC line (all 6A rated).

Note - Bought 4M of three core cable, and only had a approx 30cm left after this step, so a very lucky guess on my part :o)

12VDC wiring next... 

MOSFET Source wiring

30-Jun-2023 - MOSFET 'Source' wiring from MOSFETs to LED -Ve connections completed (apart from heat shrinks, so I can get at 'source & drain' pins easier).

12VDC -Ve wiring from distribution boards to MOSFETs next (another 14 wires...)

Wiring complete

02-Jul-2023 - Wiring complete (well nearly all)...

Still need to:

LEDs masked ready to spray

03-Jul-2023

Post spraying and dry

03-Jul-2023

After masking removed

03-Jul-2023

Electronic complete

04-Jul-2023 - All electronics completed, including the LSC 'special' 433MHz remote control...

Still waiting for standoffs for final mounting to road sign :o(

Done...

07-Jul-2023 - Mk2 is finally complete and ready for live testing...

Expecting I may have to 'tweak' the level up a bit, but I'll try at 80% first to see if it's needed.

LSC - DSRC remote

Traditionally LSC has a very small racing fleet (4 to 10 boats), so 'loosing' one boat for OOD has a major impact.

In an attempt to get around this, I have added a 433 MHz remote control system which allows someone on the water (me at present) to control the DSRC app via two buttons.

It's not perfect, as timings cannot be associated with boats when they are captured. So a 'TBA' is created for each finishing time, and then assigned to the correct boat post racing (as we usually do two races 'back to back').

I do have one extra 'trick' to help me get the assignments right: Another app installed on a waterproof phone positioned so that it's inbuilt camera can 'see' the start/finish line receives the DSRC external commands, and when it gets race start or finish, it takes and stores a photo of the line. The filenames include numeric ordering so I can determine the boat finishing order and assign the TBAs in that order... 

This app has only been developed for my specific phone at present, and does exhibit a delay between finishing photos due to the time taken to save the image, but it has been good enough so far, even with close finishes...

And please forgive my terrible hot gluing... It was my first attempt, and it had to fix the micro USB socket for battery charging :o)