Go Down

Topic: Multiplexer: how does it work and how can i make one? (Read 3089 times) previous topic - next topic

Grumpy_Mike

Quote
it is ok that the signal dies when you arent standing on the island anymore,

Yes but I also said that the signal dies when you continue to stand on it, it is only at the moment of impact you get a signal.

Quote
we want to measure the speed/force used to press these buttons

That means you need an analogue measure. That will be hard even with the reduced number of sensors because you won't have time to scan them all in the time the signal lasts, so you might miss some.

Using Piezo sensors is not the way to do this project if you want it to work. I fear you have underestimated the difficulty of your task.

CrossRoads

The address lines are created by the arduino to select which signal is going thru the multiplexer.

How quickly do you expect these sensors to be pressed? 10,15 at a time? Or just 1 person walking around?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Swoosh88

#17
May 26, 2011, 08:01 pm Last Edit: May 26, 2011, 08:09 pm by Swoosh88 Reason: 1
Yes but I also said that the signal dies when you continue to stand on it, it is only at the moment of impact you get a signal.
That means you need an analogue measure. That will be hard even with the reduced number of sensors because you won't have time to scan them all in the time the signal lasts, so you might miss some.
Using Piezo sensors is not the way to do this project if you want it to work. I fear you have underestimated the difficulty of your task.

I know, but this is what we want.
We have also considered the contact sensor you showed, but because our sensors will need a certain radius to be effective in, the piezo elements are perfect.
Also, the values comming from piezo elements are perfect for converting into a scaled force, which allows us to easily use it in Flash.


The address lines are created by the arduino to select which signal is going thru the multiplexer.

How quickly do you expect these sensors to be pressed? 10,15 at a time? Or just 1 person walking around?

Well, we've changed the amount once again today, as we reduced it to 25 sensors.
Our installation will provide access for about 4 kids, which is not that hard to monitor.
Also, I've discussed this with a teacher at college today, and he explained it perfectly to me, how a multiplexer works!
Sorry for all the hard questions, but a real life example always is the best explanation ;)

We also decided to use a CD74HC4067 twice, so we can connect up to 32 sensors, which is perfect for our 25 sensors.
This is an overview of the chip mentioned above:


Combining this with the code provided here: http://mayhewlabs.com/products/arduino-mux-shield, it is easy to use and provides all the data we need.

PS: I also figured out why the piezo didn't work: I thought I had to use the resistor used in the image, but as it turned out, I needed 1 Megohm, while I was using 100 Kiloohm...

Now, I have another question: when the multiplexer passes and shows the data in an array, I can easily read the array using this code, right? :
mux1array
where mux1array is the name of the array and i the number of the value in the array i'd like to read.

Swoosh88

Ok, so I just tested it all, and it works aaaawesome!

What I made:
I hooked up 3 Piezo sensors to a CD74HC4067 Multiplexer, which was plugged into the Arduino.

Just testing, but this seems perfect for our purpose!

How it works:
-I print the array values, so i can see what is happening
-When you press a piezo element a led goes on/off, and a message is printed.

Here is my setup:

Go Up