Tag Archives: scantronic

VM167 Prototype experiments – SMS on Open

For some reason I decided today to make a system to drop me a text message when the door of my bedroom is opened.  I started off thinking about how this could be done – I didn’t fancy hacking a mobile to send a text particularly, I wanted more of a computer controlled solution. While I was thinking about the more complicated aspects of my sudden unexplained desire to make my room high security I did the more boring task  of laying 10 meters of alarm cable neatly and invisibly around the perimeter of my room.

With this done, I had formulated the solution in my head – here’s how it works:

The VM167 Prototype Experiment board created by the good people at Velleman has an ample number of digital inputs to do this.  I basically hooked up the reed switch on my door (Read: a type of switch that closes when it’s placed in a magnetic field that is strong enough and opens when it isn’t) to the VM167 on the other side of the room.  From there, I hooked the VM167 up to the lovely netbook I got as one of our teams prizes at the Microsoft UK Imagine Cup 2011 finals.  I then wrote a quick application in C# that accesses the Mediaburst SMS API to send SMS messages for a nice low fee.

The VM167 Prototype board

The VM167 Prototype board

The little black taped-up thing in the picture above is just a small Lithium battery – the board doesn’t react to open/closed circuit as an alarm-geek like myself might expect, it actually expects a potential difference between 1 and 5 volts to set the input to high.  A minute amount of current is drawn so this little Lithium cell placed in-line works a treat.

And the result? Works like a charm.  The program I wrote is really simple – it just provides a 15 second timer to “escape” the room and get the door shut.  Once the door is opened, a text message is dispatched instantly and the program waits for the user to reset it to avoid spamming hundreds of texts if the door is just blowing around or something).

A text message letting me know the door is open.

A text message letting me know the door is open.

I doubt I’ll ever have any use for it, but it got me using the VM167 prototype that Velleman sent me, and I might even develop something for iOS later down the line if Apple can stop people stealing my work.

Anyway, to finish off here’s a little preview of how silly my UI design is:

Honestly, this was rushed...

Honestly, this was rushed...

Stay tuned for some posts from NYC!

Scantronic 9651 Cracked – Part 1: Getting started

The Scantronic alarm panel + keypad I mentioned in my previous post have now arrived! I have hooked up power and a backup battery and the kit seems to work great – right away I got down to investigating the mysteries of the keypad protocol that I introduced in my last post on this topic.

The Control Unit

The Control Unit - The brains of the operation

So there it is, the main control unit of the Scantronic 9651.  Right now I’m not exactly powering it up correctly; in an effort to avoid killing myself I’ve opted not to use the inbuilt magnetic transformer (240 VAC to 20 VAC – yes VAC again – The base unit does run on AC).  I have decided to use my bench power supply combined with a 2.4Ah sealed lead-acid battery to power the panel for now, and it seems to work fine despite the “MAINS FAIL” messages displayed occasionally.

My initial test setup

My initial test setup - My initial setup for testing the panel

As you can see above, my initial testing of the panel involves my handy little DSO Nano.  This is an excellent little device (actually one of the earlier versions of the now numerous handheld digital oscilloscopes produced by Seeed Studio) and it allows me to see the digital waveforms produced by the panel and the keypad in real time, as well as recording the waveforms for viewing later on a PC or Mac.

DSO Nano Oscilloscope

DSO Nano Oscilloscope - Showing a waveform of the actual signals produced by the panel and keypad (this is actually the DATA pin).

I started by recording some of the frequently occurring signals produced on the “DATA” line and trying to decipher them.  It looks to me like a PWM (Pulse Width Modulation) waveform, of which the clock will of course be provided on the “CLK” pin.

Right there I start to get a bit stumped – the DSO I have only lets me display one channel (I.e. one waveform) at a time, and I need both the clock and the PWM signal to start to really understand what is going on.  Basically – I’m looking for a logic analyser.  These are cool little devices that let you analyse which lines of a logical system are high or low (1 or 0) and record them, show them alongside one another, track their changes and much more.  The proper lab-based ones are, as always with proper lab-based things, expensive.  The knock-off USB based ones are cheap, but the software looks terrible.  I need to chat to some people that know about these things before I can make a purchase and not run the risk of buying something completely and utterly pants or wasting my money on some 50 kilogram box of bolts from a 1990s electronics lab.

I’ll keep looking.

Scantronic 9651 keypad/PC interface idea

One of the various bits of rubbish I’ve got hanging around is an old Scantronic 9651 keypad (actually a Scantronic 930).  For the uninitiated: Scantronic is a range of security alarms manufactured by Cooper Safety. In the security installers industry, they tend to be branded by individual companies that do the actual install jobs; for example, my control keypad is branded by ADT.

Long story short, I’d like to hook this up to my Mac so I could write some kind of emulation software or otherwise use it as a control device.  “Why?” I hear you ask, and I retort: “If you are still asking `Why?` at this point, why are you still reading my blog?”.  Onwards with the geekery…

The Scantronic Keypad - Branded by ADT

It is my understanding that these keypads function as serial terminals that send keystrokes to, and receive screen updates from the main controller board.  Up to 5 keypads can be connected to one controller board to allow control of the system from several different locations around a site.  They are to be connected in a daisy-chain or star configuration (I.e. in parallel).  This information is quite readily available in the form of the various manuals that Cooper release with their products.  The protocol that dictates how the keystrokes and screen updates are communicated is however, a more closely guarded secret.

The headers that I think are associated with the serial communication between the keypad and the controller board are labelled “SIG” and “SRQ”.  My initial thought was that the “SIG” pin would convey 1s and 0s as high and low voltage values with the 0V pin.  A check with the oscilloscope shows that this isn’t the case.  Further investigation shows that during key presses when the keypad is powered up, all the pins maintain their voltages as usual, with no variation at all.  Curious.

I investigated the behaviour of the keypad without messing with the headers at all.  Internally, there are two DIP-style switches that are labelled “PROG” and “TEST”.  The “PROG” switch places the keypad in a programming mode (a rudimentary interface allowing the enabling and disabling of the backlight and sounder, as well as the modification of the keypad address).  The “TEST” switch places the keypad in a testing mode, flashing all the LEDs in a sequential manner and testing the LCD display.  When the keypad is in it’s “normal” mode (I.e. with both the internal switches set to off), it seems to accept 16 keystrokes after powering up, then starts beeping with each keystroke in a way that suggests the keystroke was declined.  This behaviour gives me the impression that there is some kind of buffer in effect here.  Curiouser.

As a continuation of this thought, perhaps the “SRQ” pin comes in to this.  I would theorise that the controller board sends some kind of identifiable pulse unique to each keypad address on a regular basis on the “SRQ” pin - say, every 5 seconds each of the 5 possible keypad addresses are “polled” by the controller board.  This would mean that each keypad has 1 second to dump its buffer of keystrokes on the “SIG” pin in a TDMA-style arrangement whereby up to 5 keypads may share one communication medium (in this case, the “SIG” pin).  Though of course, there is always the possibility that I am wrong.  Another possibility is of course that this keypad is fried.  The time in my cupboard under a load of electronic rubbish and quality time with our good friend Mr. Electrostatic discharge might well have finished this guy off.  After all, it IS nearly as old as me…

Nearly as old as me

This thing is like... way old!

I have an ace up my sleeve here however.  I have just won a wonderful like-new Scantronic 9651 Controller board with an additional 930 keypad!  Hopefully I will be able to inspect the behaviour of the controller boards respective “SIG” and “SRQ” pins and crack this whole thing wide open, at which point I will of course publish a wonderful blog post detailing all the geeky goodness.

Until then, play safe!