ArClock - a Smart Display Wrapped in Real Wood

28,382

371

150

Introduction: ArClock - a Smart Display Wrapped in Real Wood

ArClock is my updating of the "LED clock inside a block of wood" idea. It's a pretty simple build and the result is eye-catching but tasteful (depending on how it's configured!).

It's built around a WiFi-enabled microcontroller driving a matrix of addressable RGB LEDs, inside a 3D printed case covered in wood veneer. It uses a NTP to display accurate time, and can also display local weather and ping times. The configuration is all via a built-in web interface.

Check out the video for a quick intro on how to build and configure it:

Supplies

The parts required are:

Total parts cost is around $32. You'll also need:

  • Access to a 3D printer with a sufficiently large bed. I designed this to support common printers such as Prusa i3 and Creality Ender 3, but if you have something smaller please do check before going any further.
  • Some hookup wire rated for at least 4A (e.g. 22 AWG).
  • A 5V power supply with 2.5mm jack. I'd suggest a good quality 4A supply with over-current protection, but it depends on how bright you want the display. 2A is probably adequate in practice, but I prototyped with an 8A supply (after my original one blew up when the brightness went too high!).
  • Contact adhesive such as Thixofix.
  • Polyurethane wood varnish (I used one coat of Yacht varnish and two of clear).
  • Sandpaper of a couple of different grits (around 120 and 200).
  • Soldering iron & solder.

Step 1: Printing

The design prints in just two halves. The STLs and the OpenSCAD source code are available here:

https://github.com/mattaubury/ArClock

The slicer and printer settings don't matter too much, but I went with:

  • 100% infill
  • 0.2mm layer height
  • Brim for bed adhesion
  • White PLA
  • 210° nozzle
  • 60° bed
  • 40 mm/s

This is a relatively large design, so at these settings it will take over a day to print.

You should use whatever settings print cleanly on your machine. The surface finish doesn't matter very much (we'll be covering it up later), but you want to avoid significant blobbing or stringing as this can make it difficult to insert the LED matrix.

Step 2: Electronics

The circuit is relatively straightforward.

We wire power from the DC jack directly into the matrix. Because the matrix is quite large I supply power at all three of the available points (input, output and middle of the matrix).

Power is also supplied from the jack to the ESP8266 board via the diode. This allows the final design to be powered from a single jack, but means that when programming the ESP8266 over USB we don't pass power from USB to the matrix (which can easily draw >4A, far beyond the limit of the USB connection).

The only other connection is the single wire control signal from the ESP8266 to the matrix.

I used 90 degree headers on the ESP8266 to make soldering it together easier, with heatshrink to keep everything neat.

There is some advice on the internet (e.g. https://learn.adafruit.com/adafruit-neopixel-uberg...) that suggests using a decoupling capacitor on the matrix, and adding a resistor between the ESP8266 and the matrix control wire. I haven't used them here, but would suggest at least using the decoupling capacitor.

At this point I'd would skip ahead and program the ESP8266 to check that everything works as expected, before continuing with the assembly.

Step 3: Assembly

To assemble, start by screwing the ESP8266 board onto the base. You'll need a couple of small self tapping screws - I scavanged mine from some defunct equipment; they're quite common for mounting PCBs in things like kids toys. Check that the Micro-USB connection is accessible from the bottom of the case.

Now slide the LED matrix into the main part of the case. It's something of a tight fit (perhaps I should have allowed a little more space!) but it will fit with a little gentle persuasion. If you're struggling, try curving the short ends of the matrix very slightly. As you slide it in you might find it catches - often this is because one of more LEDs has wedged itself in one of the case holes. Gently poke it with a screwdriver whilst applying pressure to the matrix and you should find it slides in okay.

Now insert the DC jack. The lugs on the jack should be bent at right angles, and you may need to gently open the case up a little to fit the jack in. If you struggle to get it through the hole, just open it up a little with a knife.

Once that's in, make sure the connections to the matrix are secure, place a thin line of superglue along the fin of the base, then slide the base into the main body. Hold it securely for a few seconds and you're done.

Step 4: Applying the Veneer

Cut the veneer into pieces large enough to cover each of the front, back, top and sides of the case, with a decent margin around the edge (say, 1cm). In the rear piece, make a hole just big enough for the power connector to fit through in roughly the right place. You may also choose to add veneer to the bottom edge.

Proceed in stages, applying first the rear layer, then the two sides, then the top, and finally the front. You'll need to allow the glue to dry after each stage, then trim and sand, so this will take a while.

For each stage, apply a thin coat of contact adhesive to both the case and the "inner" (paler) side of the veneer. This can be a messy process, so wear gloves and ensure you have excellent ventilation. Wait ten minutes until the adhesive is touch dry, then bring the veneer and case together and press firmly all over to ensure good contact, particularly around the edges. You might choose to clamp the veneer whilst the glue dries (I didn't), but take care not to use too much pressure as the veneer can be easily damaged.

Allow a couple of hours for the glue to dry, then trim the veneer with a sharp knife. Don't try to trim it exactly, leave around 1mm margin. Then, use a medium grit sandpaper (e.g. 120 grit) to sand the veneer flush along the edge.

Once you've applied veneer to each (visible) side, it's time for the finishing touches.

Step 5: Varnishing

Before varnishing, remove any excess adhesive around the edges, rub down the body with a fine (200 grit) sandpaper and clean off any dust or marks with a little white spirit.

The choice of varnish is very much a matter of taste - it's worth experimenting on veneer off-cuts to find a combination you like.

I found the maple too pale by itself, so I applied a single coat of yacht varnish which has a orange tinge to it, bringing it closer to oak in shade. I then applied two coats of clear satin polyeurethane varnish to get a nice finish, rubbing down with a fine (200 grit) sandpaper in between coats. Follow the instructions on your chosen varnish for drying and re-coating times, and remember to work in a well ventilated area.

Allow the final coat to dry fully then fit the nut on the power connector to secure it in place.

Step 6: Programming

First, install the Arduino IDE and add the ESP8266 package as described here: https://github.com/esp8266/Arduino

Select the "LOLIN(WEMOS) D1 R2 & mini" board.

Add the following libraries in the Library Manager:

  • ESP8266-ping
  • Adafruit GFX Library
  • NeoPixelBus by Makuna
  • FastLED

Then compile the sketch from GitHub (in the ArClock subdirectory):

https://github.com/mattaubury/ArClock

If you've never used an ESP8266-based board before, you will need to install the CH340G driver, e.g. from here https://sparks.gogo.co.nz/ch340.html.

Plug the board into your computer. Select the port in the IDE, and download the code to the board.

Now connect 5V power via the DC jack.

Step 7: Configuration

Once plugged in, ArClock will briefly show a blue animated WiFi logo, which indicates that it has created a temporary WiFi network.

Connect to this network on your phone - after a few seconds you should see a page which lets you enter your network name and password. Make sure you click done, then click the reboot button to restart the clock.

If all has gone well, you'll see the WiFi logo turn green and after a second or so the clock should display the current time (in UTC). If there's a problem, the clock will give up after 30 seconds and create it's own network again.

Assuming it's succeeded, point your browser to http://arclock.local to connect to the clock. From here you can try out various presets and tweak the appearance of the clock.

In order to get weather data, you'll need to enter your location and get a free key from https://openweathermap.org/.

You can automate changes to the display via webhooks. For example, to display a message you can use:

curl   http://arclock.local/show   -d message="Your Message Here"

Or to change the brightness:

curl  http://arclock.local/update  -d brightness=10

Step 8: Closing Thoughts

Thanks for reading this far! I hope you're tempted to build an ArClock, please let me know how you get on in the comments below - I'm happy to answer any questions!

A few thoughts on the design:

  • The OpenSCAD code can be tweaked with various parameters - it should be possible to modify it to support other boards or vary the curve of the display.
  • I tried a few different wood veneers before settling on maple. I'd strongly suggest going with a pale wood with only light figuring, otherwise it will block much of the light. Even oak gives a strong cast which filters out almost all the blue light.
  • The code is reasonably well commented so it should be easy to tweak the behaviour and add new features. But note that RAM is very short on the ESP8266 and the code already uses most of it.
  • Note there's no authentication whatsoever, so ArClock should only be used on trusted networks!

11 People Made This Project!

Recommendations

  • Rice & Grains Challenge

    Rice & Grains Challenge
  • Puzzles Challenge

    Puzzles Challenge
  • CNC and 3D Printing Contest

    CNC and 3D Printing Contest

150 Comments

0
s927757
s927757

Question 2 months ago on Step 6

Can it change RX pin to another ? I didn't find the location in code . How to do it ? Many thanks!

0
Matt Aubury
Matt Aubury

Reply 22 days ago

The library in use (NeoPixel, https://github.com/Makuna/NeoPixelBus) is designed around using the DMA engine to drive the LED matrix, and that's only available on the specified pin. I think maybe the library can be configured to use UART mode with other pins, but I'm afraid I've not tried it. If you want to add a second or larger display, it's probably easier to chain then together.

0
seledkin87
seledkin87

7 weeks ago

Good day! I have assembled your project on my knee (so far without the case). I figured out a little bit about the display of information that is displayed on the second display (if it is absent).
I would like to implement the output of information on one display in the "running line" mode - in the format "HH:MM:SS DD/MM/YYYY", or statically switchable - HH:MM:SS, showing 25 seconds, then the date output "DD/MM/YYYY" is also 25 seconds, then - output of weather information. I would also like to see the possibility of implementing the Cyrillic alphabet

0
Matt Aubury
Matt Aubury

Reply 22 days ago

Hi - sorry for the delay in replying. I think what you want to do is certainly possible. For a running display you can re-use the logic in message.h; just adding something that resets the message each time it finishes being printed. It might be quite distracting though!

Cycling between two different outputs sounds like a really nice idea. I think you'd want to add another format box to the settings page (page_template.h), then a bit of logic in ArClock.ino to switch between calling "clock(F("secondary"));" and "clock(F("tertiary"));" depending on the clock seconds value. I don't have time to implement this myself, but if you do it I'd love to include it in the code.

Adding the Cyrillic alphabet would be possible but might starting running into storage space issues - it's already a bit tight. It would certainly be possible with something like an ESP32. You'd need to hand design the characters though!

0
joancb
joancb

4 weeks ago

Hello Matt,
Good project and clock, thanks for it, I also made it.
But I have a "little" problem (I'm new in Arduino and esp8266): my ArClock only starts if it is plugged with the usb cable to the computer otherwise only shows a white wifi logo and nothing happens...
Any idea?

0
Matt Aubury
Matt Aubury

Reply 22 days ago

Hmm that's odd. If the white logo is animating then it's trying to connect to your WiFi network. It will do this for about 30 seconds before giving up and creating it's own private network (IIRC the logo turns red in this case). If it's not animating then something odd has happened - I'd try checking the PSU voltage and making sure it can provide enough current. After that I'd try reflashing the ESP8266 and if that fails perhaps trying a different board?

0
BertrandD5
BertrandD5

2 months ago

To post any message with Jeedom, you can simply create a scenario and put a PHP code, the value of the variable "arclock" will appear on ARCLOCK !
Change the IP adress.

code :

// Generated by curl-to-PHP: http://incarnate.github.io/curl-to-php/
// -> curl http://arclock.local/show -d message="Your Message Here"

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://192.168.1.23/show');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
$Variable_J = "arclock";
$tabJ = $scenario->getData($Variable_J);
curl_setopt($ch, CURLOPT_POSTFIELDS, "message=$tabJ");
// curl_setopt($ch, CURLOPT_POSTFIELDS, "message=yo yo");
$headers = array();
$headers[] = 'Content-Type: application/x-www-form-urlencoded';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close($ch);

IMG_5156.JPG
0
nikolovvd62
nikolovvd62

8 months ago

Hi, Matt!
I have been planning to do NTP clock with matrix display for a long time.
Maybe that's why it happened right away.
I have two displays. How do I turn on the second display to the D1 mini?

0
Matt Aubury
Matt Aubury

Reply 8 months ago

I think the easiest way is probably just to daisy chain the output of the first matrix into the second. You'd need to figure out how to configure NeoPixelBus so that everything works as expected - there's a bit of information here https://github.com/Makuna/NeoPixelBus/wiki/Matrix-Panels-Support but it would probably take a bit of trial and error. Good luck!

0
Art_Lieberman
Art_Lieberman

8 months ago

Hi, Matt. I built your clock a year ago and enjoyed this as my first Arduino project and my first 3D printing project. I was drawn to the project by the idea of shining the LEDs through the wood veneer.
Now, a year later, I am reviewing the programming. More impressive than the original idea of how the time should be displayed was: the programming. You had put a TON of time and energy and knowledge into the code for the user interface and the Internet interface. Soooo impressive! I applaud you.

0
Matt Aubury
Matt Aubury

Reply 8 months ago

Thanks Art! Hope you're still enoying your clock.

0
Logan0184
Logan0184

9 months ago

Hello Matt,
Very nice watch, I made one too. I ask you to help me with the weather, is it possible to make a running line with weather readings from the site https://openweathermap.org/ for today and tomorrow. I can send an example, there is a project of one Ukrainian homemade lover, but his project is built on matrices max7219. Is it possible to write a sketch on WS2812B. Thank you in advance!!!
https://github.com/IZ76/VZ_Clock

0
Matt Aubury
Matt Aubury

Reply 8 months ago

Hi there - it would certainly be possible. The code already reads data from openweathermap (see weather.h), so it's just a question of formatting the response into the string that you want and calling the show_message() function to display it. Hope that helps!

0
Logan0184
Logan0184

9 months ago

Привет Мэтт, Очень хорошие часы, я тоже сделал. Прошу помочь мне с погодой, можно ли сделать бегущую строку с сообщениями о погоде с сайта https://openweathermap.org/ на сегодня и завтра. Могу выслать пример, есть проект одного украинского любителя его самоделок, но проект построен на матрицах max7219. Можно ли написать эскиз на WS2812B. Заранее спасибо !!!

https://github.com/IZ76/VZ_Clock

0
amarston
amarston

1 year ago

Hi Matt,
Great instructable thanks. I have hit a problem compiling the code as it tells me that "Pinger.h no such file or directory", I searched Github and tried a random Ping file but that hasn't worked. Nobody else seems to have had this problem so I am confused as to what I'm doing wrong. Any help would be very much appreciated. Thanks.

0
Matt Aubury
Matt Aubury

Reply 1 year ago

Hmmm. I've just tried installing and building completely from scratch on a new machine and not had any problem. My guess is that you're missing the ESP8266-ping library. If you go to Tools > Manage Libraries you should be able to search for it and add it from there.

Let me know how it goes,
Matt

0
amarston
amarston

Reply 1 year ago

Thanks for getting back to me so quickly. The ESP8266-ping library is installed which is why I'm so confused. Checked again and still the same error when compiling.

ArClcok.PNG
0
Matt Aubury
Matt Aubury

Reply 1 year ago

I'd suggest going back and un-installing and re-installing the various ESP8266 libraries (and perhaps the board package too). Sorry I can't suggest anything smarter!

1
amarston
amarston

Reply 1 year ago

Hi Matt, I'm trying to do that but how do I un-install the libraries? I have tried going to Manage Libraries but it isn't obvious how to do this for me at least. I uninstalled Arduino so I could start from scratch but it seems to remember everything from the previous install so all the libraries are still there. I am not great at using Arduino but I'll keep plugging away at it, I'm sure there are tutorials on the web. Thanks for your help, I'll let you know how I get on.

0
Matt Aubury
Matt Aubury

Reply 1 year ago

If you go to File > Preferences in the IDE it will show your "Sketchbook location", within this folder there's a directory called libraries and you can just delete any you are having trouble with. Good luck!