Demo and Video of Ultra Dance

So, Monday 27th April 2015, the day of the device demonstration in front of the lecturers. An amount of 60% mark will rest on the proceedings of today. Two lecturers will come around at our table one-by-one to listen to our presentation and see the demonstration of our project. They are also interested in hearing about the motivation behind our project, the challenges we faced, the team and their responsibilities and the time spent doing this project; which was roughly 120 hours.

The result was a relief nicely worked! Sriram seems pretty happy with every projects that came out in this class. I did not think we were able to pull this off in the first workshop session. The previous projects had seemed to be too advanced for us, but eventually time and our effort has proved us all wrong, and we are all glad that they did.

And here’s the introduction video for you all!

Not to forget, Thank you for Ying Shan for helping us shoot this video. Thank you to Sriram Subramanian, Jarrod Knibbe and all the lecturers and researchers who dedicate their time to give us this opportunity. We really appreciate everything you’ve taught us.

With this, we conclude the Interactive Device Series. I really had fun doing this project. Hopefully there will be another chance to delve deeper into this topic in the future!

Trying to Understand the Ultra Dance!


Our device finally has presentable features that worked and are good enough to be submitted. What’s left to do is to design the packaging, and experiment to learn the limitation and characteristics of our prototype.

Our first experimentation session was held in MVB and we wanted to experiment with various settings. We decided to start experimenting with different music patterns. We hooked up the device to the 2 testers; which is Damas and Sattu, they are so used to with test and tasted the enjoyful feeling of being shocked with the electrode. By using the BeatDetect class to extract beats from the Bruno Mars’ Uptown Funk music, we found out that between the Kick, Snare, Hi-hat music pattern we currently able to extract, the Kick (Bass Drum) music pattern is the most visible and most synchronised one. We also began to test out the effect of every variable we could modify. The intensity obviously increases the current and thus creates a more visible gesture but also increases the pain felt. The pulse rate affects how hard was the climb of each pulse; a slow slope or a steep cliff that was felt by the tester. The pulse width did not really affect so much to the tester. There was another variable that can be changed in program, the length of sampling (in milisecond) that will be read as one separate beat. The effect of this variable varies, it may gives a more intense impulse and it may create an inaccurate synchronisation.

The experiment continues until a second day, and by the end of the second session, we found our most favourable settings for the demo day. The most comfortable and gesture-visible settings are:

  • Length of Sampling: 200ms
  • Intensity: 7.5
  • Pulse Rate: 100
  • Pulse Width: 170

The limitation of our device that we identified is there are a small delay from the extraction of the beat until the gesture was made, somewhere between 5-10 miliseconds. This may be caused by the overlapping time of delay between consecutive extracted beats that are unable to make it unto a gesture and the accuracy of the beat extractor itself. Despite that, we think that this device is ready to be demonstrated.

But the device was still naked and very wobbly! We can’t let the device without a home. So, me and Han designing and making the packaging of the device, and we decided to make it simple by using cardboard. So we take a simple cardboard and cut and fit it to out device. A little bit of hand works here.

Let’s Dance, Together!


One of our goal was to enable our system to control 4 people’s forearms. In order to do that, we need another TENS machine that has 2 wire outputs that branched into 2 electrodes each. With the availability of 2 separate TENS machine, it is possible to connect different music pattern to each machine. Which means, every two people can dance with the same gesture or all four people dance with the same gesture.

So there was already two devices of TENS ready to use and waiting to be connected. I’m thinking of finding ways to connect these off-the-shelve device and decided to create an identical circuit to cater the other TENS machine and connect its power to a separate 9v battery and its output to 2 pins in the Arduino. So with one Arduino and identical circuit to each devices, the Arduino will control the two devices together in the same time, just using different pin.

Extracted Beat from any Music File! 

While the others are working on the hardware and the report, Show was in charge of the software side; the implementation of Beat Extraction feature. A few weeks before, we had found a good implementation of beat extraction using a Minim Audio Library’s BeatDetect class. BeatDetect can already detect 3 different music pattern form any .mp3 file from the start; Snare, Kick (Bass Drum), and Hi-hat. It is also possible to write our own algorithm to detect other music pattern if we have extended sound design knowledge, but we think the first three might be enough.

With his perseverance, we have the beat extraction and the EMS synchronisation feature implemented. With the mp3 files I prepared and ready, it was time to test it out!



Sattu was always prepared to test the device, and I hesitantly agreed to join him in the test. I was a bit scared when remembering how uncomfortable it was before. We were connected to a separate TENS machine and decided to connect the electrode to create the Motorbike gesture we coined. This gesture was identified to be the most easy and visible one so far. To perform The Motorbike gesture, we attached the electrodes to our Right Supinator Muscle and Right Pronator Quadratus Muscle. We started the testing with just one song and one music pattern; the Kicks (Bass Drum). It was amazing! Our forearms can move synchronised to the music beat. We also tried using other music and other music patterns. We found out that the Kick was the best and most visible pattern in regards to our collected music files.

There was a bit of dangerous incident happened. After we had finished with a session of testing; stopped the program, we could feel that the TENS was still continuously sending frequencies of EMS. We had to yank the electrodes out of our forearms to make them stop. So we decided to create a physical toggle button to turn the tens off and on.

The Twin Dance

So, to demonstrate the Ultradance concept we have constructed a prototype for 4 people. Using two off the shelf TENS machine, we need to control both devices with one Arduino. There was one problem though, the device are analog and mechanically controlled, by mechanically we mean the devices controlled with knob and switch. So how to connect the devices with Arduino? We want both users are connected to one modified off-theshelf TENS machine that produces a defined beat, The components that was used in this prototype are 2 Tens Machine, 1 Arduino Uno, 2 Breadboards, 2 9v Batteries, 2 Battery Jacks, 4 Electrodes Jacks, and 8 EMS Electrodes.


The tens connected to the breadboard is powered by a 9V battery. Diode is used to prevent damaging the circuit from the back voltage that may happen because of the difference in 9V battery and 5V Arduino output to the circuit. The anode are connected to the ground and the cathode are connected to the tens machine, this will prevent the back voltage from the tens machine to the circuit. A Switch (pushbutton) connects the power on one side and other side to the digital pin 2 from the Arduino on first breadboard and digital pin 3 on second breadboard. This acts as the kill switch which cuts off the power to the TENS machine in order to maintain safety.

When using circuit with different voltage we need to connect the ground together to create a common ground, so we connect the ground from the 9V battery to the ground of the Arduino on the breadboard. To switch higher current/voltage to the tens with arduino, we use transistor (MOSFET), the digital pin 9 of arduino is connected to the gate pin of the transistor. A change in voltage on the gate makes a connection between the other two pins, the end of pin for tens machine is connected to the middle pin of the transistor called the drain. When the arduino activates the transistor by supplying voltage to the gate, this drain pin will be connected to the third pin, called the source, and this connected to ground.

Modifying the TENS Machine and Altering Goals

The work continued…

Now we want to achieve a target to connect and control the TENS’ power by using Arduino.

Me, Mike and Show worked on connection which we successfully made it without a hitch, thankfully! What we did was to modify the wire that goes from the TENS machine to the 9 Volt battery, and connect it to the Arduino. In the Arduino, we made a physical switch to control the voltage coming through the power source (9v battery) to the TENS. On other hand, Damas and Sattu started on doing the report for goal 1. And they decided to create the report iteratively, so that when we are cut short by the deadline, we have a report and demo ready.


After that was done, we started on planning ahead. We brainstormed to discuss what we should do next after this goal was done. So the goals are:

Goal 1:

  • Manipulate 1 forearm limb
    • Control TENS with Arduino
      • Control the power of the tens
    • Apply fixed rhythm to TENS
      • Sync switch to rhythm
  • Sync 2 people (local/cable, no wireless)
    • Connect multiple TENS + Arduino

Goal 2:

  • Manipulate 4 people, with 2 possible different beats
  • Use a Beat extractor from any music file.

In order to start on be ready to start for Goal 2, we ordered another TENS Machine from Amazon and some extra electrical components like another breadboard, a multimeter, and another 9 volt battery.

Testing the TENS Machine for (kind of) Dancing

Another really late update post.

So we decided to try the TENS machine and without doing any modification, because we want to try and get the taste how it feels first. The machine came with a manual that contains a list of positions to stick the electrodes in our body. We found that there aren’t many positions on the forearm, a place we would like to focus on at first. So we decided to experiment ourselves in various places on our forearm and biceps to see what movement it creates, without any background reading of the muscle structure.


It was kind of strange fun until the current go too high. We found out that the more muscle a person has, the more intensity was needed to perform the same visible movement. Without enough background study of the human muscle structure, only depends from the images provided with the TENS manual, we often found inconsistency on the movement when two people have their electrodes sticked in an identical spot, the movement would be different.

We divided the team into two. The first had a responsibility to list down dance movements that can be generated by eliciting and EMS to specific spots in the muscles and make a demo video. The second division was to find out how to control the flow of the current with an Arduino. To be able to control the current means we can sync the jolts to the music beat.

One of the method we thought of was to physically control the TENS knob by using a motor controlled by Arduino. We thought of glueing the knob to the motor, using additional knob provided in the Arduino Basic Kit or crafting a 3D modelled knob that will perfectly grab the TENS knob and connected to the motor. We thought this idea was kinda silly, and we will reserve this as a last resort if we couldn’t find any better ones.

After brainstorming with the team and with the help from Jarrod, we found an obvious solution; to bypass the power from the TENS to the battery and connect the power to the Arduino. The Arduino will control when the power will flow from the power source to the TENS machine. This seems like a better idea, so we went and proceed with this idea.

A Storm that Happened Because some Brains

In a super duper late update post of the Interactive Device project.

So, the first meeting of the workshop session in this unit. A group has been formed, we are five awesome guys decided to got together and try to doing a great and interesting interactive device project. The team is Muhammad Fikri Ali Rahman, that’s me, Damas Nawanda, Satragni Sarkar, Wenbin Shao, and Han Wang. Our first meeting in the workshop is indeed a storming of ideas. The top Ideas are: – Ultra Dance – E-pen – Brain Controlled Games – Smart Shoe.

There are indeed a lot of other ideas too, but we discussed and agreeing for the top four ideas. From that four ideas, one come on top, namely Ultra Dance. The idea are to make people dance involuntarily using EMS and controlled TENS machine put in the human limbs e.g arms and give the right amount of pulse to make the people dance. People can using music and song and create the dance, using that song, the TENS will generate the pulse so people will dance, and we want to make more than one people dance. Make that a controlled flashmob!