loading

How does Makey Makey sense touch?

I have the source of Makey Makey and tried what I thought was the same method that it uses, but it didn't work. Can anyone make it more clear?

sort by: active | newest | oldest
On the main Makey Makey(r) homepage,
http://www.makeymakey.com

under the heading:
"Seriously, I Am a Geek, Tell Me All the Krazy Tech Stuff"

I found the following description of the switch inputs. The part in bold is the words I felt deserved emphasis.

"MaKey MaKey is a printed circuit board with an ATMega32u4 microcontroller running Arduino Leonardo firmware. It uses the Human Interface Device (HID) protocol to communicate with your computer, and it can send keypresses, mouse clicks, and mouse movements. For sensing closed switches on the digital input pins, we use high resistance switching to make it so you can close a switch even through materials like your skin, leaves, and play-doh. We use a pull-up resistor of 10-50 mega ohms. This technique attracts noise on the input, so we use a moving window averager to lowpass the noise in software, saving money on hardware filtering. There are six inputs on the front of the board, which can be attached to via alligator clipping, soldering to the pads, or any other method you can think of. There are another 12 inputs on the back, 6 for keyboard keys, and 6 for mouse motion, which you can access with jumpers via the female headers. If you wish to use a different set of keys, or otherwise change the behavior of your MaKey MaKey, you can simply reprogram it using the Arduino environment. By cutting a trace on the back of the board, you can disconnect the large pull-up resistors if you want to, which would be necessary in a small minority of Arduino projects. Have more geeky questions? Post them in the forums and we'll answer them. "


I found a copy of the circuit diagram here:
http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Dev/Arduino/Boards/makey_makey-v12.pdf
and I found that link via this one:
https://www.sparkfun.com/products/11085
There may also be some clues in the comments section on that page.

Anyway, if you look at the circuit diagram you will see, much like the quote above says, there is indeed an ATMega32u4, with 18 of its inputs tied to 18 little 2.2 megaohm resistors.  Actually 2.2 M is a very big resistance. What I mean by little, is the physical size of them. They're the little surface mount kind, so they take up very little space, just a few sqaure millimeters each, on the MakeyMakey(r) board.

Regarding the firmware, it looks like they are hiding that here:
https://github.com/sparkfun/MaKeyMaKey
On that page I clicked on the button labeled "ZIP", and that results in my computer downloading a file called
"MaKeyMaKey-master.zip"

In that zip there are two files named "makeymakey.ino" and "settings.h", , in the folder "firmware/Arduino/makey_makey",  and within those two files lies the code that does this "software lowpass filtering" alluded to in the quote from the MakeyMakey.com home page.

This  "software lowpass filter" is essentially just a moving average, or rather a moving sum.  This sum is stored as part of a structure, and in the code it is called, "inputs[i].bufferSum"

Recall an average is just a sum divided by N, the number of samples. If those samples are always 0 or 1, then that "moving sum" of N samples necessarily has a value in the range [0,N]. What I'm saying is you can just skip the step of dividing the sum by N, and expect the sum to have a minimum value of 0 and a maximum value of N.

So uh... there you go.  I am guessing that if you can configure some inputs on your Arduino(r), and wire those to some really weak, like 2.2 megaohm, pull-up resistors.  Then write your own code to do a moving sum, and periodically check the value of that sum...  I am guessing if you do all that, you will get results similar to the Makey Makey(r) hardware.

Right.  Sounds easy, but of course I have not actually tried this myself.
;-)

Also I remember thinking the Arduino(r) had some internal pull-up resistors too. So you'll want to double check that, and make sure those internal pull-ups are disabled, so that your inputs will only see your 2.2M  weak external pull-up resistors.
Oops. I just noticed that everywhere I wrote 2.2M, I should have written 22M.  That's exactly 10 times larger.  Why was I thinking 2.2? Anyway, those are some big honking resistance values alright!
You might be interested that the robot kept your initial post long un-posted.
So that I only saw your Oops and assumed private messaging.

I wonder what was deemed reviewable by the new lawyer edicts :-)

A

I dunno.  I posted it kinda late at night, relative to Pacific time.  I think Instructables sometimes turns stuff off at night, so they change things around, for to fix broken things, and also break things that were previously fixed.

So maybe my post got buffered somewhere.

I don't think it has any offensive language in it, although it's hard to say what Robot thinks (is programed to think) is offensive.
 ;-)
verence4 years ago
From the Makey Makey web site:

For sensing closed switches on the digital input pins, we use high resistance switching to make it so you can close a switch even through materials like your skin, leaves, and play-doh. We use a pull-up resistor of 10-50 mega ohms. This technique attracts noise on the input, so we use a moving window averager to lowpass the noise in software, saving money on hardware filtering.

See the image in the How does it work paragraph. With touching an object connected to a MakeyMakey input, you close a circuit to the ground (that's why you have to be connected to the ground pin)

Therfore, you can't use any object as a key, it has to have a tiny bit of conductivity.
iceng4 years ago
After webbing a kit site I gather the device senses extra capacitive antenna energy  from a conducting life form.

Our bodies are 24/7 absorbing antennas for nearby AC house wiring 
kicking out EM and Voltage fields.

When we touch a Makey Makey sensor the device detects a higher or
a change in potential on an analog input pin..

Then it sends out a keyboard digital string.

And you decide what the PCdoes with that data, ... , turn on a light, type a
character to the screen or send a web instruction to Singapore :-)