FreeBSD and controlling an alarm via relay

Dale Kline DKline at libraryvideo.com
Wed Jul 6 12:12:31 UTC 2011


Hi,
I guess I don't understand your application here.  The Visonic is a battery operated UHF remote alarm transmitter,  that looks at a wired loop for a change in condition (a door magnetic reed sensor, for example) and then it transmits an alert to a remote Radio Receiver (MCR-304) if that door opens or closes unexpectedly.  The MCT100 has a three volt battery with an operating life of 45 - 50 months according to the spec.  It does not need a voltage supply,  nor would you want to turn it on and off during operation.
The Relay boards, on the other hand, are capable of turning on and off the four or eight relays from your computer commands.  The relays are capable of switching ANY AC or DC voltage, at a rated current (24 VDC OR 120 VAC @ 15 Amps and so on).  The 5 volt @ 72ma rating is the voltage and current that the board must supply to make the relay close.
The green terminal blocks then connect to a floodlight (for example) that would turn ON after the UHF Receiver that is listening to the MCT100 Transmitter indicates that someone has opened or closed the door mentioned in the first paragraph.
Am I following what you want to do?
-----Original Message-----
From: owner-freebsd-hardware at freebsd.org [mailto:owner-freebsd-hardware at freebsd.org] On Behalf Of Achilleas Mantzios
Sent: Wednesday, July 06, 2011 5:50 AM
To: Ian Smith
Cc: freebsd-multimedia at freebsd.org; Chris Hill; freebsd-hardware at freebsd.org
Subject: Re: FreeBSD and controlling an alarm via relay

another thing that puzzles me is power.
This board : http://www.ebay.co.uk/itm/USB-Eight-Channel-Relay-Board-RS232-Serial-Controlled-/110710333092?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item19c6d99ea4
needs VDC 12V supply 
while this one : http://www.ebay.co.uk/itm/USB-Four-4-Relay-Module-Board-Home-Automation-/180646300804?pt=LH_DefaultDomain_0&hash=item2a0f5bcc84
is self powered from USB.

batteries do not come cheap, and having an extra AC/DC adaptor is not very good either ...

another thing is the relay parameters, i see various figures :
Relay parameters: 5V / 72mA, 15A/24VDC (120VAC), 10A/250VAC or
Each switch 12VDC/15A or 240VAC/10A or
Open (No) and Closed (NC) Contacts rated for voltages: 12VDC/15A; 24VDC/15A; 125VAC/15A; 250VAC/10A

my specific application i want to drive is this wireless xmitter :
http://www.visonic.com/Data/Uploads/MCT_100_Installer_Guide_English_DE2241U.pdf
Should i assume my device that i want my relay to control will have voltage of 3V?

for which Voltage/Ampere figures should i opt? are those figures crucial?

thanx a lot

Στις Wednesday 06 July 2011 11:03:14 ο/η Ian Smith έγραψε:
> On Tue, 5 Jul 2011, Achilleas Mantzios wrote:
>  > �������� Tuesday 05 July 2011 16:10:59 ��������������:
>  > > On Mon, 4 Jul 2011, Achilleas Mantzios wrote:
>  > > 
>  > > [snip]
>  > > 
>  > > > I was thinking of some relay board (instead of the old modem), 
>  > > > possibly ethernet controlled
>  > > 
>  > > This box has relays and GPIO available via ethernet. It's probably 
>  > > overkill for your application, but it's well made and easy to use:
>  > > 
>  > > http://www.extron.com/product/product.aspx?id=ipltcr48&s=0
>  > > 
>  > 
>  > That is too big for my application, thanx anyway.
>  > Most probably i'll go for something cheaper like this one 
>  > http://www.ebay.co.uk/itm/USB-Eight-Channel-Relay-Board-RS232-Serial-Controlled-/110710346488?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item19c6d9d2f8
> 
> These look quite well designed and built to me, reasonably priced new, 
> but check out the/a source site [1] for various models, 1- and 4-relay 
> boards too, or if you prefer, RS-232 serial rather than USB interface 
> for the 8-relay boards.  There's also a simple parallel port to 8 TTL 
> outputs board (hi Tim!) and various other stuff.  I'm tempted myself.
> 
> [1] http://sigma-shop.com/category/4/relay-boards.html
> [2] http://www.sigma-shop.com/page/12/manuals.html
> 
>  > Could i use the ucom driver to talk to the USB device like a normal serial device, via /dev/cua*** ?
>  > The above link says one needs to talk to the relay with:
>  > 8 Data, 1 Stop, No Parity,Baud rate : 9600
>  > and the commands look like:
>  > FF 01 00 (HEX) 
>  > or 
>  > 255 1 0 (DEC)
>  > 
>  > could i be able to specify those over ucom? 
> 
> If so, great.  If not and you have a serial port, the code will be the 
> same anyway, except the port used.  I grabbed most of the manuals from 
> [2] and found the Linux software examples are all this one:
> 
> =======
> Linux :
> The USB-serial device is automatically detected and mapped to /dev/
> ttyUSB0 (or USB1 in case there is already a similar device).
> My test script: (Thanks Julian!)
> --------------------------------------------------------
> # cat relay.sh
> while true
> do
> echo -e "\xFF\x00\x00" > /dev/ttyUSB0 ; sleep .1
> echo -e "\xFF\x00\x01" > /dev/ttyUSB0 ; sleep .1
> echo -e "\xFF\x00\x00" > /dev/ttyUSB0 ; sleep .1
> [..]
> echo -e "\xFF\x01\x01" > /dev/ttyUSB0 ; sleep .1
> echo -e "\xFF\x02\x01" > /dev/ttyUSB0 ; sleep .1
> [..]
> echo -e "\xFF\x07\x01" > /dev/ttyUSB0 ; sleep .1
> echo -e "\xFF\x08\x01" > /dev/ttyUSB0 ; sleep .1
> echo -e "\xFF\x01\x00" > /dev/ttyUSB0 ; sleep .1
> echo -e "\xFF\x02\x00" > /dev/ttyUSB0 ; sleep .1
> [..]
> echo -e "\xFF\x07\x00" > /dev/ttyUSB0 ; sleep .1
> echo -e "\xFF\x08\x00" > /dev/ttyUSB0 ; sleep .1
> =======
> 
> If using sh[1] you might need to use \0377 instead of \xFF
> 
>  > do you know any application, perl library, utility or just a guide for standard C serial port programming?
> 
> Anything that can write bytes to a serial port - perl's overqualified :)
> 
> [..]
> 
> cheers, Ian



-- 
Achilleas Mantzios
_______________________________________________
freebsd-hardware at freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hardware
To unsubscribe, send any mail to "freebsd-hardware-unsubscribe at freebsd.org"


More information about the freebsd-hardware mailing list