FreeBSD and controlling an alarm via relay
achill at matrix.gatewaynet.com
Mon Jul 18 07:27:33 UTC 2011
Hello again, It worked!
Just to recap on the hardware used and the architecture of the whole setup:
Camera ( simple analog wired (coaxial cable)) is sending video to Kodicom KMC-4400R video card
the video is analyzed via Zoneminder, and a separate deamon in perl polls the shared memory
with zoneminder to check for alarm/alert caused by motion detection.
Upon motion detection, the daemon drives this USB relay board:
(FTDI based), using simple echo commands like:
echo -e "\xFF\x01\x01" > /dev/cuaU0
echo -e "\xFF\x01\x00" > /dev/cuaU0
However, the above when tested with Ubuntu 11, didnt work out of the box until i set baudrate explicitly to 9600.
In FreeBSD worked at once, just by running the above script.
Now, two of the relay board NC outputs (circuits) are connected to the two inputs (loops) in
(the two circuits are defined as being "EOL" type, not NC)
which in turn talks to
I have two cameras, and i use them as two separate zones. I think it works good,
and at least for interior spaces, i think motion detection via video is more reliable
than IR detectors, because in the summer IR struggle to detect motion when
ambient temperature is close to the human temperature.
(In exterior spaces, video motion detection is problematic due to large birds, insects, etc,
while exterior IR motion detection is by default unreliable)
Thank you all!
Στις Wednesday 06 July 2011 15:40:08 ο/η Ian Smith έγραψε:
> Hi Achilleas,
> Dropping multimedia@ cc as this seems pretty well 100% hardware .. but
> I'm not subscribed to hardware@ so please cc me from there.
> On Wed, 6 Jul 2011, Achilleas Mantzios wrote:
> > 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 ...
> That 4-relay one might better suit your application then, if FreeBSD usb
> recognises it. It seems to use the same (FTDI?) drivers under windows
> as the other one, but I know almost nought about USB device detection.
> > 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?
> 5V / 72mA is the relay solenoid drive current. 4 of these switched on
> would use ~300mA, leaving 100mA for the other board circuitry. The 12V
> board's relays use the same drive power, 360mW, ie 12V @ 30mA.
> The relay switched contacts are rated at 12VDC to 15A (180W) or 240VAC
> to 10A (2.4kW!), whereas your MCT 100 is only watching for NC contacts
> to open; closed circuit current will be a few mA at most and you won't
> see more than 5V over the open contacts .. ie, not an issue.
> > thanx a lot
> A pleasure.
> cheers, Ian
More information about the freebsd-multimedia