How to cost effectively create 500 switches/sensors?

32 views
Skip to first unread message

Don Davis

unread,
Jun 8, 2016, 5:34:41 PM6/8/16
to 10BitWorks
I've been asked/tasked to develop a way to measure sensor input (simple - on/off is fine) from multiple points. 500.
Before I knew it was 500, I was thinking a capacitive grid of some kind. Now, I'm thinking a 36 x18 grid of simple circuits. (How) can I use (multiplexed) i2c sensors with volatge? Could I just drop the voltage and measure on an off? 
Other recommendations? [It's for a large (6') globe.] 

Tookys

unread,
Jun 8, 2016, 6:41:06 PM6/8/16
to 10BitWorks on behalf of gnu_don
Does it need to be able to sense if multiple buttons are pressed, or just 1 at a time?
--
You received this message because you are subscribed to the Google Groups "10BitWorks" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sa-hackerspac...@googlegroups.com.
To post to this group, send email to sa-hack...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sa-hackerspace/CAL37BAHW6zBzqP9sLe0fBW1%3DPZANHsbxoYhhELE3NpRxJ8NOOA%40mail.gmail.com.

Don Davis

unread,
Jun 8, 2016, 7:06:13 PM6/8/16
to 10BitWorks on behalf of tookys3
Just 1. More would be better, but price is an issue to an extent.

Sent from a mobile device.

Les Hall

unread,
Jun 8, 2016, 8:09:40 PM6/8/16
to 10BitWorks on behalf of gnu_don
so you have a 6 foot globe and you want to cover it with switches or something like switches so people can touch it and the location of their touch is known to say an Arduino?  

Les
Les figure this out!  



josh jordan

unread,
Jun 8, 2016, 8:21:06 PM6/8/16
to 10BitWorks on behalf of Les Hall
This is a complicated problem.  500 capacitive touch sensors will be expensive and complicated.  It might be less expensive if you implement the touch sensing using a mcu but you may need many mcus to do it with 500 sensors.  IR sensors may be more practical if the globe material is semi-transparent.  The most direct way to do this with 1 mcu would be to put a tactile switch on each city and use a chain of input shift registers like the 74x162.  I don't think there is a way to do this with one sensor.  If you could put encoders on the axises and measure a point that way, would save a lot of money and complexity.

-Josh

Jeremy Z

unread,
Jun 8, 2016, 8:45:49 PM6/8/16
to 10bitworks

For 500 switches consider also the time and work needed just to make that many connections and test them all...

Yeah you'll be multiplexing the switches and there are a lot of ways to do that from easish to hard and expensive to cheap. How about some plain ol shift registers hooked up to SPI port on a uC? There are also gpio expanders (search mouser) some have nifty things that will take care of denouncing and can send an interrupt signal to the uc via a pin. I've seen them in i2c and spi formats if I remember correctly.

Also consider making it modular like groups of 16 or 32 buttons. It'll make designing, building and testing/debugging easier. And at 500 it's starting to make sense to design PCBs... (Or at least that's what I'd start thinking about doing if it were my project).

That's my 0b10 cents :p

I've been asked/tasked to develop a way to measure sensor input (simple - on/off is fine) from multiple points. 500.
Before I knew it was 500, I was thinking a capacitive grid of some kind. Now, I'm thinking a 36 x18 grid of simple circuits. (How) can I use (multiplexed) i2c sensors with volatge? Could I just drop the voltage and measure on an off? 
Other recommendations? [It's for a large (6') globe.] 

--

Greg Bluntzer

unread,
Jun 8, 2016, 9:27:09 PM6/8/16
to 10BitWorks on behalf of zunkworks
Could you do it optically with one of those gas balls from spencers. Maybe set up a camera that would watch where the gas lights up.

Don Davis

unread,
Jun 8, 2016, 10:28:59 PM6/8/16
to 10BitWorks on behalf of Greg Bluntzer
Not sure what you're talking about. 
Do you  have a link?

Sent from a mobile device.

Don Davis

unread,
Jun 8, 2016, 10:32:31 PM6/8/16
to 10BitWorks on behalf of zunkworks
Once I get the basic hardware down I can put some students to work on it. 
I was wondering if SPI would be better than i2c. I'll take a look and get back with any questions. 

Thank you


Sent from a mobile device.

Les Hall

unread,
Jun 9, 2016, 2:26:01 AM6/9/16
to 10BitWorks on behalf of gnu_don
Capacitive touch sensing may be an inexpensive and practical solution. You'd need to create longitude and latitude lines of about sqrt(500) resolution in each direction, however that works out.  Then you could mux the connections to a single Arduino or RPi or Teensy or whatever you like, and time share the capacitive measurement.  

I have both used the Arduino.cc capacitive touch library as well as "rolled my own" in Arduino form so I can at least help you get started.  This solution is fairly minimal in that you are just running conductors, not zillions of buttons.  

Les
Les get the job done right!  



Don Davis

unread,
Jun 9, 2016, 8:04:09 AM6/9/16
to 10BitWorks on behalf of Les Hall
I like the idea of capacitive touch sensors muxed. What hardware do I need? Given that I'll be using a Pi.


Sent from a mobile device.

Mike Garis

unread,
Jun 9, 2016, 8:48:56 AM6/9/16
to 10BitWorks

This might be similar to some of what has been said, but I was thinking if you reverse some of the logic behind the 3D Led cubes, just replacing the LED with a sensor that would be an open/close (probably not a capacitive sensor, something more like a simple switch) then as you switch thru the layers, measure the voltage on a drain resistor pulled to ground (so it only has voltage if the current is flowing) taking those inputs then in a a demultiplexer or maybe a shift register so you could just use SPI. For 500 it would be more like 512 (8 layers of 64) switched fast enough to act as if you where looking at them all at the same time.
Just a rambling thought this morning...I might be able to flesh it out more, you would have to compensate for bounce probably though.

- Mike G. 

josh jordan

unread,
Jun 9, 2016, 10:33:45 AM6/9/16
to 10BitWorks on behalf of Mike Garis
I had a project that had a single capacitive touch sensor.  It took 4 revisions to get it to work correctly.  It is very difficult to get cap touch to work if you have other metal near it.  Having multiple layers of cap touch surfaces is certain to have complications and may not work at all.  Do try it, it might work.

--
You received this message because you are subscribed to the Google Groups "10BitWorks" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sa-hackerspac...@googlegroups.com.
To post to this group, send email to sa-hack...@googlegroups.com.

Tookys

unread,
Jun 9, 2016, 11:37:34 AM6/9/16
to 10BitWorks on behalf of joshjordan
If you need it to be dirt cheap, the most effective method would be to use 500 button switches and 1 arduino mega.

It could tell which button was pushed with a polling method having 24 out pins and 24 in pins to see which ones are connecting.

The only real issue is it uses LOTS of wires and needs alot of cable management.
To view this discussion on the web visit https://groups.google.com/d/msgid/sa-hackerspace/CACSQSNazG-7pLLNTgcKAm3%2BQt%3DeTWD7jb_PpXvKvYfka547iXw%40mail.gmail.com.

Don Davis

unread,
Jun 9, 2016, 11:44:27 AM6/9/16
to 10BitWorks on behalf of tookys3
Whatever the case, it will use an RPi. 
How would you configure the switches? How would you very the outputs? different voltages? some sort of PWM, i2c, or SPi signal?

josh jordan

unread,
Jun 9, 2016, 11:49:27 AM6/9/16
to 10BitWorks on behalf of gnu_don
The 162 input shift register is compatible with spi or it can be bit banged with the unreliably timed rpi io pins.

Les Hall

unread,
Jun 9, 2016, 12:27:17 PM6/9/16
to 10BitWorks on behalf of joshjordan
Have a read of this page:

http://playground.arduino.cc/Main/CapacitiveSensor?from=Main.CapSense

for an explanation of how Capacitive Sensors really work, with Arduino as an implementation.  RPi I dunno.  

Les


Chris Hardee

unread,
Jun 9, 2016, 12:37:24 PM6/9/16
to 10BitWorks

I think green would make the best bike shed color :D

Tookys

unread,
Jun 9, 2016, 12:50:03 PM6/9/16
to 10BitWorks on behalf of gnu_don
The raspberry pi doesn't have enough GPIO pins to do it on its own.

You could have the arduino mega talk with the PI over serial so that you can get the info.


The way it would work is that you would have 24 in lines that are constantly looking for if the circuit has been completed.

Then there are 24 out lines that take turns sending out a signal 1 at a time.

In
A. B. C. ......Y.
1
Out 2
3
...
24

So for example is A3 has been pressed there would be no signal to input A until output 3 has been polled. And at output 2 no signal is received to A

It's alot of wire management but it's dirt cheap.

It would required that each pin have a trunk line to a input pin, and an output pin.

The arduino would be programmed to poll all the pins really fast. But could be done effectively I think.

Don Davis

unread,
Jun 9, 2016, 12:52:59 PM6/9/16
to 10BitWorks on behalf of Christopher Hardee
Yes, at this point, I would really just like the address to a bike shed for dummies book. How do I just read in on or off with which hardware?

Don Davis

unread,
Jun 9, 2016, 12:55:48 PM6/9/16
to 10BitWorks on behalf of tookys3
That's what I was imagining. So- using SPI or something else? The outputs are sending out individualized outputs using SPI (which takes 4 wires) ? The inputs then can read rather it receives 1 2 3 ... n ? 

Jeremy Z

unread,
Jun 9, 2016, 1:53:07 PM6/9/16
to 10BitWorks on behalf of gnu_don
James's suggestion to multiplex those buttons using an Arduino is pretty good. It's cheap and relatively simple (no fancy components, it's all locally available off the shelf, except maybe the 500 push button switches). It will also require current limiting resistors and you'll need to use the Arduino's internal pull-up resistors or add your own. (This should shed more light on what James suggested: http://pcbheaven.com/wikipages/How_Key_Matrices_Works/ )






Craig

unread,
Jun 9, 2016, 1:57:57 PM6/9/16
to 10BitWorks
 
Do all 500 buttons have to be the same?

** 3d printed switch concept : http://www.thingiverse.com/thing:272485

** fabric switch : http://www.instructables.com/id/Simple-Electronic-Button/
     conductive ink take on "fabric switch" via cardboard & paper :
     other sources types of fabric switches/sensors : http://www.kobakant.at/DIY/?cat=26

Assuming the globe doesn't have pre-printed graphics that need to be used; might want to take a look at some of the following ideas :

** mount http://www.thingiverse.com/thing:1444585 so that pressing it connects the circuit or alternatively breaks an X axis & Y axis laser beam giving button coordinates.
     I think there are also some cheap detectors that use ultrasound or equivalent -- could do motion detection with camera too!

** anypixel.js : http://googlecreativelab.github.io/anypixel/

** https://tinkerlog.com/2012/12/21/raspberry-pi-with-rgb-pixels-and-node-js/ <- where the idea would be to mount the led in a 3d casing, pressing the "button" would display the led pixel to a 360 degree camera (cube 360 wifi ~$62) for computing button pressed.  variation: http://www.thingiverse.com/thing:1444585 so that pressing it connects the led circuit.

** exoskin : http://tangible.media.mit.edu/project/exoskin/ ; same idea as 360 camera, but perhaps with motion detection; paint that changes color when flexed; or breaks x/y/z axis sonic or laser beam.

** Software concept example using processing : http://makezine.com/projects/A-Touchless-3D-Tracking-Interface/

Craig

mike perez

unread,
Jun 9, 2016, 4:53:51 PM6/9/16
to 10BitWorks
heres a dumb question: if you don't care which switch was pressed but only that any switch was pressed, couldn't you just hook them all up in series and then detect if the circuit is broken or not? Maybe the touch capacitor sensor doesn't allow for something that simple?


On Wednesday, June 8, 2016 at 4:34:41 PM UTC-5, gnu_don wrote:

Les Hall

unread,
Jun 9, 2016, 4:59:21 PM6/9/16
to 10BitWorks on behalf of mike perez
that would make the capacitive sensor trivial.  

Les
Capacitance is futile!  



--
You received this message because you are subscribed to the Google Groups "10BitWorks" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sa-hackerspac...@googlegroups.com.
To post to this group, send email to sa-hack...@googlegroups.com.

Don Davis

unread,
Jun 9, 2016, 5:31:37 PM6/9/16
to 10BitWorks on behalf of mike perez
No we do care which switch was pressed.


Sent from a mobile device.
--

Craig

unread,
Sep 1, 2016, 4:05:56 PM9/1/16
to 10BitWorks
So, what what the end result of the project?
Was this an upgrade to something like http://makezine.com/2016/08/29/new-moon/ ? ;-)

Craig


On Thursday, June 9, 2016 at 4:31:37 PM UTC-5, gnu_don wrote:
No we do care which switch was pressed.

Sent from a mobile device.
Reply all
Reply to author
Forward
0 new messages