Gate inactivity alert

Hi,

I am a complete novice and what I want to do can maybe be accomplished in easier ways than with arduino, but hopefully someone here can point me in the right direction.

I have a gate with traffic of cows, this gate automatically opens and closes. I would like to have an inacivity alert, that sends out an SMS when there has been no activity for a certain amount of time. I have a Windows PC nearby connected to the Internet, so I could have a small program running here to monitor an on/off sensor (a simple switch). The question is how to connect the sensor to the PC and being able to monitor this programmatically. I would prefer using Flash for the programming.

Thanks in advance,

Olav

I don't see any place for an Arduino in your plans. As such this doesn't appear to be relevant to this forum.

That said you could always use an Arduino to monitor the switch and tell the PC.


Rob

Something as simple as this USB I/O board would do that and a lot more http://www.velleman.co.uk/contents/en-uk/p303.html but arduino would be more fun :slight_smile:

this gate automatically opens and closes. I would like to have an inacivity alert,

Create a free-running timer. Each time the gate opens / closes, it resets the timer. Once the timer exceeds a certain count, it triggers the message.

The 'gate' sensor could be a simple switch that is operated when the gate opens and closes. A simple sketch on the Arduino can detect when the gate opens, monitor the elapsed time since the last opening, and do something when the elapsed time reaches a threshold.

I can see two options for sending the SMS. Option 1: attach a GSM modem to the Arduino and have it generate and send the text itself. You would need to buy a suitable modem and maintain an mobile subscription for it. Option 2: Arduino notifies the PC to send the SMS. This requires cooperation from an application running on the PC.

If the PC is running Windows then you could use GoBetwino as the application on the PC to receive commands from the Arduino and send the SMS. If it's non-windows you would have to write an equivalent application yourself, but it would not be hard to do.

The thing run by Gobetwino (or your own equivalent implementation) would need to send an SMS via the internet. Many mobile service providers provide an email-to-sms gateway and that's what I'd aim to use.

I don't think OP is concerned about whether the gate is open or closed, but about how long it has been since a cow went through the gate.

You could get the cows to wear RFID tags, and train them to walk closer to the RFID reader.

Or, you could use a PIR sensor to see if there are any cows moving around. I suspect that the cows are close enough to the IR spectrum that the PIR sensor monitors.

Just to let you know, I found a simple solution in using a serial port and connect the switch to pin 7 and 8. I can then set RTS status to True which will put power on pin 7, and then read the CTS staus which is True when there is voltage on pin 8.

Thanks for your input. I will use an email to SMS gatway for the alert messages.

Olav