[DRAFT] OpenMower conversion of a SA650B Robot Lawnmower

When OpenMowerifying my YardForce SA650B, I found it hard to find all the tidbits of information — many pulled out of Discord (which is not the easiest to search), because the main documentation is written only for the YardForce Classic 500.

I'm hoping to collect all the information in one place (here), at least so people can use it as a jumping-off point. (If the Wiki isn't totally dead, it would be nice if this could be integrated into the Wiki...) I'd advise checking the information yourself — this isn't intended to be a primary source of instructions, rather pointers to existing information, and this page will surely go out of date with time!

Other than using the non-blessed SA650B robot, deviating further from the 'blessed' documentation, I decided to use the less expensive (and smaller) UM960 RTK GPS receiver instead of the ArduSimple simpleRTK2B. Information about that is included here in this page, too.

Overview🔗

As a high-level overview, this project will entail:

  • removing the robot's mainboard and replacing it with an OpenMower mainboard
  • removing the board from the charging/docking station and replacing it with a new one
  • modifying the 'CoverUI' (that is, the circuit board with the LEDs and buttons) by:
    • soldering in some bodge wires
    • moving some SMD resistors (or shorting resistor positions together in another way)
    • reflashing the firmware with an STLink (I used a STM32F3 discovery board I bought 10 years ago)
  • modifying the 4 hall sensor PCBs by (re)moving a pull-up resistor
  • modifying the cable that comes from the CoverUI
    • either by cropping the existing cable and crimping a JST-XH on the end (can be done with pliers in a pinch)
    • or by making a custom cable and crimping JST-XH on one end and DuPont on the other
  • drilling a hole for GPS antenna (and sealing it afterwards)
  • mounting antenna to top of robot — I used hot glue
  • mounting UM960 GPS receiver inside robot — I printed a standoff and used hot glue
  • ??? some other cables in the main compartment
  • raspberry pi setup (software activities)

Bill of Materials (BOM)🔗

This is a rough BOM for my build (all prices include postage):

  • YardForce SA650B: £370 (eBay UK, official YardForce seller)
  • OpenMower Mainboard Kit: £341 (Vermut's shop, includes £55 import VAT + £11 fee for DHL to collect the VAT...)
  • WITmotion UM960 RTK GPS Receiver: £75 (bought from witmotion-sensor.com, arrived from China)
  • Helical HA-901/STA-901 GNSS (GPS) Antenna: £17 (eBay UK, from China)
  • Raspberry Pi 4B single-board computer, with 8GB RAM: £72 (CPC. 2GB RAM is apparently fine for users but more advised for developers, I decided to just futureproof)
  • INTEGRAL INMSDX64G-100V10 64GB microSD Card: £8 (CPC)
  • TP-Link AC600 a.k.a. Archer T2U Plus USB WiFi Dongle with 5 dBi gain antenna: £14 (eBay UK)
    • technical optional because the Pi has built-in WiFi, but I wasn't confident in the range. On the other hand, this USB dongle gets a signal 100m away from the access point (through 2 walls!) — phenomenal.
  • 30cm Antenna extension cable (right-angle SMA to u.FL/IPX): £1 (AliExpress)
  • JST-XH connectors: £2.50 for a kit that is bigger than needed (AliExpress)
  • Right-angle USB A male to A female extension cable, 0.2m (for WiFi dongle): £1 (AliExpress)
  • Right-angle USB A male to C male extension cable, 0.5m (for UM960): £2 (AliExpress)
    • longer than strictly needed, but I mounted the UM960 onto the lid of the inner robot chassis, so I wanted extra length so you can open it up without having to struggle to unplug it.

Total adds up to about £900. Not a cheap side-project by any means but plenty of fun and hopefully will save lots of time!

Note: if there isn't a free NTRIP caster (RTK correction service) in your area, you will need to set up an RTK base station yourself, which will at least cost you another RTK GPS receiver, GNSS antenna and some sort of microcontroller or single board computer. This could increase the BOM cost by £100–£200 in this situation.

Opening the Robot🔗

Useful Links:

Find and follow the SA500 series instructions; this robot is similar with screws in very similar places.

One important distinction I didn't see noticed: To remove the lid from the inner shell, remove all 8 screws around the grass cutting height knob and then twist the knob, pretending you are setting the grass cutting level lower than the minimum — this disengages the screw thread and the lid then comes off. (Try not to over-unscrew it, because later you'll want to screw it at the right position so your knob has the right labels on it. A bit of trial and error works for repositioning this later though.)

Some people claim the SA500 knob can be pulled off and repositioned. I did not feel this immediately with the SA650, but maybe I just didn't pull hard enough?

Mainboard Replacement🔗

  • Motor cables and battery cables are the same as for the official Classic 500 instructions, but the chunky 2-pin battery cable seems awkwardly positioned on the mainboard for this robot — you can pull the cable through a bit more though and it's fine. (I wonder if the position changed between robots.)
  • TODO unknown 4-pin cable on right hand side, near pin headers
  • TODO 9-pin cable from front array — I hear it has the 'hatch stop' button on it, plus some other stuff I'm sure
  • TODO 2-pin cable to round thing — is it a buzzer? But the mainboard has a buzzer already!
  • TODO 2-pin cable to handle switch
  • TODO another unidentified 2-pin cable ..... is it a second handle switch?
  • TODO where is the rain sensor? Probably one of the unidentified cables :-)

GPS Installation🔗

I printed a small standoff for the UM960. I hot glued the standoff onto the lid of the robot's inner chassis and then screwed the UM960 into the standoff.

The UM960 comes with a heatsink (with an adhesive backing); remove the plastic and stick it on to the UM960.

TODO do we need some active cooling

TODO do we need heatsinks for the RPi4B?

I drilled a hole in the lid of the robot's inner chassis, next to the UM960 board. The hole needs to be big enough to accomodate the u.FL connector on the antenna extension cable.

I fed the antenna extension cable through the hole, plugged it in to the UM960, then 'sealed' the hole with hot glue. I'm not convinced this is the best way, but not sure what else to use. Regular silicone sealant (acetoxy cure ­— smells like vinegar) is apparently corrosive to electronics, plus it didn't even bond nicely to the plastic shell, so don't make my mistake and try that first.

TODO find a better sealing method...

I fed the antenna cable around the gaps in the hatch (no drilling required) and hot glued a self-designed antenna standoff on the outside of the robot shell, to which I attach the antenna.

(for what it's worth: afaik hot glue can be debonded with IPA, so it should be pretty decent as a reversible adhesive)

Docking Station Board Replacement🔗

Useful Links:

Read a combination of the official instructions and the in-progress SA500 series instructions in order to disassemble the docking station.

I found I had to unscrew and remove the Infrared LED board from the front of the docking station, otherwise the docking station could not be closed properly.

Unfortunately this leaves a hole through which water could technically (but unlikely) enter — I taped over the hole as a least-effort countermeasure. (When the infrared LED board is seated, there are some rubber O-rings around the LED which appear to be intended to act as a water seal here.)

CoverUI Board Modification🔗

The OpenMower kit from Vermut's shop includes a custom CoverUI, but we don't use that on the SA650B because there are 4 safety switches connected to the CoverUI and it would be a faff to reroute them.

This was probably the hardest part of the whole process, because it involved SMD soldering (which I have not done for years) and soldering on bodge wires.

With some patience and care, it is very achievable though.

Follow the steps at:

I did all the modifications including the 'optional' ones since it will save you effort in the end.

Once the hardware modification is complete, you need to flash the custom firmware.

I used an STM32F3 discovery board (devkit) instead of a dedicated STLink. For that, you need to change the jumper settings on the devkit to reconfigure the STLink to flash an external chip, rather than the chip on the devkit itself.

You also need to know the pinout of the devkit's STLink header, which is surprisingly obscure and difficult to find:

  1. VDD from target — don't connect this
  2. SWCLK — connect to CoverUI pin marked 'CLK'
  3. GND ­— connect to CoverUI pin marked 'GND'
  4. SWDIO — connect to CoverUI pin marked 'DIO'
  5. NRST — don't connect this
  6. SWO — don't connect this

Finally, find a '3V' pin on the devkit and connect it to the CoverUI pin marked '3V3'.

You should now be ready to do the flashing with st-flash write firmware_RM-ECOW-V110_GD32_HALL_STOP.bin 0x08000000 — but defer to the official instructions for exact commands.

Instead of modifying the stock cable, I decided to build a custom cable by taking a 4-core cable and crimping 2× 2-pin DuPont headers on one end and a 4-pin JST-XH on the other. I think crimping 1× 5-pin DuPont header (leaving one slot blank) on the 'CoverUI' side would be neater though

The following pinout is to be observed:

  • UI pin 9 (5V) → OM pin 1
  • UI pin 3 (RX) → OM pin 2
  • UI pin 1 (TX) → OM pin 3
  • UI pin 7 (GND) → OM pin 4

Note that the pin 1 and 2 is marked on the PCB and observe the correct counting sequence... (TODO elaborate)

Raspberry Pi Setup🔗

OpenMower Configuration🔗

TODO — but also see all the other documents linked so far :-)

WiFi Dongle Driver Installation🔗

apt update
apt install dkms git build-essential libelf-dev linux-headers
git clone https://github.com/aircrack-ng/rtl8812au.git
cd rtl8812au
make dkms_install

Now re-plug the WiFi dongle. Check ip a to see if you now have 2 wireless devices.

If you do, you can disable the built-in WiFi by editing /boot/config.txt and adding this line to the start of the file:

# disable built-in wifi as we use external dongle
dtoverlay=disable-wifi

There is probably a way to configure the external dongle without totally disabling the integrated one, but it's (probably) easier to do this.

UM960 Configuration🔗

Useful Links:

Once the UM960 was plugged into the RPi, I opened a picocom on the /dev/ttyUSB0 serial port and issued the following commands.

Note that you need carriage returns in the line endings, so picocom command to use is: TODO

FRESET
CONFIG COM1 460800

Note this command is only valid if using the UM960 over USB, not through the UART pin header! At this point, the baud rate changes to 460800 so reconnect with the new baud rate.

MODE ROVER SURVEY MOW
GPGGA 0.1
GPGSV 1
GPRMC 1
GPGSA 1
GPVTG 1
GPGST 1
SAVECONFIG

The GPxxx commands set the time interval, in seconds, to report specific types of data. So once you've issued these commands, you will get plenty of output from the serial port.

SAVECONFIG will save the configuration. If you mess something up, or get garbage, issue the FRESET command.

TODO the MODE ROVER SURVEY MOW is built for lawnmowers, but differs from what the OpenMower wiki suggests.

RTK Setup🔗

I am using RTK2go.com as my NTRIP caster server / an RTK correction service, as it's free and has decent coverage of the UK (and quite a few other countries, I should add).

To find a local base station, navigate to http://monitor.use-snip.com/?hostUrl=rtk2go.com&port=2101 and then click 'View all' on the Map column. A map will be displayed ­— zoom in and find a nearby station, then make a note of the station name.

From what I have read, if there is no station within c.20km then you are out of luck (you can try and find another NTRIP caster that might cover your area, or set up your own by building a base station).

Once you've found a station to subscribe to, follow the official OpenMower guide on how to configure this.