Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Proximity switch

Status
Not open for further replies.
Zach,
I could not make the previous circuit work with enough sensitivity, so I decided to modify it some more. This time using a wallwart transformer I got so much sensitivity that I had to decrease R1 from 100M to 10M. It would go on the moment I connected my croc-clip onto C1. Waving my hand now close over the sensor plate makes it switch on and off. Touching, switches it on bright (also used LED for testing). You really need RV1 to be a pot so you can set it to where the LED (buzzer) just want to turn on.
 

Attachments

  • zach_switch2_1_116.gif
    zach_switch2_1_116.gif
    5.7 KB · Views: 605
COOL!! :lol: i got a pot like u sed and made the circuit and it works great!!
the next thing that im gonna do is amplify it so that i am able to trigger the LED from a couple feet away. i might need help with that, but i want to try and figure it out myself.

one question though: wut exactly does the 2n3904 do? i understand the rest of the circuit, but cant quite figure out the purpose of the 2n3904.
 
Zach,

I am glad you got it working. The 2N3904.. well this is special and in a follow up post when I have some time will explain the importance of this, maybe with the aid of some theory and diagrams.
 
As promised, here is the explanation.

Looking at the first set of diagrams, set up to represent our switch. The 60Hz is the signal we get from our hand induced into the gate through the capacitor. I have used a diode instead of the transistor just to illustrate. The 0V reference line on the scope display for each Chan is marked with a short yellow line.

In the first diagram you can see that the waveform swing +ve and -ve. The overall average voltage level over a number of cycles will be zero. This signal is coupled through the cap and is the same on the other side. The 100M represent the high impedance of the gate input. To switch on our gate we will want an average signal that is +ve at least.

The next diagram shows the same arrangement with the diode in place. Note how the signal after the cap is now DC-shifted "DC restored" upwards, giving us an overall +ve signal on the gate of the MOSFET. In the switch circuit we pushed the waveform up with reference to the +ve gate voltage setting (cause the anode or base is at this potensial) instead of GND as in the example).


Next the question of why I used the 2N3904 as a diode. Look at the next diagram. Here we have 0.5V applied to both a 2N3904 b-c (diode) and a common 1N4148 signal diode. Both are reversed biased (meaning, no current should flow). The truth is that there will be a very tiny leakage current that will flow. Because our circuit rely on very high impedances for the switching sensitivity, we would like to reduce leakage current as far as possible. The meter's resistance was made very high (> 1000M) in the simulation as not to influence the overall leakage by much. You can see that due to the reverse leakage of the diode we have lost almost all (96%) of the voltage while with the transistor-diode only a small (10%) part.

Hope you understand all this. Told you it was a special diode :D
 

Attachments

  • zach_switch5.gif
    zach_switch5.gif
    4.8 KB · Views: 509
  • zach_switch4_117.gif
    zach_switch4_117.gif
    51.8 KB · Views: 519
thanx for makin good on your promise, i was wunderin about that :lol:

i am going to impliment this circuit in a security system that i am going to make for my house.

i might as well ask now: i plan on sliding a sensor plate down the wall from the attic, so wen someone passes by they trip it. i am going to have to amplify it so as to make it be able to sense a couple of feet away, (1) willl the electrical mains cause interference? (2) just to satisfy my mother dear's worrying, is there any way that it could cause a fire?
 
The mains may have a part to play, depending where you put the plate. I can't see how it can cause a fire unless the wallwart starts to burn.

You will have to pick your placement carefully to eliminate a lot of false alarms.
 
TheOne said:
You will have to pick your placement carefully to eliminate a lot of false alarms.

Years ago, when I still lived with my parents, my younger brother and I shared a bedroom. He decided to build a touch sensitive remote control light switch from a kit, it basically was built on a plastic blanking plate, with a small IR sensor sticking out on the bottom edge.

Now the light switch was on the left wall just as you came through the door, with the switch wall going forwards and the door opening to the right, the door was right near the corner of the room - hope you all understood that?.

I helped him fit the switch, which we did with the door open (to avoid anyone opening the door into us), and we tested the switch!. Touch it - turns ON, touch again - turns OFF. Hold your hand on the plate and it dimmed up and down over a few seconds, the level you leave it at was the level it next came ON at. Absolutely perfect! - what a really great device!. We tried the remote control, again, it worked perfectly!.

Then we shut the door - the light came ON!, opened it again - the light went OFF!. The door moving past the switch was triggering it! - by taking it out again and reducing the sensitivity we managed to get it to work OK.

Or at least we thought so, it had the unfortunate poperty of dimming itself UP and DOWN randomly in the middle of the night! - which was most upsetting with a 200W bulb cycling to full brightness!. Needless to say, I had a 'few gentle words' with my brother, and he removed the switch :lol:

So be aware, proximity devices are all very well, but they aren't always reliable!.
 
:D I have a similar story. In my first year of college, a friend of mine got hold of a proximity switch circuit and played with it. He could get it to trip using a long wire "antenna" when anyone approached within a couple of feet from it. At that time his dad was a farmer in the country side and always had problems with cattle breaking through fences. He constructed a device to go and demonstrate to all the farmers during our next break. The idea that you have a sense wire on the other side of the fence, so that when cattle break through you could get a warning from a small transmitter or something powered from a car battery.

So off he went to show off his design. He returned convinced that something went wrong with the circuit, cause there he could not get it to work, even by stepping on the trip wire. He adjusted the sensitivity to max but nothing worked :oops:

After his return, when he tested this it worked 100%
Later we figured out that in those time's there were almost no electricity on the farms and most farmers had diesel generators if any, for electricity mainly for lighting at night. So there were no high voltage power cables or over-head lines to flood the the area with 50/60Hz radiation. Thus no 50/60Hz signal to be induced into his wire "antenna" This was a very important lesson to him and he still feels :oops: about this until today.
 
hmm, maybe ill go w/ an IR beam or somethin like that cuz i'd need quite a bit of sensitivity and im sure that the mains would give me a lot of interference. im sure that ill have some other use for the switch tho :lol:
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top