Do I need micro-controller to open/close a relay using a proximity sensor?

Thread Starter

Yaşar Arabacı

Joined Nov 11, 2014
49
An MCU is not required. Yes, a properly designed analog circuit would work.
Do you have a link to an example circuit design? My electronics knowledge is not very advanced, so I might go with the microcontrollers if circuit appears to be too complicated for me to handle.
 

ScottWang

Joined Aug 23, 2012
7,499
What kind of alarm system?

I just thought that, maybe you don't need to use relay, probably using bjt or mosfet can do the job, but you have to show how exectly the alarm system is.
 
Hi,

I want to use a proximity sensor similiar to http://www.micropik.com/PDF/HCSR04.pdf to open/close a relay? It should enable the relay when there is something in 1mt range. Do I need a microcontroller in order to achieve this, or can I simply connect this to my relay using an analog circuit?

Thx in advance
The HCSR04 that you linked is an ultrasonic measuring device, which, itself, contains an MCU (a PIC as I remember was standard). It has an ultrasonic emitter and detector. You trigger the emitter and then time how long it takes the wave to bounce off of whatever is out there (if there is anything) and hit the detector. From that time interval, you estimate a distance.

I'm not saying that it can not be used without an MCU, but it would be a heck of a lot easier to do it with an MCU...at least easier for me, I guess I should add.

But these devices have limitations, the 'object' needs to be of a particular size to bounce the wave back - nice solid flat walls work well, small moving objects not so well.

You may want to think about a passive infra-red (PIR) device which may serve you better and definitely does not need an MCU. There are lots of circuits out there pairing the device with a relay. Getting it positioned and mounted to cleanly define your area of interest may be challenging.
 

strantor

Joined Oct 3, 2010
6,875
You may want to think about a passive infra-red (PIR) device which may serve you better and definitely does not need an MCU. There are lots of circuits out there pairing the device with a relay. Getting it positioned and mounted to cleanly define your area of interest may be challenging.
There are also ultrasonic sensors with digital outputs that would be much simpler to implement. The detection range is set by trimpots.
 
Top