Stelios's Place

A place for thoughts and ideas

Connected Smart Wooden Blocks


   This is a remake of the traditional wooden block toy augmented with RFID technology and an HTML5 web application. The wooden blocks are embedded with RFID tags and a reader is used to identify the blocks and send the data to the HTML5 web application. A PicAxe 08m2 micro-controller is used in the reader module in order to transform the RFID data into usable keyboard data and send it through the USB connection.


Playing with the blocks and the web app.


   Since the microcontroller is lacking any support for USB HID additional software is needed on the PC in order to translate data from the serial port into keystrokes. For Windows or MacOS based computers we can use the AACKeys software (https://aacinstitute.org/aac-keys/) that uses the GIDEI protocol (https://park.org/Guests/Trace/pavilion/gideido1.htm). AACKeys receives ASCII characters from the serial port and translates them into keystrokes. In the case of Linux based computers, the inputattach utility (https://wiki.archlinux.org/index.php/Serial_input_device_to_kernel_input) can be used to read data from the serial port and generate the keystrokes by using the ps2ser (PS/2 via serial keyboard) device option. This means that we will need to send the data as PS/2 scan codes (Make and Break codes!), rather than ASCII characters, like in the case with the AACKeys. but it's still very easy to do it with a PicAxe. A switch on the back of the reader allows us to select the protocol (AACKeys/inputattach) so the reader can be used on different OS computers without needing to flash the micro-controller again.


The RFID reader and the wooden blocks.



The data mode select switch.

   The HTML5 application was created using the GDevelop (https://gdevelop-app.com/) application. It's a great piece of opensource software that helps create HTML5 games or even export them for Android & IOS devices in an easy way. This was my second time using the software to create a game and the experience was very positive. Of course, the HTML5 application will need to run on a web site, either on the home network or on the Internet.


The HTML5 web application - Start screen.


The HTML5 web application - 1st word displayed.


   The reader circuit it's pretty simple and a  very low number of components is needed. Besides the PicAxe 08m2 microcontroller, an RDM6300 RFID reader module is used in order to identify the wooden blocks. A USB-to-TTL converter is used for the serial connection to the PC, a small piezo buzzer signals a successful block read and the switch selects between the 2 data modes. You can have a look inside the reader module here:


The reader module internals.


   I will clean up the code for the PicAxe chip and update this post in the next days. Also, will put the schematic, although the circuit it pretty simple and the pinouts are defined in the source code.

The source code for the PicAxe 08m2 chip is available here.

Comments and suggestions are welcomed.

~stelios

Search

Navigation