===== USB rotator interface 4 =====
[[https://remoteqth.com/single-rotator-interface.php|Web page]] \\ \\
[[https://remoteqth.com/order.php#rotator-interface|Order]] \\ \\
[[https://remoteqth.com/wiki/index.php?page=Rotator+module+version+3.3|Version 3]] <- USE FOR PREVIOUS REVISION \\ \\
{{https://remoteqth.com/img/slide-rot4-1.png?650}} \\
New features
* independent power GND
* support two wire or grounded center azimuth potentiometer
* support ten turn potentiometer
* support cw/ccw pulse inputs
* compact small smd layout
* better mechanical assembly with 3d print parts
* robust usb-B connector
* support PWM start/stop with DC power (optional)
----
===== Hardware =====
{{https://remoteqth.com/img/wiki-rot4-01.png}}
- Start light button
- CCW rotate light button
- CW rotate light button
- Preset encoder
- LCD display
- USB-B connector
- D-Sub 15 pin connector
==== D-Sub 15 pin connector layout ====
{{ https://remoteqth.com/img/wiki-rot4-02.png?300}}
^ Pin number ^ AC motor functionality ^ DC motor functionality ^
| 1 | - | **DC motor (+)** output |
| 2 | ::: | ::: |
| 3 | **AC motor** output CCW | **DC motor (-)** output |
| 4 | ::: | ::: |
| 5 | **GND** (power input) / (motor output) ||
| 6 | **GND digital** (USB) input ||
| 7 | **AC motor** output CW | **DC (+)** power for motor input |
| 8 | ::: | ::: |
| 9 | **AC power** input | - |
| 10 | ::: | ::: |
| 11 | **AC brake** output | **DC brake** output |
| 12 | **PULSE CW** input - open collector with 10k pull up to +5V ||
| 13 | **PULSE CW** input - open collector with 10k pull up to +5V ||
| 14 | **Azimuth input** 0-5V DC from potentiometer ||
| 15 | | **+5V DC input** (max 400mA) also for azimuth potentiometer |
| shield | **GND** (power input) / (AC motor output) ||
Voltage/current carrying capacity is limited by the relays used, see [[https://remoteqth.com/hw/ftrf1-relay.pdf|datasheet]].
==== Sources ====
[[https://remoteqth.com/download-count.php?Down=hw/Rotator-Interface-4.0.3.pdf|.PDF | Schematics 4.0.3]] \\
[[https://remoteqth.com/hw/Rotator-Interface-4.0.3-ibom.html|.html | Interactive BOM 4.0.3]] \\
[[https://remoteqth.com/download-count.php?Down=hw/Rotator-Interface-4.0.3.step|.STEP | 3d model 4.0.3]] \\
[[https://remoteqth.com/download-count.php?Down=hw/Rotator-Interface-4.0.3.zip|.zip | KiCad source 4.0.3]] \\
\\
**3D models** \\
[[https://remoteqth.com/download-count.php?Down=3d/Rotator-Interface-LCD.scad|LCD.scad]] - source \\
[[https://remoteqth.com/download-count.php?Down=3d/Rotator-Interface-LCD.stl|LCD.stl]] \\
[[https://remoteqth.com/download-count.php?Down=3d/Rotator-Interface-LCD.3mf|LCD.3mf]]
- for [[https://github.com/prusa3d/PrusaSlicer/releases|PrusaSlicer]] \\
[[https://remoteqth.com/download-count.php?Down=3d/encoder-knob.scad|knob.scad]] - source \\
[[https://remoteqth.com/download-count.php?Down=3d/encoder-knob.stl|knob.stl]] \\
----
===== How to assembly =====
{{https://remoteqth.com/img/wiki-rot4-03.jpg}}\\
**What tools do you need to build**
* Tin
* Solder
* Pliers
* Splitters
* Phillips screwdriver
* Small flat screwdriver
* + 2,5mm imbus (packed in KIT)
* Ohmetter (for op-amp preset)
* Electric drill and 3.5mm drill bit for DC PWM (optional)
==== Steps of assembly ====
For finding any components use [[https://remoteqth.com/hw/Rotator-Interface-4.0.3-ibom.html|.html | Interactive BOM 4.0.3]] with search window.\\
The estimated difficulty of the assembly - for **moderately advanced solder maker.**\\
- Check all parts {{https://remoteqth.com/img/wiki-rot4-04.jpg}}\\ \\
- **First time** solder three connectors **P2,P3, P4** {{https://remoteqth.com/img/wiki-rot4-54.jpg}} \\ \\
- Connect USB cable to Rotator interface and your PC, and check (device manager in windows) **that the USB converter has been recognized correctly.** Contact us if you have any problems and do not continue assembly. {{https://remoteqth.com/img/wiki-bd2-ftdi.png}} \\ \\
- Solder pinheader **P5, JP2, U1** and pinsocket 6x2 **P3** \\ **WARNING, do not solder P1!**\\ Explanation: P1 use in factory for upload bootloader to CPU, therefore no further need. {{https://remoteqth.com/img/wiki-rot4-05.jpg}}\\ \\
- Solder **S4** reset switch {{https://remoteqth.com/img/wiki-rot4-06.jpg}}\\ \\
- **Cut one of pin S4** switch nearest to S2 switch, see picture {{https://remoteqth.com/img/wiki-rot4-07.jpg}}\\ \\
- Solder ten turn trimmer **RV1, RV2, RV3** with orientation by silkscreen or picture {{https://remoteqth.com/img/wiki-rot4-08.jpg}}\\ \\
- Solder light switch S1, S2 and **S3 marked blue - from 2021 year without mark - all is same** \\ **Warning - solder this part carefully with regard to nearby SMD components so that they are not damaged**{{https://remoteqth.com/img/wiki-rot4-09.jpg}}\\ \\
- Put 3D print **LCD frame** {{https://remoteqth.com/img/wiki-rot4-10.jpg}}\\ \\
- Remove protective foil from LCD {{https://remoteqth.com/img/wiki-rot4-11.jpg}}\\ \\
- Put on LCD to pinheader and **screw the M3x10 into the corner** of the plastic frame (without the use of a nut, the hole is conical) {{https://remoteqth.com/img/wiki-rot4-12.jpg}} \\ **NOTE:** if your kit contains an LCD with 2.5 mm holes, use a 3 to 3.2 mm drill bit to enlarge them (4x) {{https://remoteqth.com/img/wiki-rot4-33.jpg?300}}\\ \\
- During solder LCD **press the frame and the LCD** so that there is no space between them {{https://remoteqth.com/img/wiki-rot4-13.jpg}}\\ \\
- Solder all 16 pins {{https://remoteqth.com/img/wiki-rot4-14.jpg}}\\ \\
- **Break** and remove the peg from rotary encoder {{https://remoteqth.com/img/wiki-rot4-15.jpg}}\\ \\
- **Straighten** the two side pins using pliers {{https://remoteqth.com/img/wiki-rot4-16.gif}}\\ \\
- Solder **U3** rotary encoder \\ **WARNING - solder this part carefully with regard to nearby SMD components so that they are not damaged** \\ \\
- Open aluminium box and **insert two black M3x20** to front panel {{https://remoteqth.com/img/wiki-rot4-17.jpg}}\\ \\
- Fit the front panel (by screwing) and **lightly tighten the nuts** {{https://remoteqth.com/img/wiki-rot4-18.jpg}}\\ \\
- If use **DC motor** continue on white base PCB soldered **D2 diode marked 1N4007.** For AC is D2 not use! {{https://remoteqth.com/img/wiki-rot4-19.jpg}}\\ \\
- Solder **D17, D18 zener diode marked BZW04** {{https://remoteqth.com/img/wiki-rot4-20.jpg}}\\ \\
- Solder **R40** resistor (without picture)\\ \\
- Solder pinheader **JP3, JP1, P6 and P2** (cut to 6x2) {{https://remoteqth.com/img/wiki-rot4-21.jpg}}\\ \\
- Solder **C28 and C29 capacitor marked 472** {{https://remoteqth.com/img/wiki-rot4-22.jpg}}\\ \\
- Solder **V1, V2, V3, V4 varistors marked 180K07D** \\ {{https://remoteqth.com/img/wiki-rot4-23.jpg}}\\ {{https://remoteqth.com/img/wiki-rot4-53.jpg?500}}\\ (From September 2021 change of type from blue to red) \\ \\
- Solder **P4 USB-B** connector {{https://remoteqth.com/img/wiki-rot4-24.jpg}}\\ \\
- Solder polyfuse **F1** {{https://remoteqth.com/img/wiki-rot4-25.jpg}}\\ \\
- Solder **J1 DB-15** female connector {{https://remoteqth.com/img/wiki-rot4-26.jpg}}\\ \\
- Solder **L2** inductor {{https://remoteqth.com/img/wiki-rot4-27.jpg}}\\ \\
- Solder **RL1, RL2, RL3** relay {{https://remoteqth.com/img/wiki-rot4-28.jpg}}\\ \\
- Connect **P2 put in P3** connector and **screw two M3x4** to bottom aluminium box spacers {{https://remoteqth.com/img/wiki-rot4-29.jpg}}\\ \\
- Screw two black countersunk screws into the bottom rear panel and stick four rubber feet {{https://remoteqth.com/img/wiki-rot4-30.jpg}}\\ \\
- Put the knob on rotary encoder axis {{https://remoteqth.com/img/wiki-rot4-31.jpg}}\\ \\
- Screw two black countersunk screws into the top cover of alluminium box.\\
- Next step **preset jumpers** below and **upload test firmware.**\\
----
===== Start-up =====
==== Jumpers and potentiometers preset ====
After setting jumpers dependancy to your hardware continue upload [[usb_rotator_interface_4#install_test_firmware|test firmware]].\\
{{https://remoteqth.com/img/wiki-rot4-32.png?400}}
* **RV1** - **set LCD contrast** after upload firmware
* **JP2**
* AC motor OPEN
* DC motor SHORT
* **JP3** - enable pull up
* Three wire azimuth potentiometer OPEN
* Two wire grounded azimuth potentiometer SHORT (+ adjust with P5)
* **JP1** - enable PWM for DC motor (optional)
* default SHORT
* enable OPEN - must be install Q4
* **P6** - select output for brake, between
* AC
* DC
* GND
* **P5** - enable [[usb_rotator_interface_4#setting_gain_shift_op-amp|op-amp GAIN and SHIFT functionality]]
* default disable (bypass)
* enable
* RV2 - tune SHIFT
* RV3 - tune GAIN
----
==== Install test firmware ====
This firmware testing harware after assembly and helped you with azimuth potentiometer.
- Install [[https://www.arduino.cc/en/Main/Software|Arduino IDE]]
- Install [[https://www.arduino.cc/en/guide/libraries|Arduino libraries]]
- LiquidCrystal
- LcdBarGraph
- Download firmware from [[https://github.com/ok1hra/rot4-test|GitGub]]
- Select menu Tools/Board:"Arduino Nano"
- Select menu Tools/Processor:"ATmega328P"
- Connect USB cable between Rotator and PC
- Select menu Tools/Port/YOUR-CONNECTED-PORT
- Upload firmware
- After firmware upload **PRESET LCD CONTRAST** with resistance trimmer RV1
{{https://remoteqth.com/img/wiki-rot4-33.png?400}} \\ \\
Test functionality - **we recommend testing everything**
* **Measure azimuth voltage input (bargraph and value) -** connect azimuth potentiometer and test if analog voltage input work and how is his range.
* **Counter CW and CCW pulse input (must grounded to digital GND) -** this tested two digital input path.
* **Encoder functionality set pwm outputs on LCD and mosfet gate -** turn encoder increase/decrease PWM value. If connect PWM mosfet, also test output PWM power from 0 to 100%. With osciloscope also easurable on gate of mosfet.
* **Light button feedback and switch relay -** every button must light after press and switch on one ofrom three relays (tested input from button and output to light and enable relay).
\\
This firmware use also for [[usb_rotator_interface_4#setting_gain_shift_op-amp|tune SHIFT and GAIN op-amp functionality]].
----
===== Digital power supply =====
{{https://remoteqth.com/img/wiki-rot4-36.png?400}}\\
For independent powered without USB. Also better (recommended) way, because USB power produced lower voltage over isolating diode D4. \\
* Voltage +5V
* Power consumption < 400mA
----
===== Connect Azimuth potentiometer =====
==== 3 wire one turn ====
{{https://remoteqth.com/img/wiki-rot4-34.png?400}}\\
- **JP3 jumper switch OPEN.**
- **P5 jumper switch to bypass.**
- Optimal value is about 600 ohm. Corresponds to 8mA current.
- Avoid values lower than 100 ohms.
- If test firmware indicate range 0-5V, continue by connecting the motor.
----
==== 2 wire, grounded ====
{{https://remoteqth.com/img/wiki-rot4-35.png?400}}\\
- **JP3 jumper switch SHORT.**
- **P5 jumper switch to enable.**
- Optimal value is near internal pull-up R40, which is the value 510 ohm.
- Next step [[usb_rotator_interface_4#setting_gain_shift_op-amp|Setting gain/shift op-amp]]** - for 2 wire azimuth potentiometer set shift to 0 and increase only GAIN (RV3).**
- If preset op-amp indicate in test firmware range 0,5-4,5V, continue by connecting the motor.
----
==== 3 wire, one from ten turn ====
{{https://remoteqth.com/img/wiki-rot4-34.png?400}}\\
- **JP3 jumper switch OPEN.**
- **P5 jumper switch to enable.**
- Worked with one turn (or any part) from 10k ten turn potentiometer.
- Next step [[usb_rotator_interface_4#setting_gain_shift_op-amp|Setting gain/shift op-amp]]
- If preset op-amp indicate in test firmware range 0,5-4,5V, continue by connecting the motor.
----
===== Connect Azimuth cw/ccw pulse =====
{{https://remoteqth.com/img/wiki-rot4-37.png?400}}\\
- **JP3 jumper switch OPEN.**
- **P5 jumper switch to enable.**
- Input must grounded to **digital GND**.
- Next step test with [[usb_rotator_interface_4#install_test_firmware|test firmware]].
- Note: [[https://remoteqth.com/w/doku.php?id=usb_rotator_interface_4#firmware|K3NG firmware]] use only pin12. \\
----
===== Setting gain/shift op-amp =====
P5 **DISABLE** shift/gain op-amp (bypass) \\
{{https://remoteqth.com/img/wiki-rot4-40.png}}\\
----
P5 **ENABLE** shift/gain op-amp \\
**Warning** - this circuit is sensitive to the stability of the 5V power supply. If enabled, ensure a sufficiently sized 5V power supply with short leads.
{{https://remoteqth.com/img/wiki-rot4-41.png}}\\
With enable, activate circuit two OP-amp for
* SHIFT RV2 level down from up to 3,5V
* GAIN RV3 in range 1-21
For use continue with this step
- First **disconnect** USB interface from **power** and turn RV2 and RV3 to start (full counterclockwise if control screw is down)
- **Test** if RV2 and RV3 on start with ohmeter on test points
- between W1 and W2 for RV2 **turn to 0 Ω** \\ {{https://remoteqth.com/img/wiki-rot4-42.jpg?300}}
- between W3 and W4 for RV3 **turn to 0 Ω** \\ {{https://remoteqth.com/img/wiki-rot4-43.jpg?300}}
- Connect to power and upload [[usb_rotator_interface_4#install_test_firmware|test firmware]] (if not)
- **Turn the azimuth potentiometer** to the stop, which produces **lower voltage**.
- Use RV2 for shift voltage down, not 0V - optimally 0,5V. \\ {{https://remoteqth.com/img/wiki-rot4-44.jpg?300}} \\ - for 2 wire azimuth potentiometer shift not set, will remain on 0.
- **Turn the azimuth potentiometer** to the oposite stop, which produces **higher voltage**.
- Use RV3 for increase voltage up to 4,5V (not full 5V). \\ {{https://remoteqth.com/img/wiki-rot4-45.jpg?300}}
- **Jump to step 4.** and reply for precise tune output between 0,5-4,5V on full azimuth potentiometer range.
- Now ready for upload [[usb_rotator_interface_4#firmware|K3NG rotator fimware]].
----
===== Connect AC motor =====
{{https://remoteqth.com/img/wiki-rot4-38.png?400}}\\
For connecting AC motor power, use only power GND on pin 5 and shield.
Do not use independent digital GND. \\
For AC motor do not use **D2** diode, if install, **remove it.** \\
**Notice:** do not forget to connect the capacitor as well, according to the original connection of your motor.
----
===== Connect DC motor =====
{{https://remoteqth.com/img/wiki-rot4-39.png?400}}\\
For connecting AC motor power, use only power GND on pin 5 and shield.
Do not use independent digital GND.
----
==== Enable PWM ====
(Optional hardware). \\
**WARNING - use only with DC motor, do not solder if use AC motor.** \\
* Use mosfet type [[https://cz.mouser.com/ProductDetail/Nexperia/PSMN5R6-100PS127?qs=%2Fha2pyFaduhLXSOaoYYebLOGpnlAMcnTe4ka6Et7i8QghzgaqRtMRg%3D%3D|PSMN5R6-100PS,127 from Mouser]] or other distributor.
\\
Solder Q4 mosfet with distance - see picture \\
{{https://remoteqth.com/img/wiki-rot4-46.png}}\\
\\
Drill a 3.5mm hole in the rear panel according to the size in the picture\\
{{https://remoteqth.com/img/wiki-rot4-47.png}}\\
\\
Insert duty rollers and silicone insulation from the outside into the mosfet\\
{{https://remoteqth.com/img/wiki-rot4-48.jpg}}\\
\\
Put rear panel and mount to back with two screws.\\
{{https://remoteqth.com/img/wiki-rot4-49.jpg}}\\
\\
Insert the inner part of the plastic pin from the side of the mosfet. More power may be needed.\\
{{https://remoteqth.com/img/wiki-rot4-50.jpg}}\\
\\
* **Remove JP1 jumper** (OPEN).
* PWM start stop in preconfigured firmware is [[https://github.com/ok1hra/k3ng_rotator_controller/blob/d4b870fa14f026b6408244525fd3c3e9a4e001ed/k3ng_rotator_controller/rotator_settings.h#L39|enabled and may be more configure.]]
----
===== Firmware =====
This firmware originaly produced **Anthony K3NG,** TNX! and source available on [[https://github.com/k3ng/k3ng_rotator_controller|GiHub]]. \\
For **more information** use [[https://github.com/k3ng/k3ng_rotator_controller/wiki|the author's extensive wiki]].
- First prepare hardware with [[usb_rotator_interface_4#install_test_firmware|Test firmware]], after finish continue.
- Install [[https://www.arduino.cc/en/Main/Software|Arduino IDE]]
- Download firmware - preconfigured version [[https://github.com/ok1hra/k3ng_rotator_controller|K3NG firmware 2020_08_26]]
- Open file **rottator_settings.h** and edit two line which is used to set the azimuth range of the rotator
#define AZIMUTH_STARTING_POINT_DEFAULT 180
#define AZIMUTH_ROTATION_CAPABILITY_DEFAULT 450
- Select menu Tools/Board:"Arduino Nano"
- Select menu Tools/Processor:"ATmega328P"
- Connect USB cable between Rotator and PC
- Select menu Tools/Port/YOUR-CONNECTED-PORT
- Upload firmware \\ {{https://remoteqth.com/img/wiki-rot4-51.png?600}}
==== Calibrate K3NG firmware with CLI ====
This is quick view, for **more information** use the author's extensive wiki [[https://github.com/k3ng/k3ng_rotator_controller/wiki/500-Heading-Calibration|Heading Calibration]] [[https://github.com/k3ng/k3ng_rotator_controller/wiki/820-Command-Reference|Command Reference]]. \\
- Open serial monitor in Arduino CLI (Ctrl+Shift+M)
- Set Carriage return and 9600 baud
- Previous start point and range also available preset [[https://github.com/ok1hra/k3ng_rotator_controller/blob/master/k3ng_rotator_controller/rotator_settings.h#L12|via CLI]]
\Ix[x][x] - set az starting point
\I - display the current az starting point
\Jx[x][x] - set az rotation capability
\J - display the current az rotation capability
\Q - Save settings in the EEPROM and restart
- For callibration voltage to preset azimuth range in firmware use
O - Azimuth offset calibration
F - Azimuth full scale calibration
- for erase EEPROM command
\E - initialize EEPROM
- \\ {{https://remoteqth.com/img/wiki-rot4-52.png}}
==== Setup pulse input ====
[[https://github.com/k3ng/k3ng_rotator_controller/wiki/340-Position-Sensors]]
===== Control software =====
* [[https://www.qsl.net/yo3dmu/index_Page346.htm|PstRotator]] for Windows
* [[https://remoteqth.com/wiki/index.php?page=Rotators|RemoteQTH server]] image for Raspberry PI - web interface
* [[https://github.com/dfannin/grotor|gRotor]]
* Even software supporting Yaesu GS-232 protocol...
===== Some tips =====
- Compiled binary files from [[https://github.com/ok1hra/k3ng_rotator_controller/releases|release page]] can windows users upload with utility [[https://www.hobbytronics.co.uk/arduino-xloader|XLoader]]
- [[https://github.com/ok1hra/k3ng_rotator_controller/blob/master/k3ng_rotator_controller/rotator_language.h#L22|Azimuth shorts]] you can replace with prefixes which are in the same direction from your QTH. For example see [[https://github.com/ok1hra/k3ng_rotator_controller/blob/master/k3ng_rotator_controller/rotator_language.h#L126|prefixes from OK]].
- And [[https://github.com/ok1hra/k3ng_rotator_controller/blob/master/k3ng_rotator_controller/rotator_language.h#L13|Azimuth]] you can replace with **name your antenna or tower**, e.g. //20m YAGI//.
- If do not show degree character (°), change in file rotator_settings.h settings to#define DISPLAY_DEGREES_STRING "\xB2"
If the LCD displays instead of the character degree (°) lower case **"alpha" (α),** find in source code all string **'char(223)'** and replace to **'char(178)'**.
==== TODO ====
* component BOM