Electromechanical Decimal to Binary to Hexadecimal Converter




About: Electromechanical Engineer, Product Designer, Maker. I love to make prototypes and teach others in the process. I graduated from UCF and spent two years working at NASA.

It is using an ESP32 equipped with an OLED display, two mechanical 7 segment displays and 14 relays. I'm using two NXP MC33996's along with the DPDT relays in an h-bridge configuration. To set(display) each individual segment it needs at least a 1ms pulse and to reset the segment it needs to be pulsed with the opposite polarity. This was a proof of concept before I design a much larger clock with 6 digits and 46 relays with two sets of flip dots as colons. The sound is amazing and I could not be happier with how it turned out.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Bill of Materials

(1 ×) ESP32 with OLED Display

(2 ×) Mechanical 7 Segment Displays

(11 ×) LEDs - 0805 SMD

(1 ×) Dual Voltage Power Supply - RD-50A MEAN WELL

(11 ×) 180 ohm Resistors for LEDs - 805 SMD

(3 ×) 470uF Electrolytic Capacitors

(2 ×) 47uF Electrolytic Capacitors

(3 x) Momentary Push Button - SMD

(3 ×) 10K Pull-up Resistors - 805 SMD

(14 ×) DPDT Relays

(14 ×) Schottky Diodes - 1.5KE18CA-T - Used as flyback diodes for the relays

(14 ×) TVS Diodes - 1.5KE18CA-T - Used as flyback diodes for the AC segment coils

Here is an overview of the mechanical 7 segment displays:

Step 2: Schematic With PCB Build Files

You can order the board shown in the video from a PCB manufacturer or you can solder it up on your own with through hole components if you'd like with my schematic.

Step 3: Solder the PCB

In this video I use a stainless steel solder paste stencil to perfect put solder where I want. I use a hotplate set to 170C and a hot air gun to solder the SMD components.

Step 4: Program the ESP32 With the Arduino IDE

Download the Arduino core for the ESP32 here:

Download my attached source code and program your ESP32 with the Arduino IDE.

Step 5: Questions?

Thank you for reading my Instructable. Let me know if you have any questions and I will be happy to answer what I can.

Anthony Garofalo(Proto G)

Epilog Challenge 9

Participated in the
Epilog Challenge 9

Arduino Contest 2017

Participated in the
Arduino Contest 2017

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    13 Discussions


    Question 10 months ago

    Absolutely love this project I just have 2 questions for you. First of all did you order your 7 segments directly from the manufacturer via email? Secondly would you mind sharing your 32-soic breakout boards kicad files so I can breadboard my MC33996s before I make a custom clock? If you've given up on the clock project I'd love to finish it for you!

    Ps I'm enjoying following your delta robot build keep up the good content.


    Question 10 months ago

    First of all, I’d like to commend you on an amazingly cool project and thank you for sharing an instructable.

    I’m currently an Electrical Engineering student in the US, going into my second Junior semester. I’d love to build this to further expand and apply my circuitry knowledge and it’s always exciting to build a new project.

    I have a couple of questions for you. In the comments, I see a few things that have changed and your long comment about said changes including, “So keep in mind if you want to use these gerbers as is, you will need to rework the board just as I did.” I also see that you mention using your own custom built controller? I have also discovered that the MC33996 chips are obsolete on most sites. I will research a compatible chip. I was just curious if this is something you’ve already thought about.

    Ok, onto my question. With the BOM listed and current schematics on the site, can I build this and have it function? I have done several projects in the past and can get through a challenging schematics. I want to be sure that all of the components are compatible as written. I’m still learning and have much more to learn, so I’d like to check with you before I start purchasing parts and get stuck at 95% completion and may not be able to diagnose where I went wrong on my own.

    Thank you for your time and willingness to help those of us attempting to advance to the next level.


    Question 1 year ago

    You list the same part number 1.5KE18CA-T for the relays and segment coils, yet the schematic shows a 1N5817 across the relay coils and 1.5KE18CA-T for the segment coils. Should something be different in the parts list from what the schematic shows?


    Question 1 year ago on Step 5

    Anthony - I would be very interested in your proposed clock. Do you plan to do an Instructable on that as well?


    1 answer

    1 year ago

    Very Very Cool..

    Just a little constructive critique, your schematic diagram is quite difficult to read, and is fairly cluttered.
    I would have shown a the connection from the chip, through the relay and to the segment on a single continuous diagram, but for just one segment, and make a note that the relay circuit is the same for each segment, and then just list off each segment circuit at the NXP chips.

    This would make it easier to follow and far easier for someone to use and expand for their own projects.

    1 reply
    Proto GBenG30

    Reply 1 year ago

    Thanks, I agree, but I will not be updating that schematic any more but I will try to make the clock easier to understand. Feel free to update the schematic as I have released all the build files including the KiCAD PCB files.


    Question 1 year ago

    Are relays obligatory? I mean, they are very expensive - can't we use transistors in H bridge configuration?

    1 answer
    Proto GGawron

    Answer 1 year ago

    The relays are not necessary and are purely a aesthetic decision and the digits could just as easily been driven with an MC33880 operating as an SPI octal h-bridge. The relays are currently used in an h-bridge configuration.


    1 year ago

    I don't even know what the title of this instructable means, but I'm sure its very impressive. I clicked the link in hopes to learn something, but this is just way over my head. I get that you're using flippy numbers to make a clock that clicks... and something to do with binary. LOL. That said, I do think that the resulting clock will be really freaking cool and I hope that when all is finished, you add a video of that. It looks cool, it sounds cool... and thank you for the video explaining the 7 segment displays and your plans - it helped a dummy like me get the gist of what you're trying to do.

    I'm going to have to spend hours now researching "electro-mechanical" and "hexadecimal". I did about 30 seconds of research on them and am more confused than when I clicked the link.

    Anyway, just wanted to say good job, and I think the end result is going to be awesome and I'm actually sorry that I'm not able to fully appreciate it.

    1 reply

    Reply 1 year ago


    Hex is a base-16 numbering system.
    People use base-10 because we have 10 fingers.
    In base 10 there are ten symbols: 0, 1, 2.....9. When you get to 9 you run out of room so you put a 1 in the tens place. Repeat this process until 99. Add a hundreds place, etc.

    In hex there are 16 symbols: 0, 1, 2,....9, a, b, c, d, e, f
    a = 10, b = 11, and so on until f = 15.
    So when you get to 15 (f) you move over to the sixteens place. So "10" in hex actually equals 16. a0 equals 160 (the a is worth ten, but it is in the sixteen spot). a1 = 161, a2 = 162,......FF = 255

    Why do this?
    Hex is a better way to represent binary, a base-2 system. It only uses 0 and 1. So 10 in binary equals two. 11 = 3. 100 = 4.
    Computers & electronics work by turning bits (transistors) on (1) or off (0).
    If you've ever seen a computer crash it spits out stuff like 0xffa0dfff. These are memory addresses

    FF is 255. In binary it would be written as 11111111. This is an 8-bit address.
    FFFFFFFF is a 32-bit address. Imagine trying to read a string of 32 ones & zeroes.