RotorController

Rotor controller

I have now finished the PCB design and layout of the Az/El controller for the EME and satellite systems. This design will be used for both the 7 meter EME dish and my Satellite system. The design has been done according to the motto: "Why do it simple when you can do it complicated" :)


I went possibly a "little" over the top with this. The processor is a Cortex M7 (i.MXRT1064 from NXP) running at 600 MHz. On the board is 32 MByte SDRAM, 512 Byte FRAM (for storage of current incremental encoder positions), 128 MByte NAND Flash (disk system), USB interface, SMPS for 3.3V and 12V (for encoders, CAN/RS485 devices etc), 10/100 MBit Ethernet, RS232 (for connection to PC tracking programs), 2 x incremental encoder interfaces, RS485 port (for connection to f.ex US Digital absolute encoders etc), CAN Bus interface, 4.3 inch capacitive touch TFT display (480 x 272 pixels), 230VAC optocoupled input for detection of power fail/power off (not used/not needed).


The motor drivers are modules from Mikroe (H-Bridge 6) that can deliver in excess of 15 amp each (the devices on the boards are rated to 50 Amp, the boards are not designed for that high of a current). They will deliver the 24 VDC to the Az/El motors (PWM controlled individually for speed ramping etc). I chose the modular approach as it will probably be these that dies in case of serious malfunction, its just a matter of swapping a module if shit happens...
A big thanks to my lovely wife for helping out with the design of the front and backpanels, doing the logo and general placement of stuff :)


PCB's is being sent for production, in a couple of weeks I will know if the there is light at the end of the tunnel ;)


The controller will be housed in a "Hammond 1402H" box, the front and back I will do in black PCB, this makes it easy to get something that looks pretty.

Board, front and backpanel "mounted" on the Hammond 1402H box:

https://www.mouser.dk/ProductDetail/546-1402H


Powersupply (which is way too big for the satellite system, but using the same for both the EME and satellite system) to the right is a Mean Well RPS-500-24-SF (24VDC 20.8 Amp):

https://www.mouser.dk/ProductDetail/709-RPS-500-24-SF


(3D model below is with the first backplate and main PCB)

Its always nice when the physical outcome looks exactly as the models did :) I got the front, back and the controller PCB back from production (JLCPCB). The front and back are perfect fit!

The controller board also seems to work, so far the Ethernet (10/100 MBit/LwIP) LCD (LvGL), Touch, NAND Flash (LittleFS), SDRAM, USB, Encoder interface, motor drivers, CAN Bus, RS485, FRAM and powersupplies are working perfectly. Still need to check the powerfail detector (optocoupled). All the basic software is up and running, need to make the software control loop for the drives, some failsafe features etc.

In a couple of days I should receive the gearbox, then its on to some real life testing.

2022-07-28 12.58.35
2022-07-28 12.58.27
2022-07-28 12.58.51
2022-07-28 12.58.56
2022-07-28 12.59.12

I received the Az/El drive for the Satellite system. I connected it immediatly to the Rotor Controller, and everything just worked out "of the box"! I can now command Az/El to any position, still a lot of software/GUI to do, but the basics are working very nicely now. The drive will be sitting in the lab for some days while I do some more software development, after this it will be installed in its "forever home", the Satellite system.


The control loop for the drive(s) has programmable accel- and de-accelration ramps. I can control the slope, start speed, end speed and maximum speed. I can also set how many degress the drives needs to get to maximum speed.

All parameters can be set from the GUI /Touch screen once I get the software done.

Currently the parameters are set to:


These parameters gives a very nice movement, at least in a no-load configuration. They will probably need to be tweaked a bit once the antennas etc are mounted to the drive.


For safety reasons I have implemented a "watchdog" feature for the drives. If for some reason, one of the motors does not move (no/too few pulses), the motor will stop immediately. 

The parameters for this can also be tweaked in settings.


Pretty much finished the controller software and GUI interface, still a few tweaks to do. For now it supports Yaesu GS232A and GS232B protocols. Maybe I will add more along the road, but I have a feeling that the Yaesu protocols are well supported by various tracking programs.
Tracking of sun and moon is done natively by the controller, no need for PC connection for that (so EME can be done without a PC if needed)


Finished 2 complete controllers today, both checked out perfect. One will be used for my satellite system and the other for my coming 7M EME dish system

2022-08-26 18.31.40
2022-08-26 16.52.26
2022-08-26 18.34.40
2022-08-26 18.31.45
2022-08-26 16.50.57
2022-08-26 16.51.01
2022-08-26 17.27.00
2022-08-26 17.27.05
2022-08-26 17.27.08
2022-08-26 16.51.07

A short video of the current state of the controller. In the video, the controller is running with simulated motors/encoders

Communication with URC

I have developed a number of PC applications (SkyScanner, SatTrack) and these supports communication with my URC controller using either UDP or TCP/IP Socket communications. As a number of users of these applications has a need for "talking" with the application to support their own antenna controllers, I'm describing the TCP/IP socket protocol for the URC here. This will enable you to support this in your own controller and be able to talk with SkyScanner/SatTrack (and other applications I'm doing in the future).


The URC acts as a "server". It creates and accepts (multiple) connections to a socket created (port number can be defined in URC). As default, URC will listen on port 1111, but you can freely configure that.


All messages are formatted as JSON text. Every time you send URC a request, it will reply back with its status message.


The status message looks like this:


{"TICK":2421,"UPTIME":318,"CPULOAD":22.2,"VERSION":1.00,"AZ":188.37,"EL":10.69}


  • TICK is just a sequence number
  • UPTIM is the time the rotor controller (in sec) has been running
  • CPULOAD is the current CPU load in %
  • VERSION is the firmware version
  • AZ is the current azimuth of the antenna
  • EL is the current elevation of the antenna


Requests URC can receive (remember, the status message above is sent back from URC on every request it receives):


{"POLL"}  

POLL is just a request for current information (typically Az/El position is needed)


{"UPDATE"}

UPDATE will tell the URC to download and install a new firmware version (if available)


{"GOTO":[35.4,100.5]}

GOTO will send a new Az/El position to the URC. If the URC is in "REM" mode, the antenna will move to this postion.


Just as a comment, SkyScanner and SatTrack only needs status messages with the "AZ" and "EL" keywords in the status update, if you use "URC SOCKET" as rotor protocol in these applications, there is no need to send "TICK", "UPTIME" etc. keywords, just the "AZ" and "EL" are needed.