Which sensor to use as momentary switch?

I'm about to start a project where I want to control a LED bulb with pressure. I think i need relays for output, but i want to start with input and se how it works first

I want to make a momentary switch that senses the pressure from an object (for example glass of milk, or any small object less than 1kg) and turns on a light.
Works like this: Put a glass of milk on a small surface -> surface senses the presence of the object -> turn on light -> remove glass -> lights turn off

How can i do this? :slight_smile:
Basically a momentary switch without movement or click
IR sensors? Pressure sensors? What will work the best?

Thanks!

Why must there be no movement or click? A microswitch or miniature pcb pushbutton (like the reset button on the arduino board) would be a simple cheap solution and the movement/click would be barely noticeable.

Whats the minimum weight object which must activate the sensor?

What kind of led? For an ordinary led you don't need a relay. Even for a high power led there are better ways than using a relay.

Paul

Hey Paul, thanks.
I want to make an interactive table, and the click or mechanical movement would make the experience less cool :slight_smile: . The switch and lightsource (high power led) would be placed under a circular two way mirror which is about 10cm in diameter. When a glass of water (or any transparent liquid) is placed on the mirror, the lights turn on and the lights get diffused in the water. Minimum weight is maybe 100gr

Here's a simple ascii sketch (viewed from above):


I I
I I
I I
I O I
I________________________I

Some possibilities:

  1. Capacitive sensing. You could divide the silvering on the mirror into two or more segments, and measure the capacitance between them. Putting a glass containing liquid on top of the mirror will increase the capacitance.

  2. IR reflective sensing, with transmitter and receiver at opposite ends of a diameter of the mirror. The idea is that when you place a glass on the mirror, the liquid in the glass scatters some of the IR and couples it more strongly from the transmitter to the receiver.

  3. Load cells supporting the mirror.

I've never tried it, but I have heard that the grey/black anti-static foam, that is sometimes used to protect chips in the mail, makes a cheap but useable pressure sensor. Make a sandwitch of it between two thin metal sheets and measure the resistance from one side to the other. Make a voltage divider with that and another suitable resistor and fedd that into an analog input pin on the arduino. Code your sketch to detect a sudden change in the input signal.

Paul

Search for IR proximity switch (Sharp?). I am not sure if the the glass/mirror would stop the functioning of this or not.

Another way to do it would be to use a cheap LDR (or other light sensor) and blacken the reverse of the glass/mirror, except for a small dot in the middle. When light is detected nothing in place. When no light = something in place. Of course this wouldn't work in the dark :slight_smile:

LDRs are also used in night lights.

Oops just saw, you are using transparent glass/liquid - but if you play around with the values you may still be able to detect the container (with an LDR) when placed by continuously monitoring the ambient light levels & activating the light when there is an appropriate change in light levels.