Tag Archives: ASK

ROBOGUARD PROTOCOL

#133 Decoding an ASK Alarm Protocol

A few years ago I wanted to add multiple devices to my Roboguard HQ. Unfortunately I had to make my own custom solution because the original product can only allow up to 8 zones for sensors. I created a prototype using the classic Atmega328p but since then I’ve made 3 PCB designs all with different ICs: Attiny, STM8s and STM32 versions, all working with great success

Now I would like to talk a bit about the RF side of things and since I am a licensed ham radio operator as well. I think sharing a blog post will be quite interesting.

So first of all I needed to use an SDR with the correct antenna for the correct frequency in this case it was the tried and true good ol standard (ISM 433.92mhz). Since I’m located in a rural area the air waves are relatively uncongested so for me this is great.

Now I needed to record the signal I used a few tools mainly SDRSharp (because I like writing my own private plugins in C# ) Universal Radio Hacker and Audacity. Honorable mentions go to paint.net I used it for the picture editing

So firstly I observed my device for a few days, triggering it and pressing buttons etc. all while locked on to the frequency. Each time it did something I would record the time and make a high quality .wav recording of the signal.

Once I had learnt a few of the patterns and habits of the device i was able to use this in conjunction with the recorded wave files in audacity to start putting meaning to the patterns of bits and bytes.

Though to make my life a bit easier I calibrated Universal Radio Hacker for my RTL SDR and mad some recordings using some .complex16s files.

The nice thing about URH is that it tries to figure out the patterns for you but I find there’s always a bit of manual labour needed so clankers-0 meatsacks-1 in this regards

URH helped clean up the signal a bit but I still needed to make some fine tuning adjustments and re record the signals a few times with different crystal offsets.

Eventually I got decent results and was able to easily read the bitstream.

So the basic signal is 1x preamble then 8x repeating pattern containing the id and type of signal being sent.

looks like this:

Now everything is about timing. The preambles timing is very different to the payloads timing sure you can just grab the payload and call it a day but the preamble is critical in this day and age. It helps prevent false positives and also adds a bit of time so that the listener can “wake up” and grab the signal reliably so it has and important purpose.

So I used URH since it captures the timings in μs where Audacity can’t really show you accurate timings.

And I came up with the values like in the picture.

This is a nice and simple AM signal to reverse engineer and so far I have not seen anyone else do this for this specific signal so I think I’ll add it to the RTL_433 devices list.

Now once we understand the signal we need to send that signal and receive that signal.

I have done this in bare-metal C programming for the Attiny, STM8 and STM32 microcontrollers as well as added the decoding library to the RTL_433 project on Github.

The cool thing about this was that now I got to extend my bit banging knowledge using bit arrays and shifting bits around. Plus really simplicity is genius in this case. complexity just confuses an already confusing pattern of radio waves, the simple solution is always there as humans we are mostly just to dumb to see it and require time running our biological processors thinking about it until one night suddenly there’s a solution.

The main purpose was to make a cool system for myself at the time but now the secondary objective is to get more people interested in Radio and signals, SDR making plugins etc.

Reverse engineering this signal required multiple different skills and the ability to learn new things so it’s a wonderful educational and useful thing to do with a youngster.

In my opinion it opens the door to curiosity about further complex signals in a moderate way, the individual could then take up more demanding tasks like decoding FSK and other more complex signals like digital voice DMR as an example.

DIY ROBOREMOTE REMOTE

#129 Building a DIY Robo remote

My prototype using a LAN cable breakout enclosure made it small and nifty.

A few years ago while using many wireless systems on a large remote property I had the problem of testing the signals in varies areas before installing my hardware like: Roboguards or my own custom devices that have the ability to communicate with the RoboGuard ecosystem.

Front view of the PCB. It fits perfectly into an ABS enclosure.

So I decided to create a dedicated remote that uses the ASK protocol used with these devices. This makes my life so much easier because it allows me to test multiple requirements at once.

I’m able to test:

  • Signal strength in the area
  • 433 modules I want to use
  • Antennas I want to use
  • The transmission logic I want to use
  • Different ASK protocols

All this with a wireless, rechargeable and easily customizable package. At the moment this is not a commercial product however I have many other devices that work with the Roboguard ecosystem that have commercial applications.

Back view of the PCB. This was made around the ATtiny212 MCU and the SYN1115 transmitter.

COMMON RF MODULES IN SOUTH AFRICA

#109 Types of 433Mhz RF modules in ZA

FS1000A module at 5v no attenuator just using antenna.

Recently I have been using wireless technologies for a few projects.

While looking for a balance between price, functionality and disposability I decided to focus on the 433Mhz RF modules.

These use a free spectrum and have been around for a long time. There’s is a few different types and kinds, with LORA being kind of new and better in almost every way but this comes at a high price compared with the standard 433 RF modules.

So I purchased a few receivers and transmitters from electronics suppliers located in South Africa.

All my tests consisted of running the 4 receivers at 5v and a single 17.3cm straight LAN cable strand as an antenna. The signal sent was a 23bit ASK signal with a pulse length of 1200ms.

All 3 transmitters were tested at 3.3v with a single 17.3cm straight LAN cable strand as an antenna.

The transmitters testes were the FS1000A, CYT1 and the WL102-341.

The crude module actually has more power and range at 5V but I am using them at 3.3v for super low power applications so In this case the module loses.

The Tests were done on farm land.

All transmitters could trigger the receivers at 400m line of sight but only a few could penetrate foliage and a galvanised steel shed.

I only needed MAX 400m which is why I stopped there but some sources claim up to 600m – 800m + for these superheterodyne modules. Not as good as LoRa but for the price what reason do I need not to use them?

*Sidenote Using RF or LoRa in conjunction with a 2.4G Wifi module like the ESP32 or even 3G/4G modules can create multi dimensional divers systems. where we are leveraging the long range and penetration + power output of 433Mhz and 868Mhz but also allowing packets of data to connect over the internet to be stored on a server for data analysis and the creation of graphs to make the data more visually appealing.

Currently I do have some pilot devices and hope to one day make some good quality sensors in 3 different tiers:

  1. Cheap and disposable sensors
  2. Affordable long term sensors
  3. High end sensors

These will be focused on use within rural outdoor areas and I will have a version with Gerber files and schematics etc. available for anyone to download and make for themselves. However the more refined version with a nice enclosure and style will be sold commercially since I do want to be paid for my work.

Back to the modules..

The transmitters that support 5v could penetrate a little better sometimes.

The position of the transmitter/receiver could also greatly affect the received signal especially at range.

Also during summer and during rain the signal was worse with the foliage and water most likely absorbing and/or reflecting the signal

All receivers were superheterodyne with a crystal and I did not use any counterpoise though it would help in some circumstances it makes the receiver unpractical and large.

From worst to best

Some people may wonder why I am using these modules instead of the fashionable LoRa modules. This is simply due to cost and availability.

Designing a good circuit cost time and money. Inserting said circuit into an extremely hostile environment like for example.. rural South Africa is an even more costly exercise

I have had devices damaged by the sun, damaged by water, damaged by ants, damaged by cows, damaged by some kind of rabid animal (assuming jackal) The list goes on.

AND I have not even mentioned the human element… devices damaged by criminals some even STOLEN… for what? You telling me that criminal is sitting in the bush conspiring to reverse engineer my simple circuit and RF protocol and some how will be able to defeat Microchips code protection? I highly doubt it but it is possible…

So now I hope you can understand why these cheap modules do work and are very useful + inexpensive for my purposes.

I also have LoRa versions but for now I only use those when distance and extreme sensitivity is needed.