June 8, 2021

Open-source remote COMPASS for your antenna rotator

Update 20.12.2023:

As there was a lot of positive reactions of people looking forward for the new, upcoming version of the project, I’m looking for people with hardware / software / programming and mostly – 3D design skills for printing on 3D printer. I’m working on new version and need to beta-test and help making this project available to everyone as a ready-made product, because almost noone managed to set it up on his own and I had to make remote sessions, which was consuming a lot of my time. (But found few great contacts!)

If you know of anyone that could help, I will provide the beta-testing devices for free, you’ll pay only for shipping expenses. ❤️

Also, the the HMC5883L compass module that I’ve used is out-of-support now, and is highly NOT recommended for new designs. So, I’m switching to a much more stable and very modern compass module. Unfortunately, for this compass module there doesn’t exists any ready pre-made DYI modules on Aliexpress/eBay, so I’ll have to wait until the chips arrive, make a custom PCB, and after that make PCBA (PCB populating) myself, which will be painful and long process, cause the module is so tiny. Also, it can happen, that the design for the module will be incorrect, and there I can start over. New PCB, new PCBA, testing, and only after it will finally work I can make start sending beta-test samples and gather feedback from you, guys!

Here is the original (very unreliable, mostly unusable) HMC5883L datasheet for reference:

The previous HMC5883L module that I’ve used was totally unreliable, no doubt about it. It interfered with almost everything and got de-calibrated even after simple transfer by car, letting it unusable… It did not compensated correctly the declination of the Earth’s magnetic field on various places around the world, which is different around all the US states, for example. Also, the Chinese knockoffs QMC5883L (sold as HMC5883L) were absolutely horrible to measure anything. There were mostly providing random values and were hard to interface with. Trashed money, really.

Hopefully, the new compass module will be more stable and less sensitive to the unwanted EM fields and ferromagnetic materials, will be better at declination approximation, temperature compensated, -40 to +80 deg. Celsius range operation and much more.

I need people who have ideas and suggestions/remarks regarding the beta version of the project. And people that can provide extensive feedback.

News 11.11.2023!

I decided to build this project as a kit, so everyone can use it without any hassle at home or on the portables, so you won’t need to go through all the difficult process of compiling the source code and making it actually work and there won’t be any more questions of which version of what component to order, so what you get will just work. If you are interested in pre-ordering the kit OR to become a beta-tester of the new version, please write me an email to: tekk.sk@gmail.com with title: PRE-ORDER: Wireless antenna rotator compass.

I would be also very gladful to hear from you about various options what we have here, that you would prefer to have on the kit. Like isolated I2C cable with attached compass for tolerance against RF or longer compass cable distance, battery, ability to control your motor, my motor kit, or my own rotator solution, external indoor device with display?

Let me know! I will be more than happy to hear all your thoughts and ideas!

Best, OM7TEK

Edit 02.11.2021

I’m adding photos from Jim Falloon’s build (he used another ESP32 and added I2C extender). He also designed cool 3D-printed case for the whole project, that can be mounted on a mast.

STL files are in the repo in “stl” directory.

Edit 11.6.2021

Looking for an enclosure

Edit 10.6.2021

I’ve just noticed that the white arrow is showing antenna direction, but a red one should. It’s not a bug, it’s a feature! 😅 I will fix this as soon as possible. 👍

To complete the information below, I’m adding a link to the DC motor PWM controller that Michal OM7AMO used for the wipers motor rotator.


Introduction

Hey, fellow hams! I was thinking of a better solution to use for a 10m CB 2xHB9CV antenna with a DIY manual rotator (that Michal OM7AMO made).

BTW this is me, wearing a respirator with international amateur radio logo.

New respirator from Aliexpress with international radio amateur sign

We wanted to know the exact azimuth where the antenna is pointing at. Using an old Android phone running compass app and screen mirroring to a PC would last at most 2-3 hours on a phone battery. 😂 Clever, but not very sensible approach.

This project is made using a HMC5883 compass module from eBay, connected to ESP32. The ESP creates a Soft AP WIFI network using AsyncWebServer where any device in range can connect and (obviously) see the direction, where the antenna is pointing at.

I used $2 HMC5883L, which is actually a QMC5883L clone from usual sources.

HMC5883L clone from China – actually it’s a QMC5883 which needs different library to work properly

The rotator

Yes. I am aware that modern rotators show this already on a PC screen or a controller AND you can control them from the software. But we had a custom DIY manual rotator with just 2 buttons – to rotate CW or CCW. This manual rotator was made from an old car’s (Skoda 102) wipers motor and some gears.

This is the manual rotator that we worked with. Controlling is very simple. Just CW / CCW

User interface

In this project, I made a very appealing and responsive UI that suits every mobile phone/tablet/laptop and is very snappy because of the Websockets link between the frontend (displayed webpage) and backend (ESP32 communicating with the compass).

While I was working on this project, not everything worked as expected at the first time, and especially the frontend part was a lot of work because I wanted to have everything in vector graphics (SVGs) and needed that it would be responsive for every device imaginable.

This is how the app looks on a mobile phone.

Hardware

From hardware side, the project is very simple – just an ESP32, battery pack, and a $2 compass module.

Completed project. Only needs waterproof housing and waterproof micro-USB connector.

Source code

You can find my code at Github: https://github.com/tekk/antenna-rotator-compass

Please, if you have ANY ideas, contribute to this project. Don’t hesitate. It may be useful for other people as well. Open an Issue on Github for questions, suggestions, remarks, and bug reports. Ideas for improvement are VERY welcome. You can also fork the whole repo and make a PR if you know what you’re doing. Thank you! 👍

Future work

Michal OM7AMO has started testing the device and will make a waterproof enclosure for it. Andy Fortiak made wonderful moral support for me. I also want to thank @mprograms for his QMC5883L Arduino Library.

Video

The best explanation of how it works is shown in this short video. You power up the device, ESP32 creates a Soft AP called “COMPASS” with no password. (You can set the password in the code if you’d like). Then you just connect to this AP, your phone may complain that it doesn’t have internet. Just keep the phone connected to the COMPASS AP and navigate to http://192.168.4.1

Here is a video demonstrating it altogether.

Demonstration of the project.

On a portable on a hill, far away from civilization, you don’t have a Wifi connection either, just mobile data. After connecting, navigate to http://192.168.4.1 and the frontend app should appear. The DNS also works on some devices, so you may be able to connect also via http://compass.local when connected to the ESP32.

Just a better quality view on the phone screen as the previous video was suboptimal.

As for the ESP32, I used a generic LOLIN32 board. I like these boards because they have the ability to power up with Li-Poly batteries, charge them via USB, and are relatively reliable. But I’ve not used that Li-Poly connector. For a better lifespan, I used one of these Li-Ion 18650 battery modules and quality 18650s.

Basically, any ESP32 will work with my source code, but you may need to modify the

platformio.ini

config file. 😊

And the medal of honor goes to my wife Eva for having patience with me. ❤️

Thanks for reading and watching the video and sorry for that low-quality camera.

I made this project without any profit. If you want to support my work, my PayPal account is: tekk.sk@gmail.com 😁

Share

tekk

I'm a programmer and licensed ham radio operator. I provide software and hardware consulting and development. In summer I like to swim and bicycle. I also like to get out to any hill with some transceiver and make new contacts. But most of all, I love making new things.

You may also like...

2 Responses

  1. Miki says:

    Som majiteľ počítača Typ : HP 260 G2 2RT68EA, pracuje spoľahlivo, perfektne ! Problém je v tom, že ho potrebujem prevádzkovať z napájania 12 V. Kúpil som menič z 12 V / 19 V, lenže neúspech, počítač potrebuje impulz cez ďalší pin a to cca 9 V ale nie trvale ! Prosím o radu ako tento problém riešiť pri napájaní 12 V ?
    Ďakujem za návrhy !!!

Leave a Reply

Your email address will not be published. Required fields are marked *