Smart Alarm Clock

Enter Your Electronics & Design Project for Your Chance to Win a $100 Shopping Cart!

Back to The Project14 homepage

Project14 Home
Monthly Themes
Monthly Theme Poll



Based on the test circuit presented in the previous blog post I have created the three pins open collector and I/O inverter circuit to interface the micro:bit with the 5V SPI 7-Segments display controller.

As a matter of fact, I have only applied the two NPN transistors circuit shown below (a reminder...) to the micro:bit pins 13, 14, 15 dedicated to the SPI protocol.

Circuit Making

The below images shows the circuit assembled on a small piece of prototype board. The building of the clock required a series of different small circuit parts for better usage of the clock case internal space.

Programming Before Connecting!

The first time I plugged the micro:bit in the circuit without caring of what was the program flashed on the board the three transistors become extremely hot in few seconds while the board power led was not lighting. Also without seeing the magic blue smoke, I thought it was the time to say goodbye to my board. Instead, it worked fine when powered it again after unplugging.

I spent an hour testing the circuit in depth and everything was correct, no short-circuits, no wrong soldering etc. Nothing was different as expected.

The last suspect was about the logic levels. As the micro:bit SPI pins 13, 14, 15 was never used they probably drain a lot of current generating this unexpected issue. Not so difficult to verify, I wrote down the simple program shown below"

It is a simple loop sending alternate 010 and 101 outputs to the SPI pins with a delay of 10 ms. Ok, it's a very crap software but should work in this case. After flashing it, I plugged the micro:bit board in the circuit and heating no longer appeared.

What I learned from this lesson: It is a good practice to avoid GPIO signals out of control when connecting a circuit for testing

Testing the Signals Quality

Leaving the program running, I tested the three output signals to the oscilloscope. The levels were very stable with an obvious delay due to the logic of the program

Until now I was lucky, let's see what I can do in the next steps.


Issue Solved

Thanks to John Clift (jc2048 now mentioned correctly...) the reason of the superheating of the transistors is due to the missing 1K resistor between the micro:bit SPI pins and the base of the transistor. After his comment I proceeded to update the circuit as shown in the images below:

Testing the circuit it worked perfectly as shown on the oscilloscope screen below. Thanks John!

Note that the output tracks correspond, respectively to pins 13, 14, 15. As pin 13 is the first to be set and reset, accordingly with the program the second track is 10ms shorter and the third is 20ms shorter. For the same reason, every track is shifted along the time of 10 ms


The Other Parts

Tempus Fugit... Part 1: 1978 a.d.

Tempus Fugit... Part 2: 2018 a.d.

Tempus Fugit... Part 3: micro:bit Interfacing 5V Logic