Showing posts with label BBC Micro:bit. Show all posts
Showing posts with label BBC Micro:bit. Show all posts

Tuesday, 28 February 2017

Retro LED Displays

I recently brought some of these rather nice Texas Instruments TIL311 hexadecimal displays from eBay, they are really small but beautiful.  This got me thinking, could I connect one of these displays to a micro:bit.  

TIL311 Displays















Looking at the TIL311 datasheet, I came across the first hurdle.  The TIL311 is a TTL device and needs 5v to work but the micro:bit runs at 3.3v so I needed a level shifter / buffer IC to interface between them, you could probably get away without a level shifter but I aired on the safe side. I chose the 74HCT244N but I used a 74HC244N as this is what I had in stock.


The TIL311 has a 4-bit data input A,B,C,D  which I connected to pins 0,1,2 & 8 on the micro:bit via a 74HCT244N and used separate 5v supply for the display.  To figure out how to display 0 to 9 I looked at the truth table for a 7490 decade counter and then replicated this in Python by turning the outputs on and off.



















The finished project






My rather noddy Python code, I'm sure there must be a neater way of doing this.


  1. from microbit import *
  2. pins = [pin0, pin1, pin2, pin8]
  3. while True:
  4.     0#
  5.     pin0.write_digital(0)
  6.     pin1.write_digital(0)
  7.     pin2.write_digital(0)
  8.     pin8.write_digital(0)
  9.     1#
  10.     pin0.write_digital(1)
  11.     pin1.write_digital(0)
  12.     pin2.write_digital(0)
  13.     pin8.write_digital(0)
  14.     sleep(500)
  15.     2#
  16.     pin0.write_digital(0)
  17.     pin1.write_digital(1)
  18.     pin2.write_digital(0)
  19.     pin8.write_digital(0)
  20.     sleep(500)
  21.     3#
  22.     pin0.write_digital(1)
  23.     pin1.write_digital(1)
  24.     pin2.write_digital(0)
  25.     pin8.write_digital(0)
  26.     sleep(500)
  27.     4#
  28.     pin0.write_digital(0)
  29.     pin1.write_digital(0)
  30.     pin2.write_digital(1)
  31.     pin8.write_digital(0)
  32.     sleep(500)
  33.     5#
  34.     pin0.write_digital(1)
  35.     pin1.write_digital(0)
  36.     pin2.write_digital(1)
  37.     pin8.write_digital(0)
  38.     sleep(500)
  39.     6#
  40.     pin0.write_digital(0)
  41.     pin1.write_digital(1)
  42.     pin2.write_digital(1)
  43.     pin8.write_digital(0)
  44.     sleep(500)
  45.     7#
  46.     pin0.write_digital(1)
  47.     pin1.write_digital(1)
  48.     pin2.write_digital(1)
  49.     pin8.write_digital(0)
  50.     sleep(500)
  51.     8#
  52.     pin0.write_digital(0)
  53.     pin1.write_digital(0)
  54.     pin2.write_digital(0)
  55.     pin8.write_digital(1)
  56.     sleep(500)
  57.     9#
  58.     pin0.write_digital(1)
  59.     pin1.write_digital(0)
  60.     pin2.write_digital(0)
  61.     pin8.write_digital(1)
  62.     sleep(500)

Friday, 17 February 2017

A Marvelous Micro:bit Afternoon

On Thursday 16th Feb I went along to the National Museum of Computing to show some of my micro:bit projects at their Bytes Festival.   I was sharing a table with the amazing David Whale and Nevil Hunt who also had some fantastic micro:bit demos on display.

If you are visiting the amazing Bletchley Park then do also visit the museum as it’s such a fantastic place and has loads of amazing historical computing items on display.  Follow the links below for more details about both museums



My micro:bit projects on display, I took the Megabit and Micro Simon game along. There was lots of interest in both.

DSC02468





David Whale had some excellent micro:bit demos on display, the teleporting giraffe was a big hit.

DSC02472


Nevil Hunt had some of his amazing zbit:connect projects on display.  To find out more about these amazing boards - click here

DSC02489

Philip Catterall had some really interesting accessible music projects on display, you can find out more about these awesome projects here.

DSC02492

Two British Computing hero's.  David Allen who produced the 1980's BBC Micro programmes and Bill Thompson a leading member of the BBC's Make It Digital campaign. They are in front of the amazing EDSAC Replica Project.

Two British Computing heros

Some more pictures from the day can be found on my Flickr page.

The day ended with a fantastic talk by Bill Thompson about the challenges of the BBC Make it Digital campaign and the BBC micro:bit roll out.

Finally I would like to thank everyone at the museum for making me feel so welcome. I would also to thank David Whale from the Micro:bit Foundation for inviting me along and giving me the opportunity to show some of my micro:bit projects.

On a footnote, the National Museum of Computing have produced a short video of the micro:bit day at the Bytes Festival on Thursday 16 February.   See if you can spot the Megabit.

Wednesday, 11 January 2017

Micro Simon

I recently stumbled across some excellent micro:bit resources on this website,  I liked the look of the micro Python Simon game project so I built the project to try it out.  

 Micro Python Simon game 

















More details about the BBC micro:bit  Simon Game I used as a starting point can be found here  

This gave me an idea, could I connect a micro:bit to an vintage MB Simon game hmmm.   The original full sized game uses a custom MB Electronics processor (the MB4850) which performs nearly all of the functions for the game. The only other significant piece of electronics is a SN75494N chip which interfaces the processor to the light‐bulbs and the built in speaker.

After a quick hunt on eBay for a broken Simon game, I managed to find one cheap. While I waited for the game to arrive, I knocked up a quick circuit with some 2.5v MES light bulbs and a ULN2003A Darlington transistor array to drive the bulbs. Now for the next part of my cunning plan….

Testing my idea

















Breadboard Layout - Showing added bulbs and ULN2003A 


























When the game arrived I duly took it apart, sadly it didn’t work and was pretty beaten up, oh well. I found some useful information about these classic Simon games here, included on the site was a schematic which helped me trace out the PCB layout so I could tap into the existing bulb and switch circuits. 



MB Simon secrets revealed 

Simon circuit board top view

Simon circuit board bottom view































































More testing 




































I removed the existing custom processor and SN75494N chip and soldered some new wires to the existing colour switches and bulbs.   I then connected these to my existing breadboard layout and gave it a quick whirl.  It worked brilliantly, another awesome micro:bit hack in the bag.

Finished project



















Finally I modified the existing code, which can be found on my github.


Update 12th February 2017


I took my Micro Simon game out on the road and it performed well but the bulbs weren't very bright.  Despite some experimenting to see if I could get the bulbs any brighter, I couldn't so I decided to build some LED modules to replace the existing bulbs.  I brought some of these TruOpto OSPW5111P high intensity white (30000mcd) LED's from Rapid Electronics and set about building the LED modules on a small piece of stripboard.

LED Modules completed.

















I removed the existing bulb holders from the MB Simon game PCB and installed the LED modules.

















A final test 


































Monday, 31 October 2016

Micro Operation

Take one classic Operation game and connect a BBC micro:bit to it, what could be more fun.  Having seen a similar project I thought I would have a go myself, so I had a quick browse on eBay and found one cheap. 





























A few days later the game turned up and it appeared to be in good condition.  I removed the existing black box containing the electronics, the batteries had corroded but luckily only the battery connections had been damaged. I took everything out and connected some new wires to the tweezers and connection to the metal plate.  I also replaced the existing LED.


Existing electronics, somewhat crusty.












Existing electronics removed and new wires connected.
















I connected the new wires up to the GPIO pins on the BBC micro:bit and tried out the awesome code written by David Whale.  I used my new Proto-pic exhi:bit Prototyping system for micro:bit but the Kitronik prototyping system would work just as well.  The game was fun to play and had some awesome animations. After 3 operations, if you are successful in the operation time limit, the man jumps out of the bed and walks away.





BBC micro:bit Edge Connector 
Operation game connections
P0 pin
Tweezers, active high
P1 pin
Nose LED via series resistor
P2 pin
Speaker, other pin to GND
+3V
Internal metal plate


You will need:
1 x Operation game
1 x BBC Micro:bit
1 x 5mm Red LED
1 x Suitable resistor for your LED (I used a 47)
Connecting wires
1 x speaker or piezo

The code was written by David Whale and can be found below.

A simple version of the game can be found  here  

Full version of the game can be found  here