It has been an interesting week here in Bangalore. After the students got acquainted with how to use the micro:bit and its sensors, we decided to move on to more complex projects. Over the course of 6 days students worked on Radio communication using the Micro:Bit and building an Electronic Voting Machine (EVM). The latter half of the week was spent in making micro:bit wearable devices, which is detailed in the next blog post.

Why an EVM? India is the largest democracy in the world and has an electorate of about 900 million for the national elections held every 5 years. Safe to say that elections are a very big deal here! Since counting paper ballots would potentially take forever, we employ electronic voter machines - or EVMs as they are fondly called.

Radio

Students learnt about how the radio works using the micro:bit chat example in the tutorials of Microsoft MakeCode. To those unaware, the micro:bit has a BLE (Bluetooth Low Energy) antenna that is capable of sending and receiving messages. As we can see in the example above, sending and receiving messages from just one micro:bit to the other is trivial. Getting multiple devices to communicate with each other requires the use of the radio group feature, and the students used tutorials on the internet to understand how this works. The micro:bit has a very easy implementation of radio communication, one does not need to do any pairing or or specify any SSID or password (unlike using an Arduino with a WiFi module) so this makes it very easy to introduce a fairly complicated concept to very young students. The students tried sending simple messages and later played a simple game of sending coded messages with a key that they had agreed to with a friend, while a third person with a micro bit in the same radio group tried to listen in and crack the code. It was good fun.

One student even tried to make his own SOS distress signal system although he was a little disappointed when I informed him that the range would be too short for it to work in a real life scenario . The video is below!

With the students having learnt about how the Send string, received string and radio group commands work, it was time to work on the EVM!

EVM

{gallery} EVM Machines in India

A EVM Machine in India. Image credits BCCL

Image credits ECI

The EVM itself is a very simple device, It is battery operated and and has a simple one time programmable micro controller along with a control unit. The voters simply press the button of the candidate/party they wish to vote for, and the vote is logged in the machine. The control mechanism is there to ensure that each voter cannot cast a double vote by pressing the vote button two times.

As the minimum age for voting in India is 18, all the students here at the club were too young to vote, but they were not too young to understand and build a simple EVM for themselves! We connected 5 Micro:bits in a radio group, with one Micro:Bit acting as the dashboard to display the number of votes along with the option the candidate had chosen.

Of course, our EVM had to look like an EVM, so out came the markers, sketch-pens and chart paper! The students used a simple sheet of thermocol with a white chart paper for the vote casting device part of the EVM. The names on the EVMs are the names of the students working on building them. A total of five micro:bits were needed, as we wanted to represent eight political parties (A normal EVM has 16 buttons for 16 different candidates). The fifth EVM was the dashboard, which would show the number of votes cast and the option selected.

To implement the buzzer which is there in actual EVMs, they used example number 6 (How to make a buzzer) of the Kitronik Kits they had received. The Kitronik kit contains an array of parts such as LEDs, resistors, capacitors, motors etc. We used the mounting plate, the breakout board and the piezo buzzer. The book was well illustrated, and had examples of how to make a simple program to play different tones by programming the micro:bit. Getting everything to work perfectly was difficult, and there are still more advanced concepts (such as displaying party/candidate wise data on a serial monitor) which the students plan to implement once they learn them. The mounting plate and breakout board were pretty helpful, as they eliminated the need for crocodile clips (which we did not have!)

Here is a video of the first iteration they made! They did not have any instructions to go by this time, as it wasn't a part of the MakeCode tutorials, but I am happy to say that they figured it out on their own!

More posts will follow. Thank you for your support and comments/criticism are welcome!