The K3NG Arduino Rotator Controller

Updated 2020-08-29


This is an Arduino-based rotator interface that interfaces a computer to a rotator or rotator controller, emulating the Yaesu GS-232A/B, Easycom, and DCU-1 protocols which are supported by a myriad of logging, contest, and control programs.  It can be easily interfaced with commercial rotator control units.  With the addition of a proper capacity power supply and several interface components such as relays, this unit could also serve as a total replacement for a rotator control unit or serve as the basis for a 100% homebrew rotation system.  Several azimuth and elevation position sensors including potentiometers, rotary encoders, and I2C devices are supported.  The code is very flexible, modular, and easy to read allowing intermediate and advanced experimenters and builders to customize it.



The Radio Artisan YouTube channel has several video tutorials and demonstrations, and numerous videos can be found from other builders.

Video featuring Bent Andersen, OZ1CT, and the rotator controller he built using the K3NG Rotator Controller code.

Here’s a nice video from Freeman Pascal demonstrating his customized K3NG Rotator Controller build.

EA2J, Enio’s Implementation (Español)

Looking for a PC board or kit?  Try these fine folks:

EA4TX offers a kit with an enclosure and LCD Display offers a kit with an LCD and AC / DC motor support

Major Features

  • Azimuth Only and Azimuth / Elevation rotator support
  • Serial interface using the standard Arduino USB port
  • Control Port Protocol Support:
    • Yaesu GS-232A & GS-232B
    • Easycom
    • DCU-1
  • Support for Position Sensors:
    • Potentiometers / Analog Voltage
    • Rotary Encoders
    • Incremental Encoders
    • Pulse Output
    • HMC5883L digital compass
    • ADXL345 accelerometer
    • LSM303 digital compass and accelerometer
    • HH-12 / AS5045
    • A2 Absolute Encoder
  • LCD Display (2 or 4 rows, at least 16 columns)
  • Nextion TFT Touch Display Support
  • Can be interfaced with non-Yaesu rotators, including homebrew systems
  • Directional indication on LCD display (North, South, North Northwest, etc.) along with degrees
  • Intelligent automatic rotation (utilizes overlap on 450 degree rotators)
  • Support for both 360 degree and 450 degree azimuth rotators or any rotation capability up to 719 degrees
  • North Center and South Center support
  • Support for any starting point (fully clockwise)
  • Optional automatic azimuthal rotation slowdown feature when reaching target azimuth
  • Optional rotation smooth ramp up
  • Optional brake engage/disengage lines for azimuth and elevation
  • Buttons for manual rotation
  • Command timeout
  • Timed interval rotation
  • Overlap LED Indicator
  • Help screen
  • Speed Control, both single PWM output (compatible with Yaesu controllers) and dual PWM rotate CW and rotate CCW outputs and dual elevate up and elevate down outputs
  • Variable frequency outputs
  • Preset Control using either potentiometers or rotary encoders with optional preset start button
  • Speed Potentiometer
  • Manual Rotation Limits
  • Classic 4 bit, Adafruit I2C LCD,, and various other I2C display support
  • Optional tenth of a degree support with Easycom protocol (i.e. 123.4 degrees)
  • Park and AutoPark
  • Azimuth and Elevation Calibration Tables
  • Host unit and Remote unit operation for remotely located sensors using two Arduinos or ATMega chips
  • Works with hamlib rotctl/rotcltd, N1MM, PST Rotator, and many more programs
  • Moon and Sun Tracking
  • GPS Interfacing
  • Realtime Clock Interfacing
  • NEW! Satellite Tracking
  • NEW! Nextion Display Support

This unit can be interfaced with Yaesu rotator controller using the standard 6 pin DIN port on the back.  Older controllers may not have the DIN interface and will require opening and soldered connections.  This unit does not disable the rotator controller and all controls on it can continue to be used (although it is advisable not to attempt to control the rotator with manual controls and with the interface simultaneously.)  Other rotator hardware can be interfaced as well with a little research and design.

Basic Schematic

Schematic (click to enlarge)

Note: Refer to the pin numbers on the inside of the Arduino component outline (i.e. D1, D2, A0, A1, etc.) and not the numbers on the outside of it (1, 2, 3…).

The schematic above shows a basic setup supporting a 4 bit interface LCD, azimuth and elevation voltage inputs, manual buttons, and a single variable speed voltage output.  Additional controls and options such as an azimuth present potentiometer, azimuth and elevation preset rotary encoders, and brake control lines can be added as needed if the appropriate pins are chosen and set in code at compilation time.  If using with an azimuth-only rotator, all components related to elevation can be omitted.  So, again, keep in mind the above schematic is a basic unit that will work for most applications and additional features will require additional components.

I have this unit interfaced to a Yaesu GS-1000DXA control unit, and others have interfaced it to various other rotator control units.  I’m also building a complete azimuth/elevation rotation system called Frankenrotator.  This project illustrates how to build a complete system without a commercial control unit.  Consult this for additional ideas for interfacing, power supplies, and master/slave operation.


Full documentation is located here.  Please read it!  Volunteers for maintaining documentation are needed.


John, W3SA, has tested on a Yaesu Az/El unit, contributed several updates to the elevation code, and tweaked the code for a 16 column LCD display.

Anthony, M0UPU, wrote about his rotator controller construction and is offering PC boards.

Bent, OZ1CT, has contributed several ideas and feature requests, and performed testing.

G4HSK has a nice page documenting his project using this code, the PstRotator control software, and a Yaesu G-5500 rotator.

All trademarks mentioned on this page and in the code are property of their respective owners.

Source Code

Source code is located on GitHub.  Click the Download ZIP button to get the whole package of files.

Support and Feature Requests

Please consult this page for support information.  Feature requests and bugs are documented and tracked on GitHub.

Various video tutorials, demonstrations, and development news updates can be found on the Radio Artisan YouTube channel.

Please note that I do this work in my spare time as I can and I am not a professional developer, however I play one on TV.  I do my best to answer support requests,  however I don’t like having to answer questions for items that are explained in the documentation.  Development items are prioritized by me based on the level of difficulty and what I’m interested in.  I welcome code contributions, code testing, bug reports, and any help you can provide.  This can even be helping with documentation or providing support to others on the Radio Artisan group.

78 thoughts on “The K3NG Arduino Rotator Controller

    1. Anthony, that is one nice program. I have downloaded your code, it compiled nicely in Arduino 22, and I hope to build that before too long.

      Thank you for a good project.

      73 de Ken H> K9FV

  1. Can you please provide me with an email address for Anthony. I have built the rotator controller, but I am having some difficylty getting it to work properly. I would like to cantact Anthony for some guidance.

    Chris VK4CVL

  2. Updated code posted. GS-232B emulation is now an option, the X1/2/3/4 speed commands are supported, the P36, P45, and Z commands are supported. Additional Az/El testing and improvements have been made by W3SA.

  3. This is a very interesting project for me, as I’m looking for an interface for my G-1000SDX and a home made elevation system with an actuator and an ordinary potmeter for elevation readout. If I’ve read well these are both supported by thsi design/project.

    I’m not into PIC programming e.g. but very familiar with electronics and a bit of programming.. When I sudied electronics back in 1985 we used 8088 (IBM) / 6502 (Apple) / Z80 ;-) programming in machine code.. those were the days my friend… hihihi thought they never end

    My question is what do I need ? A development kit ? 8 or 16 MHz clock ?

    Any info would be very welcome.

    1. John, nice talking with you on email. Let me know how you make out when your Uno arrives. 73 Goody

  4. Updated code posted. Elevation rotators other than 180 degree rotators supported now. Also, WordPress was wrecking the first two include statements in the code, apparently thinking the was html.

    1. Got the boards, start plumbing and YES got it working for Azimuth, haven’t connected Elevation at the moment as I need to make some connections on my elevation rotorboard.

      The only thing which is strange is that the heading is allways North on the display. Azimuth is showing 83 deg for example but the text above shows North, no matter what direction I turn. Also when I let HRD turn the antenna by clicking a direction. The display shows Rotating to 99 deg for example. When the rotor stops at 99deg Bearing shows North.

      So making progress.. ;-)

      1. I found a bug that crept in from the elevation code. New code posted, version 2011102901.

  5. With the given code it works on Azimuth only, it shows NE on the first line and Azimuth 50 on the second line

    but if I uncomment this line,

    //#define FEATURE_ELEVATION_CONTROL // uncomment this for AZ/EL rotators

    recompile and upload to my arduino board

    it shows

    N on the first line
    and AZ 50 El 10 on the second line

    No matter what I do it remains on N(orth)

    1. Could you bring up the serial monitor (set it for 9600 baud), issue a \d command (backslash delta), manually rotate the rotator, and tell me what you see in a debug line that starts with “display_direction:” ? (Issuing the \d command again will turn off debug mode.)

      1. I’ve send you an e-mail with the debug results, in Azimuth only mode and in Azimuth + elevation mode.

  6. Hi I am interested in the Rotator controller using the Arduino. Can someone tell me the type number for the Arduino and possibly a UK supplier. Thanks and 73 for any advice. Vlive GW0PPO

  7. Clive, I build mine with an Arduino uno, you cand find them on Ebay too. They don’t cost that much, think you can get them for less than 15 uk pound. The arduino is a bare board, you need a 2×16 / 2×20 or 4/16 character display as well with a HD44780 or compatible controller on it

    73! John PA5MS

  8. Thanks for that John. I will check out eBay for an Arduino Uno

    Can you program the Arduino via the USB port and do you need a special programme to do it?

    Thanks for any help. 73 Clive GW0PPO

    1. clive you need a special program but if you go to you can find all info needed. programming is realy simple last time i programmed something was r decades ago and even i got it running. the package you need to download is big you also need to install the arduino driver for windows or whatever operating system you run

      sorry for typing errors this message is form my ewindows phome with a tiny keyboard and fat fingers hihihi

      73 &ohn pa5ms

  9. Hi John, thanks for that. I know what its like typing on a phone. Mind you I have enough problems typing on a Laptop keyboard! 73 Clive GW0PPO

  10. HI Guy,

    I was reading this project year ago and I decided to build and have PCB dedicated for the Az-EL project instead of use ARDUINO BOARD.

    So I have PCB and finish but I changed the LCD connection to be match same as LCD shield, Check it out

  11. Hello Goody,

    thank you for this nice projekt!

    I would like to use Arduino in combination with my Microham station master as controller for more
    as one rotator, only what i need is to have output with same reference level for same direction!
    for each rotator one card……

    Cann you help me with it?

    thanks in advance!


    1. Hello Braco,

      I’m not quite sure I understand. Do you want to connect a Microham Station Master to an Arduino and have the Arduino control multiple rotators?


      1. Hi Goody,

        i am not sure if you get my previos mesage!
        I would like to use multiple rotators with Arduino cards and to controll it with
        Microham Stationmaster. MH SM have outputs for CCW and CW reference voltage (not needed)
        and POT input (analog). In this case i will need probably DAC inbetween Arduino and MH SM.
        Idea is to get same analog level from each rotator (of course over arduino and DAC) for all rotators
        for each antenna direction! Then i cann swicth any rotator (automaticly or manual) i have to MH SM.



      2. John PA5MS is correct in his response below. This Arduino project essentially does a portion of what the Microham unit does, interfacing a rotator controller to a computer. It sounds like you want to switch the CW rotation contact, the CCW rotation contact, and the analog azimuth voltage line between multiple rotators, allowing the MH to control multiple rotators. This is fairly easily to do with switches, relays, or transistors. It would not require an Arduino unless you wanted to interface it somehow to a computer or you needed something more intelligent to invoke the switching. I’m not familiar with the MH unit capabilities, however I’m guessing you could use contact closures to control a switching circuit which would be a more integrated solution than an Arduino. If you need just a simple switching circuit, let me know and I could probably draw something up.

  12. Braco,

    I think you don’t understand quite well what this rotor interface does.. It is a sort of digital read-out of an analog rotor with POTMETER. Also this controller is an interface between your computer and the rotor. It makes it possible to control your rotor by computer. Like with Ham Radio Deluxe (HRD)

    It can replace you rotor controller if you use relays and a suitable power supply.

    If you understand the concept then Also I don’t understand what you have in mind to build with the microham station manager. I think the station manager is also a computer interface to control a rotor which the arduino is as well so basically the same.

  13. Hello John,

    well i know very well what for it is!

    I have 12 differnt rotators and i would like to use single controll box for it!
    In this case i need same signal level from each rotator pot. My idea was to use
    Arduino to digitalize analog signal from pot and then convert it back to analog but with same
    signal level for same direction! This will allow me to use single controllbox for all rotators i have
    of course i will need to install on each rotator one card and i will need to have some
    switching martix for it! MH SM i have allready and i want to use it as controll box, but it could
    be anything else!


    1. Hi Braco,

      I believe you can convert the signal back to analog by utilizing digital pot. The only problem here would be the resolution, but I believe that 8bit would be fair enough for HF beams.


  14. Branco,

    Now it is clear to me what you want to do with the arduino board. The rotor interface has no control voltage output for Azimuth / Elevation. These are just inputs which the board needs to read Azimuth and elevation. So it reads the analog voltage from the pot and calculates the coresponding Azimuth / Elevation and shows this on the display. Don’t think you can use it as a sort of “level converter” wich gives you an equal output at an Azimuth / Elevation regardless the rotor you use. Think there are easier solutions to convert the azimut / Elevation from whatever rotor you use to a “standard” for example 0.00 to 5.00 V output

    The Yaesu 1000SDX rotor has an adjustable output 0 to 4.5V for 0-450 degrees

    If your rotor has a potmeter inside you can use a simple op-amp circuit to adjust the level to a “standard” which is useable for you.

  15. Hello,
    do you think that is possible to use a compass sensor and an accelerometer instead of potentiometers?
    I want to use a compass sensor HMC5883L for rotation positioning and an ADXL345 to get elevation degree.
    Any idea?

    1. Hi Giorgio. I’ve never worked with compass sensors or accelerometers, but looking briefly at the data sheets for both of the devices you mention I see they have I2C interfaces. This would make it fairly easy to interface both devices to an Arduino. With a little bit of research, I could probably give you some code to do this, however the read_azimuth() and read_elevation() subroutines in the code are where you would want to drop the I2C interface code in to read the devices. Let me know if you want to pursue this.

      1. Hi thanks for your kind and fast reply.
        I can confirm that I’m using this sensors trough i2c and I’m already getting Azimut and elevation value in a separate sketch.
        I will really appreciate If you could help me to put code in your project

      2. Could you send me your I2C code to my email address which is anthony dot good at gmail dot com? I will embed your code in the proper places and make it a compile time option (a define) to include the code.

  16. Hello Goody,

    Thank you for great arduino project!

    I need to ask, is this motor shield can be used instead of K3NG rotor interface?

    “This motor shield allows Arduino to drive two channel DC motors. It uses a L298N chip which deliveries output current up to 2A each channel. The speed control is achieved through conventional PWM which can be obtained from Arduino’s PWM output Pin 5 and 6. The enable/disable function of the motor control is signalled by Arduino Digital Pin 4 and 7.

    The Motor shield can be powered directly from Arduino or from external power source.”

    Thank you,

    1. Hi Didi. Yes, I think it could. I’m a little unclear on how exactly the direction pin works. Does the PWM always control the speed and a high on the direction pin reverse the direction, and a low makes it go forward? Are you intending to use this to build your own rotator? You would also need potentiometers for reading the azimuth and optionally the elevation. In the code we would need to convert any digitalWrite command for the rotate_cw, rotate_ccw, rotate_up, and rotate_down pins to instead turn on the necessary pins for the shield direction control and PWM output. This would not be hard to do. I would convert the digitalWrite statements to call subroutines to do this. Let me know if you’re interested in pursuing further and we can look at it in more detail.

      1. Hi Woody, thank you for prompt reply,

        I am collecting information to build an antenna rotator from a common ham rotator 360deg potentiometer sensor type as azimuth and a satellite actuator screw jack reed switch sensor type as elevation. The reed switch sensor will be changed to potentiometer later.

        Please look sample codes at:

        It’s Arduino variant which is embedded a 2A rotor shield. It might have all the codes we need.

        Please take your time, I hope it will be a contribution for your great rotor control project.

    2. Didi,

      Take a look at this is the manual of K6XOX who uses K3NG software in his designed controller board. It’s actually an Arduino with all extra components on one board. He exactley describes how to connect the L298N board which you can get as cheap as 19 dollar. The link to the website where they sell them is there too.

      73! John PA5MS

  17. Hello !

    first of all many thank for your super project for Arduino rotor-controller.
    I just started playing with arduino uno and uploaded your software setting some #define as required by my setup. Seem to work great except command Mxxx. Let me explain:

    – rotor is a Kenpro KR-5400B (only azimuth is actually used)
    – Azimuth indication on controller is 180 – 270 – 0 – 90 – 180 (so center is North )
    – Potentiometer voltage out: left 180 = 0V / North = 2,5V / right 180 = 5V

    I try different software setup and tweak(360 deg rotor, nCenter, etc) and got correct azimuth indication on serial monitor and display, but if i give Mxxx command, something go wrong.

    Example: actual azimuth = 90 deg (the needle is on the right side of controller’s indicator and voltage about 3,7 V). Send M270 command, it should move CCW because position 270 is on the left side of indicator, voltage = 1,25V. What happen ? rotor start turning CW instead CCW, I think because he knows that 270 is > than 90 so also analog voltage should be greater.

    For sure I am doing something wrong. Any comment please ?

    Thank you Pietro / hb9rxc

    1. Hello Pietro.

      Last week a New Zealand amateur brought to my attention an issue with the 360 degree rotator rotation logic. I have fixed the issue and posted new code here, version 2012031401. Please try this and let me know if this works for you. Also, please set your code for South Center (comment out #define OPTION_NCENTER_ROTATOR), since it starts at 180 degrees.


      1. Hi Goody

        thank you for prompt reply ! I downloaded your latest release and comment out #define OPTION_NCENTER_ROTATOR as required (but why ? it is a N-center system … )and uploaded. After calibration I moved to 135deg (right side of indicator) and then issued a M270 command. Now rotor start moving in the right direction CCW but when passing 360 (north) beaming to 270 … it stop and goes back CW to 020 then stop. I tried also to go manually with controller to 270, but everytime passed 360 sostware bringh back to 020 …

        I wrote my own software (based on VE2DX example) with couple of tweaking to solve this problem … actually it’s work great ! I would like to send you my rotor.ino file but I need your PM e-mail …. btw if you are interested to see what I deed !
        Waiting … 73′ Pietro

      2. You can send your .ino file to anthony dot good at gmail dot com.

        Regarding “North Center” and “South Center”, the terms are a bit misleading. The Yaesu manual indicates that the “Z” command toggles the needle starting point between North and South. Default is South. Later in the manual they call it “North Center” and “South Center”, so I use that terminology. However, the term “Center” is very misleading as it really isn’t the center of the rotation, it’s the start.

      3. Also, if you could send me a debug dump of the controller in action, that would help me troubleshoot the problem. If you issue the \d comment it will activate debug mode. Please issue the command before you initiate rotation and copy all of the text into an email.

  18. Hi Radioartisan , thanks for great rotator code . However 90deg overlap one way and none the other direction is not my favorit food . My rotor G-800 ( and box) has mechanical stop in North + 90deg overlap . However I have offset the rotor in the tower -45deg , giving me an overlap of 45deg CW but also 45deg CCW . Can the code compensate (calibreate) this 2x45deg overlap?
    Great with PWM and slowdown before fullstop , but how about a slow-up start ?
    Again great code ,
    happy easter, vy73 de oz1bxn chris

    1. Hi Chris. I can implement slow start as an optional feature and change the code to accommodate your rotation scheme. I think I’m going to rewrite the rotation logic code from scratch so it can handle custom starting points and rotation capabilities other than just 360 and 450 degrees.

      Just to be clear, your rotator setup starts at 315 degrees and rotates clock wise to 45 degrees, with 450 degrees of rotation, correct?


      1. Super. Yes the rotor is a 450deg type and start in 315 and move on overlap towards 45 (this is the mechanical stop in the rotor bell) .

        It would be smart if this overlap values could be calibrated to any value E.g. in-case a storm twist the antenna.

        btw all this overlap has made me thinking what is the best way to run overlap . It is tradition here to run +-45deg , but it actually perhaps be wiser to use the default 90deg.

        look forward to test the new code

        best vy73 de oz1bxn chris

      2. I haven’t forgotten about this, I’ve just been real busy. I have the slow start working and I rewrote the rotation logic so it can essentially handle any starting azimuth and rotation capability up to 719 degrees. I’m also working on brake engage/disengage outputs for azimuth and elevation for rotators that are equipped with brakes. I should have a code update posted this coming weekend.

  19. Easy Man , no stress . Great work you do and it works great , but take it easy

    best vy73 de oz1bxn Chris

  20. Updated code posted. This code has slow startup and brake operation capability and can now be configured for just about any rotation starting point and rotation capabilities up to 719 degrees. Enjoy.

    1. Flashed my rotor with the new code here tonight . Seems to work perfectly . Will test more in the next days . best vy73 de oz1bxn chris

  21. Hi Goody,

    Great project, indeed!
    Built and set up for tests on bredboard within 20 minutes but I am hitting issue with serial communication – I only get response for the first command I issue. After that I only get “?>” response in arduino serial monitor. Thought it could be memory issue, but debug mode reports 1441 bytes free mem. Any help would be appreciated!


    1. Hello Vesko,

      Are you using the Arduino IDE Serial Monitor or another program? Is there a particular command you are executing each time before it only responds with “?>” , or is it any first command that is successful? Could you email to anthony dot good at gmail dot com the .ino file you are compiling?


      1. Hi Goody,

        Thank you for your fast response and for showing me the mistake I made!
        I hope that both CR an CRLF options for serial communication will be available in future versions as well :)


  22. New code posted. No major new stuff, but I’m now posting code on Sourceforge rather than create new WordPress pages which is a bit laborious.

  23. Hi,
    Thanks for a great program.
    Have just completed the construction of a interface. No problems. Worked just fine.

    OZ1OP / Ole

  24. Hello
    I can not find the LCD anywhere in Europe
    Anyone can help?
    Can I use an HD44780 instead?
    Is it true that only the code to be loaded?
    Or are there extra files?
    I am now for this.

  25. Hi!

    I am highly Interested in this for my cheap rotor project. I have a Rotor with absolute no direction indication so Magneto and/or accelerometers are my way to go, I know about deviation etc.

    One reason I love this project is the arduino CPU which is nicely programmable by my Mac. The motor is 3 wire and AC switched by 2 relays. It has a memory computer control but that is of no use. I can make it turn freely around by removing the two small notches.

    Any hints or tips are welcome!


    1. Hello Martijn. I don’t have any tips at this point, but I would be glad to work with you on getting a digital compass and/or accelerometer working with the code. The code that is in there now was contributed by someone and hasn’t been tested by me. I do have an LSM303DLHC combination accelerometer and digital compass which I intend to interface and test sometime soon.


  26. Dear Goody,

    First of all, Thank you and all contributors for this great controller project. I am following carefully and look forward to see some new improvements in the near feature like use of digital compass, accelerometer sensors for accurate beaming. Bigger Color Display with some more info on the display like Callsign, UTC Time, Local Time etc. 73 DE TA2LE – HALUK

  27. Is it possible to use TI MSP430 LaunchPad which is only 4.30 USD ? Anyway to convert existing code for Code Composer Studio ?

    73 DE TA2LE – HALUK

    1. Unfortunately, Haluk, I don’t know the answer to this as I’m not familiar with that platform.

    2. Yes, google Cheap Rotor Controller. I mangle messages trying to post a line with symbols.
      Its on tomdoyle dot org

      AF5FP — Don Lewis

  28. Hello,
    Will this run on a V3.x Arduino nano? The pin out seems a little different from the one in the schematic. I just want a small board with Arduino and needed supporting hardware and nothing else. I want to install it inside the controller box.

    1. It should run fine on a Nano. The pin assignments are not critical; you can adjust the code as needed to reassign the pins.

      1. Hi Anthony,
        I was given a old Yaesu G-800 rotor without anything else. I was going to develop my own controller but fortunatly ran across this web page and you saved me a lot of time and effort. I ordered a arduino uno r3 from mp3car, a sainsmart 12864 glcd from sainsmart and went for it. Though there were some challenges in your latest release, CODE_VERSION 2012050501, I did get it working over the labor day weekend. Your program would show only short unreadable pixels on my display. I kept thinking it was my display or character addressing routines but by changing the ‘>’ to a ‘ LCD_UPDATE_TIME) { ” in your update_display() function, I was able to get it working fine. To get to this point I placed debug statements inside that “if” test and they never printed. I found millis was below count of lcd_update which stayed well below LCD_UPDATE_TIME. After getting it working I took a pause and have not determined why this was happening. Testing with HRD rotator using LED’s for the azimuth motor drive and a 500 ohm pot it all checks out. Later I would love to take up a question about how the overlap is only used on one direction of the rotor giving a large overlap rather than on both ends of the rotor’s rotation range and dividing the overlap in half, My rotor has 45 degrees of overlap at the end of CW and CCW before activating the stop switches as I interpret it.
        Again, thank you for some most excellent project and code.
        AF5FP — Don Lewis

      2. Anthony,
        I see that didnt make sense.
        I changed the right arrow > to a left arrow LCD_UPDATE_TIME)
        in your update_display function.

        AF5FP — Don Lewis

      3. Hi Don. Note that the latest release is 2012060801 on SourceForge, though there weren’t any changes that I can recall in the area of the code you’re working on between 21012050501 and 2012060801.

        if ((millis() – last_lcd_update) > LCD_UPDATE_TIME)

        This line of code checks the duration of time since the last LCD update and if it’s over LCD_UPDATE_TIME which is defaulted to 2000 mS (2 seconds), it updates the LCD. If you’re changing the “>” to a “<", it's making the LCD get updated every time update_display() is called, which is every main loop (quite frequently, probably on the order of every 200 to 300 uS). There's a chance if one of the other subroutines in the main loop takes a long time (over 2000 mS), the LCD will never update again as the duration of time since the last update is over 2000 mS. But I digress. I'm not sure why your display would need more rapid updates. Are you using the regular LiquidCrystal library or are you doing I2C?

      4. Regarding “overlap”, it’s more a state of mind than actually placing it somewhere, if that makes sense. :-) If you manipulate these lines:


        …you can pretty much place the rotation wherever you like. If your G-800 controller is like my G-1000, you can move the needle to accommodate a “non-standard” starting point. The overlap LED won’t come on after the usual 180 degrees when going clockwise, but will come on after 360 degrees of rotation.

Comments are closed.