8ch LED Driver for Configurable and Programmable Effects
Add Picture
Harlech is an easy to configure (or code and program) driver for 8 regular LEDs. It talks to the Arduino compatible Wemos D1 Mini below it, takes it's control message and switches the output on and off. It doesn't need resistors to protect the LED's from blowing, as each output limits it's current, using the lower control knob. If you wire the LED's the wrong way around, nothing will break, they just won't light up.
It also has a keepalive circuit that pulls enough power, every 20 seconds (that's programmable) or so, to keep your USB power bank switched on.
Lots of code examples are here, but you can also download to the Wemos D1, code directly from your browser. It's still in prototype, but you can find it at: https://audio-rochey.github.io/ESP-Web-Tools/
Add Picture
A wemos D1 mini acts as the brain. It treats the Harlech Castle board like a shift register - a 74HC595. Any Arduino examples you have with those boards should work. You'll need a Wemos D1 mini and solder pins of sockets pointing up, then the opposite gender connectors from the Harlech Castle down. You may have to solder the 16 pin header on the Harlech. The Left side of that header is for the Cathode (negative) side of the LED, the right side is for the Anode (the long leg of the LED!)
The latest Harlech boards allow you to use D3 or D7 from your Wemos D1 mini as a OE (output enable) - otherwise known in serial communication as "Chip select".
Harlech boards have a 3 way jumper, allowing you to connect the middle pad up to D3, or down to D7

I used a 2x8 IDC connector ( Amazon ) and (Amazon ) 16pin 1.27mm ribbon cable to handle the outputs from Harlech. Doing so allows you build your terrain to a single connector then connect them in one go to the Harlech board. Alternatively, if you're mainly familiar with a wire wrapping tool - that works too! - just a little less flexibility later on! :)
Pinout for the LED connectors is as follows:
On a ribbon, it goes OUTPUTx, 5V, OUTPUT6, 5V etc.

| LED Output Header Pin | Wemos D1 Pin |
|---|---|
| KeepAlive | D0 |
| Serial Clock | D5 |
| Serial Data | D6 |
| nOutputEnable | D7 (default) or D3 (optional) |
| Latch | D8 |
| SCL (I2C) | D1 |
| SDA (I2C) | D2 |
| Spare Pin | D4 |
Driving up to 8 LED's in parallel means that it can be used like a conwy castle board on steroids. By changing the code written on the Wemos D1 mini's, interactive lights can be done as well. Code examples available here are:
- Patterns, similar to a player piano
- 8ch of independent candle flicker
- Responsive LED's (e.g. depending on a sensor)
This one makes a website on your wifi you can visit.
The board is designed to use as many of it's pins as outputs. D1 and D2 are available to use as INPUT, without any modification. Just make sure that you're signals are 3.3V. In addition D3 can be used if you solder the solder jumper to D7. A0 (Analog Input) is connected to the upper control knob.
Note: If D1 and D2 are both held HIGH (1) or both held LOW (0), the outputs from the MotorA and MotorB pins will be LOW. Crossed out pins cannot be used as an input, as they have various functions at power on.
D1 or D2 can be used with a 1838 IR Reciever. There's code examples, make sure you tell it which pin you're using! :)
In Arduino, you can drop the power consumption significantly by adding the following lines in your SETUP function.
// Disable the Modem on the ESP8266/Wemos D1 Mini
WiFiMode(WIFI_STA);
WiFi.disconnect();
WiFi.mode(WIFI_OFF);
delay(100);
These lines drop the current consumption from about 80mA to 14mA.
Harlech board comes as a preassembled board that only needs headers for the pins soldered.
- 1x Harlech Castle Board
- 1x 2x8 Right Angle Connector
Your Wemos D1 typically comes with all the connects you need to make a daughter card connect to it!
Version 1P1 schematics are in this folder. Look for the PDF.
Firmware and Schematics for the Harlech Castle 8ch LED controller
A short video of the current PG1.0 schematic is below.




