Project 'Landlord'

Open source firmware for Worx Landroid robotic mower.

Similar projects worth following
Reverse engineering and develop a new and open source firmware for the Worx Landroid robotic mower family. Add new features. Smarter algoritm. Add GPS for smarter navigation.

DB275 models uses a NXP LPC1768 arm Cortex-m3.
DB504 models are very similar to DB275 but uses a NXP LPC1788 arm cortex-m3.
DB297 models - please share images!

IC's on DB275-10:

IC's on DB504-03:

The onboard bootloader checks USB after memory stick after firmware file and flashes the its contents.
Custom firmware does not overwrite the bootloader, so it is possible to revert to original firmware.
DB275 firmware start at 0x9000
DB504 firmware start at 0x10000

Source code:

To setup build enviroment follow How to install the ARM toolchain
Also possible to use KEIL-MDK.

Please feel free to donate money.
I currently own thrr landdroid's. Two 791e 2015, 794e 2014 - with DB275 motherboard and one wg791e.1 (2016) with DB504.

Bitcoin: 3FnkdzXjkyeHK5o5H3wzM9jDzw52Q3GEog

  • 1 × Brave owner In case the mower starts chasing your pets and begins to burn under your car!
  • 1 × Worx Landroid
  • 1 × USB stick generic for flashing firmware - FAT32 formatted

  • Battery

    Daniel Wiegert07/21/2016 at 20:50 3 comments

    There have been some discussion over batteries and charging down in the comments. I'll publish images of inside of battery.

    The tabs are solders After case is screwed together. So to split it you need to cut the connecting tabs on one side...

    Cells are Sony 18650 1900mAh. Thanks to Jan B!

  • Unpacker for firmware .pck

    Daniel Wiegert07/19/2016 at 19:09 4 comments

    Warning etc etc, use with caution... Might contain bugs :)

    import sys
    if len(sys.argv) <2:
      print( "usage:" )
      print("  " + sys.argv[0] + " [.PCK file]", "[Folder-prefix]" )
      print( "  " )
    import os
    from binascii import crc32
    from struct import unpack
    #get unpack file
    src_file_path = sys.argv[1]
    #read file length
    src_file_size = os.path.getsize(src_file_path)
    #read file
    b = bytearray(open(src_file_path, 'rb').read())
    # crude bytearray to String converter
    def toStr(b):
      return "".join(["%c"%i for i in b]).strip("\x00")
    # convert 4 bytes to int
    def word2int(w):
      return unpack("<I", w)[0]
    # crude filetable parser
    def getHeader(b, datastart):
      beginstart=b.find(63) #"?"
      filename = toStr(b[0:beginstart]).replace("\\","/")
      beginlength=b.find(63,beginstart) #"?"
      start = int(b[beginstart:beginlength],16) + datastart + 4
      length = int(b[beginlength:beginlength+10],16)
      return {
        "filename": filename,
        "start" : start,
        "length" : length,
    #crude way to create nonexisting directories
    def checkCreateDir(filename):
      if not os.path.exists(os.path.dirname(filename)):
        except OSError as exc: # Guard against race condition
            if exc.errno != errno.EEXIST:
    def save(filename, data):
      checkCreateDir(prefix + "/" + filename) #create missing directories
      print ("writing %s\t (%d bytes)"%(filename,len(data)))
      open(prefix + "/" + filename, 'wb').write(data)
    ## Start decoding
    print("Unknown byte 0:\t"+ str(b[0]))
    print("Unknown byte 1:\t"+ str(b[1]))
    print("Unknown byte 2:\t"+ str(b[2]))
    print("Unknown byte 3:\t"+ str(b[3]))
    prefix = sys.argv[2] if len(sys.argv)>=3 else "."
    headerstart_token = bytearray((int(62), int(0x0d), int(0x0a)))
    headerstart = b.find(headerstart_token,0)+3
    datastart_token = bytearray((int(0x0d), int(0x0a), int(0x0d), int(0x0a)))
    datastart = b.find(datastart_token,0)
    print("header end: \t"+ str(datastart))
    nHeaders = b.count(int(13),4,datastart)
    print("# files \t: "+str(nHeaders))
    # crude way to parse the directory table
    files = []
    print ("found %i files\n"%nHeaders)
    token = bytearray((int(0x0d), int(0x0a)))
    for i in range(nHeaders):
      h = getHeader(b[pos:pos2], datastart)
      pos = int(pos2)+2
    for h in files:
      bFile = b[h["start"]:h["start"]+h["length"]]
    #write stripped file

  • Help identifying component (solved)

    Daniel Wiegert07/06/2016 at 08:24 4 comments

    The right one, its a ST L3GD20H, Thanks Ajlitt!

    Left is MMA8452Q, 3-axis, 12-bit/8-bit digital accelerometer

  • Pinout DB504

    Daniel Wiegert06/27/2016 at 19:57 3 comments

  • Different motherboards.

    Daniel Wiegert06/20/2016 at 21:16 2 comments

    I've been working on mapping 2016 year model of worx, they use DB504 motherboard. Usually .pck-firmware, its a container and the start is plain-text. It's possible to do a splitter for that but I use dd to copy out the firmware.

    DB504 probably use LPC1788. I've been looking on some io's on a picture I've recieved and it seams to be correct. (not possible to read chip text without removing the conformal coating)

    My guess so far is U10 = spi flash. U11 + U12 compass / accelerometer / gyroscope. Yellow tape protects JTAG from the coating

    Display and Keyboard are the same as previous models. Wire sensor uses a daughter board:

    Should we assume they still uses LPC and that this might be an LPC11U6x?

    Wifi module are supplied from, uses SPI (SSP0) communication. easy to mod! :)

    ( looks like a suspect...)

    So far I've been developing and reversing DB275 (2015 WG790/791/794) It seams all 2016 has DB504.

    WG796e (2015) uses DB297 which I haven't seen yet. So if any one wants to send in pictures of that motherboard it would be very appreciated!

    I don't know much about earlier versions.



  • Some / Slow progress

    Daniel Wiegert06/07/2016 at 09:05 0 comments

    I had a small break, I let the mowers do their job outside! :)

    I've figured out the boundary wire and how it works. I finally got the idea to use the USB d+ and d- (p0.29 + p0.30) and output of p0.7 - p0.10 and measure with oscilloscope.. :) (4 wire inputs -> raising and falling each on pos / neg)

    The blue is probe directly on the boundary wire.

    So if negative measurement is before or after the positive, then you know if you are inside or outside wire.

    p0.21 select amplification or something, you can detect if you are within 1 meter of the wire or not.

    p0.22 probably selects between left and right sensor.

    And if you are close to the sensors you get some weird artifacts in the measurement, longer pulse, and even more than one pulse. It seams this is following a pattern and it might be possible to user and detect the distance to the wire at 0cm, 10cm, 20cm and 100cm.

    And the last one, wire right on top of the sensor.

  • Original firmware?

    Daniel Wiegert05/06/2016 at 12:32 4 comments

    I could use some owners help. I would like to have your firmware-files!
    I need to see how big of a difference it is between models.

    Please contact me!

    Thanks all!

  • Pinout!

    Daniel Wiegert05/03/2016 at 08:14 0 comments

    95% of the pin-out is finished. There are some questions still to be answered. Also the models with WIFI, How do they look inside? I would love to see some pictures of the main board in that one!

    One guess would be that the un-populated IC nead RTC battery is a SPI flash but not confirmed.

    Next important step would be to understand the how the wire sensor works.

    P0.0  GPIO Output, Motor Left, Select Forward/Reverse
    P0.1  GPIO Input, Dip switch 3
    P0.2  ADC6, Motor Right, Current ?? -> Need more investigation
    P0.3  ADC7, Motor Left, Current ?? -> Need more investigation
    P0.4 + P0.5 GPIO Output, Selector ADC4 input -> accelerometer LIS352AR pin S0, S1.
      0    0 - ADC4 = X
      0    1 - ADC4 = Y
      1    0 - ADC4 = Z
      1    1 - ADC4 = aux (temp batt)
    P0.6  GPIO Output, Speaker High volume
    P0.7  GPIO Input, ExtInt3 Raising edge - Wire sensor -> Need more investigation
    P0.8  GPIO Input, ExtInt3 Falling edge - Wire sensor -> Need more investigation
    P0.9  GPIO Input, ExtInt3 Raising edge - Wire sensor -> Need more investigation
    P0.10 GPIO Input, ExtInt3 Falling edge - Wire sensor -> Need more investigation
    P0.11 GPIO Output, Enable Charging (in charger, after P1.23 is set to 1)
    P0.15 SPI SCLK, LCD
    P0.16 SPI CSB, LCD
    P0.17 SPI MISO, LCD <- Unused? NC?
    P0.18 SPI SDA, LCD
    P0.19 SPI RSTB, LCD
    P0.20 SPI A0, LCD
    P0.21 GPIO OUTPUT, Selector Guide Wire sensor, Range / Amplification
    P0.22 GPIO OUTPUT, Selector Guide Wire sensor, Unknown function -> Need more investigation
    P0.23 ADC0, Charge current? (Or Charge voltage, Only >0 then charging) 
    P0.24 ADC1, Voltage Battery
    P0.25 ADC2, Accelerometer, Sideways (X/Y)
    P0.26 ADC3, Accelerometer, Forward (X/Y)
    P0.27 GPIO Input, Motor Rotor, Rotation tick? -> Need more investigation
    P0.28 GPIO Input, Charger state? Battery full? -> Need more investigation
    P0.29 USB D+, Maybe used for softUART for GPS / External mcu communication
    P0.30 USB D-, Maybe used for softUART for GPS / External mcu communication
    P1.0  GPIO Input/Output, Keypad matrix Row1
    P1.1  GPIO Input/Output, Keypad matrix Row2
    P1.4  GPIO Input/Output, Keypad matrix Row3
    P1.8  GPIO Input/Output, Keypad matrix Row4
    P1.9  GPIO Input/Output, Keypad matrix Col1
    P1.10 GPIO Input/Output, Keypad matrix Col2
    P1.14 GPIO Input/Output, Keypad matrix Col3
    P1.15 GPIO Input/Output, Keypad matrix Col4
    P1.16 GPIO Input, Hall Sensor, Lifted
    P1.17 GPIO Input, STOP Button
    P1.18 Unknown, NC?
    P1.19 Unknown, NC?
    P1.20 GPIO Output, LCD Backlight ON, PWM1.2 can be used here if motors are inactive. (Pulsing screen then charging)
    P1.21 GPIO Input, High then connected to charger and charger is RED
    P1.22 Unknown, NC? USB Power on??
    P1.23 GPIO Output, Initiate Charger, Keeps charger in RED mode. if low charger shows green light.
    P1.24 GPIO Output, Speaker Low volume
    P1.25 GPIO Output, Keep high for PCB Power on.
    P1.26 Unknown, NC? Sensor?
    P1.27 Unknown, NC? Sensor?
    P1.28 GPIO Input, Power key, Normal HIGH
    P1.29 GPIO Input, Sensor, Rain
    P1.30 ADC4, Output from LIS352AR, Selected by P0.4 + P0.5
    P1.31 ADC5, Motor Rotor, Current ?? -> Need more investigation
    P2.0  PWM1.1, Motor Right speed
    P2.1  PWM1.2, Motor Left speed
    P2.2  PWM1.3, Motor Rotor speed
    P2.3  GPIO Input, Dip switch 2
    P2.4  GPIO Output, Motor Right, Enable/Start | Disable
    P2.5  GPIO Output, Motor Right, Brake ON/OFF
    P2.6  GPIO Output, Motor Right, Select Forward/Reverse
    P2.7  GPIO Input, Dip switch 3
    P2.8  GPIO Output, Motor Left, Brake ON/OFF
    P2.9  GPIO Output, Motor Left, Enable/Start | Disable
    P2.10 GPIO Input, EInt0??, Sens Motor? Error?  -> Need more investigation
    P2.11 GPIO Input, EInt1 Edge, Motor Right Rotation tick
    P2.12 GPIO Input, EInt2 Edge, Motor Left Rotation tick
    P2.13 GPIO Output, Motor Rotor, Enable/Start | Disable
    P3.25 GPIO Output, Motor Rotor, Brake ON/OFF
    P3.26 GPIO Output, Motor Rotor, Select Forward/Reverse
    P4.28 GPIO Input, Hall Sensor, Cover
    P4.29 GPIO Input, Hall Sensor, Front

  • 327 35AR?

    Daniel Wiegert05/02/2016 at 16:03 0 comments

    I think I've solved the mystery!
    Not exacly the same, but I would guess its very similar to this LIS352AR

    Package is the same, same 3 analog outputs.

  • Guide Wire...

    Daniel Wiegert05/02/2016 at 11:59 0 comments

    I am trying to figure out how the guide wire sensors work.

    There are 4 inputs (digital), P0.7, P0.8, 0.9, P0.10) that the original firmware has put on extint3, two trigger on Falling edge, the other two on Raising edge. Probably and each on each sensor.

    There are also two control pins (digital).
    One is for Range, or Amplification, P0.21.
    If I'm close I get triggers regardless of p0.21 state, and then I am far away from guide wire I only get triggers then P0.21 is High.

    The other control pin is so far unknown, P0.22. It changes the output on P0.7-0.10. I cannot figure out how this works yet.

    The Falling edge's also show if the mower is looking perpendicular to the guide wire; P0.8, P0.10 is high.
    If the mower looks 'Downrange', P0.10 is high, P0.8 low.
    If the mower looks 'forward', the opposite, P0.8 High, P0.10 Low.

    So, any suggestions? My next move is probobly to try to make a logfile of all the triggers, there are around 10-20 per second.

View all 19 project logs

Enjoy this project?



Jonathan Smårs wrote 06/01/2017 at 14:45 point

I've been reading up on this project and it looks really exciting! I'm wondering how far you have come with this? Is it possible to interface directly with the steering of the mower? If I could access forward/back/turning directly, I think I might build a DGPS or similar location system to get much better cutting.

Also, is there anyone experimenting with alternative batteries to get faster charge rates, giving way more up time and thus larger cutting areas?

  Are you sure? yes | no

Ampeater wrote 11/30/2017 at 00:03 point

There is enough surface area on the mower that you can run straight from solar. Mow continuously as long as the sun is out

  Are you sure? yes | no

Kresten wrote 04/24/2017 at 23:26 point

Great tear-down! 

I recently purchased a Landroid S 500, and found my self wondering if there was anyway of getting it to be a bit smarter, so I found myself here :) 

One improvement that would be nice was a better "return home" function. Mine just follows the boundary wire all the way to the charging station (through all zones)... 

My initial thoughts was that it would be nice if it was possible to add "shortcuts" to the boundary wire - maybe in the form of rfid tags. The mower could be programmed to react to each tag by making x degree turn, in-order to point it in a direction in witch it would reach home faster :)

do all Landroid's return home in this way or do som have a guide wire like the Husqvarna?

  Are you sure? yes | no

Mark Holbrook wrote 04/22/2017 at 02:21 point

This is great work! I have a parallel interest in that I'd like to identify what the on board processor's I/O port functions are so that I can cut signal output traces and replace the processor with my own CPU/WiFi/GPS. Has anyone identified the I/O line functions of the board's processor? Don't own a Landroid yet but this looks like it has lots of potential. (Edit) Great! I found your mapping. Superb! 

  Are you sure? yes | no

David wrote 03/31/2017 at 17:47 point

How is the new model SO500i differring from the previous models? It comes with Wifi, hence it might be a good idea to check backward compatibility. Has anyone tried this one?

  Are you sure? yes | no

Mark Swift wrote 03/22/2017 at 08:05 point

I'd love to hear from anyone that has  successfuly added wifi. I'm happy to order the development board if that's the correct one?

  Are you sure? yes | no

chickey wrote 05/19/2017 at 11:45 point

Same here, finally have my 794E up and running so wifi would be an added bonus.

  Are you sure? yes | no

Rico wrote 03/07/2017 at 10:54 point

Hello, Is  there any new clue about which wifi module can be solder and if it works ?

  Are you sure? yes | no

jongscx wrote 03/01/2017 at 17:04 point

In regards to positioning,  there is an evaluation board available from DigiKey for Decawave boards.  They'll allow you to setup a fixed constellation and have a beacon on your mower to do ranging/positioning.  Just FYI.

  Are you sure? yes | no

forgotten wrote 02/12/2017 at 20:29 point
Examined the contacts of the (nonexisting) Wifi with an analyzer and got these results.
At this time I have no clue what to do for Wifi on my non WiFi model.

  Are you sure? yes | no

Daniel Wiegert wrote 02/12/2017 at 21:52 point

Sweet, I think I found a while back what type of module they use and the specs for the communication, I have no idea where I saved that data but if I find it I'll post it :)

  Are you sure? yes | no

forgotten wrote 02/05/2017 at 20:59 point

Played with the dip-switch of my 754/756: 4 switches 

I changed the switches (binary code) and then powered the mower on:

1 - MG 793 E.1
2- WG 754 E
4-WG 792 e.1
6-WG 794
8-WG 790 e.1
9-WG 756 E
10-WG 755 E
12-WG 793 E1
14-MG 790 E

all other codes: "model unknown"

So there must exist a different method to switch to models with wifi :-(

  Are you sure? yes | no

Dony.portillo wrote 01/02/2017 at 23:02 point

Hey guys I just bought the WG794 without wifi, I'm wondering if anyone has been able to get the WiFi working on this unit?  Second I spoke with Works and I told that spring 2017 they should have the WiFi avalible in the US. Also they can't ship to CA. If anyone can help with the the WiFi that would be great, if not I plan on returning it and waiting. Thanks guys.

  Are you sure? yes | no

chickey wrote 10/13/2016 at 12:48 point

I'm trying to resurrect a 794E that i purchased and I've been able to charge it manually but i've just taken delivery of a new base station for it.  I need to source a charger though so wanted to ask should it be 24v or 28v?  Also the connector looks like there is no polarity on it as it seems reversible, can anyone confirm?  Lastly with the boundary wire will any boundary wire work?

  Are you sure? yes | no

Mark Swift wrote 09/01/2016 at 10:14 point

I'm looking to integrate my non Wifi WG790E with my home automation system... Does anyone know if it's possible to fit the Wifi module, failing that, tap into the USB to send commands to the unit?

  Are you sure? yes | no

Cosworth32 wrote 08/31/2016 at 06:16 point

Interesting project. I have a 796E.1 without wifi. I can see redpine is delivering the wifi modules, but which one exactly. From reading the comments, upgrading to wifi would required 1 wifi module and a change of dip switch settings under the grey plastic (set to 0001?). 

  Are you sure? yes | no

Daniel Wiegert wrote 08/31/2016 at 08:44 point

Something in that order, yes. I Haven't looked much into adding wifi onto existing models. Maybe there are more of you out there that wants to try to find out which module to get :)

  Are you sure? yes | no

anton wrote 09/18/2017 at 11:40 point

Did you try any of the modules?

  Are you sure? yes | no

Juicie wrote 08/07/2016 at 09:00 point

I'm now the proud owner of a WG796E.1 and want to update the software to V2.21. It sees the USB drive but the mower doesn't seem to find the update file and shows the PIN screen after some seconds without performing a update. I have correctly formated the USB drive to FAT32 and unzipped the firmware zip file. Does any one of you have any simular experiences. 

  Are you sure? yes | no

Juicie wrote 08/07/2016 at 09:29 point

Problem solved. A different (smaller) USB drive did the trick.

  Are you sure? yes | no

Jacko wrote 08/03/2016 at 09:05 point

Will this firmware work safely with WG790E? I am running original latest firmware (ver 0.94) and It very often happen that when charging it simply shout down in unexpected manner, so to charge I have run it again providing pin code. I believe this is some firmware issue. Probably when battery temp is to high it simply shouts down - in my opinion it should simply wait until batteries cools down and then should start charging cycle again.

The behavior is so annoying that think I will swap the firmware to yours. 

BTW. I am .NET developer so maybe I can help somehow in a future

  Are you sure? yes | no

Daniel Wiegert wrote 08/03/2016 at 10:32 point

Firmware is not a replacement just yet .. :) So don't bother at the moment!

  Are you sure? yes | no

Jan B wrote 07/28/2016 at 20:53 point

Just bought a new WG796e.1 and a broken wg794  to play with. Unfortunately the wg794 was more damaged than I thought, motherboard was totally busted so I'll have to look for another one for testing. But battery and motors were OK. Since there has been some discussions regarding the battery I took the wg794 battery apart and there are seven Sony 18650 1900mAh cells in it. 

  Are you sure? yes | no

Daniel Wiegert wrote 07/28/2016 at 21:00 point

Too bad about the motherboard! :( Could you take some images? I bought a lightning struck wg791e.1 and I managed to repair it after some checking around. Some components were obvious (cracks) and some were harder to find, but over all, it was the power management part of the system so the CPU started if putting 3.3v direcly to it.
Regarding batteries.. 1900mAh.. Wow! Thats not much.. I think I'll upgrade mine asap ^^ 

  Are you sure? yes | no

Jan B wrote 07/28/2016 at 21:17 point

Well, this motherboard is beyond repair i'm afraid. It has been subjected to severe mechanical damage. The board was bent just under the processor so bad that the processor had popped off the board...

  Are you sure? yes | no

Daniel Wiegert wrote 07/28/2016 at 21:38 point


  Are you sure? yes | no

Juicie wrote 07/26/2016 at 20:56 point

After reading this project I'm planning on buying a Landriod M1000i (WG796E.1). I first planned to go for a Bosch Indego connect but was sold by the "open" nature of the Landroid. Keep up the good work. I'm a software developer/tester myself so I will try to make time to help, if needed, as soon as I got my Landroid.

  Are you sure? yes | no

Daniel Wiegert wrote 07/27/2016 at 06:41 point

Thanks! Always appreciated with help! :)

  Are you sure? yes | no

Matevz Gacnik wrote 07/20/2016 at 07:18 point

Regarding batteries and current (amps) (Worx Landroid WG796E.1): There seem to be seven (7) 18650 cells inside with 2 mAh capacity, serially linked. Exchanging them with good 3400+ mAh Panasonic/Sanyo/LG (NCR18650B, NCR18650GA, INR18650MJ1) cells should not be a problem.

Since the mower uses roughly 1.2 Ah of capacity per session (goes back with ~ 40% battery) and mows 1.5 hours, we could believe currents are in the range of 0.8 amps. This can be handled by any reputable 18650 cell.

Exchanging the cells within the battery with 3400+ mAh cells should give us ~2.5 hours of mowing per charge. As it seems the charger is quite gentle on the cells, kicking in at 24V and charging up to 28.7V, which gives us 3.42V - 4.1V cell voltage cycle, which is close to ideal for 18650 charging. This should, in theory, allow us to use the machine for at least 3 years without much impact on the cells (providing battery is stored appropriately during the winter). The only thing I'm worried about is the constant high temperatures that the cells are exposed to - they heat up to more than 40 C during summer.

I'm definitely changing the cells once the current battery goes belly up. If anyone opens the battery, detailed pictures would be great.

Greetings from Slovenia.

P.S. This is all based on the premise there are 7 cells. :) If there are 8, things change. My battery is quite new, so I'm opening it once it starts deteriorating.

  Are you sure? yes | no

Robert wrote 07/21/2016 at 13:04 point

Do you have any insights on the charger circuitry? I still do not feel comfortable starting the charging cycle with max current and also I suppose because of the internal resistance we should lower the current in the end to really load to whatever voltage we define for cut-off (ant not cut-off minus (max-current times internal resistance)).

So we would need the scaling of the "current-ADC" and an idea if we can PWM the charge-enable. I needed my worx being back assembled, so I can't figure out if the original firmware is PWMing the charge enable pin.

  Are you sure? yes | no

Matevz Gacnik wrote 07/21/2016 at 13:09 point

No. My hardware skills are basic - software guy. What I see from available data is, that WG796E.1 charges at ~1.4 amps until it gets to 28V, then slowly reduces amperage to ~0.8 amps to charge up to 28.7V. This is from what the machine is reporting over its REST interface.

  Are you sure? yes | no

Daniel Wiegert wrote 07/21/2016 at 19:51 point

1.4A is 0.7 C if battery only is 2000mAh, I would suppose they are at least 2200 and probably 2300mAh. If 2200 0.64C . Li Ion should be charged with C between 0.5 and 1. And this is right in the middle. So I don't see any problems with charging at 1.4A. I have not seen any PWM in code regarding charge pin but I'll take another look.
Temperature monitoring is very important though. I would like to test PWM charging to be easier to the battery in warm days.

edit; If its high current batteries, they are usually 2400mAh and can be charged and discharged with 1C.

One important feature would be to wait after entering charger for the battery to cool down before charging too.

  Are you sure? yes | no

Matevz Gacnik wrote 07/22/2016 at 11:47 point

Daniel, based on pictures I've seen till now, I think they might be Samsung INR 18650-R20 or INR 18650-20Q cells, 2000 mAh.

Waiting eagerly for you to post the inside pictures. There should be a clear indication on specific cells if they are.

Edit: Not true. Seem to be Sony US18650VC3, 1900 mAh only. :/

  Are you sure? yes | no

Daniel Wiegert wrote 07/22/2016 at 18:08 point

I wont crack open my battery just yet, Maybe then the season is over :) (or if battery dies before that..)

  Are you sure? yes | no

bengtsson.j wrote 08/01/2016 at 17:51 point

I hade some issues when the battery got too depleted. When I put the mower in the charging station the Emergency Charging would come up and disappear. One time it helped reinsert the battery but not always. 

So I put two nails in the nose of the mower and hooked it up to my lab power supply. When it starts charging in emergency it pulse high current, I had current limit set to about 4A. When it did that in the charging station the voltage dropped to zero, so I guess the charger powered down due to high current. 

After some time it started charging normal when hooked up to the lab PS. I had lowered the current limit to about 2.5A and that is what it was charging the battery with. So I guess the power supply to the charging station sets the charging current. 

  Are you sure? yes | no

Robert wrote 07/06/2016 at 06:45 point


I just pushed some commits to - I tried to make use of the queues, events and other FreeRTOS stuff to somehow create (run-time-)independent modules for the ADC, the power managment and motor control. Nevertheless, this is still work in progress as in the long-term, I would like to have a central event queue instead of a queue for each module. Therefore, a central event dispatcher will be needed. This would allow us to work more independently on each module.


- set up some automatic mux-switching so the ADC-task reads all available analog values

- scale the accelerometer readings

- implemented automatic shutdown once the batt falls below 23.7V in order to protect it from permanent damage through deep discharge

All status messages are output to the serial port using P0.15 and P0.16 from the display connector - therefore you need to unconnect the display. I see this step as neccessary as I want to connect the mower to a Linux plattform running ROS through a serial MAVLINK connection.

Yesterday I tried the charging and it worked. Right now, I supervise only battery voltage (<28.7V) and temperature (<50°C). The raw ADC readings for battery current were as high as 3000!

Therefore three questions:

- How to scale "battery current" ADC readings?

- P1.23 could also be set to be a PWM out - any idea if the original firmware might control battery current by PWM'ing this pin?

- Without charging, I still read a value of 10-12 at the battery current ADC. Is this a measurement error or might the circuit be able to measure current bi-directional and this is the actual current drain from the battery in normal mode?

Best regards,


  Are you sure? yes | no

Daniel Wiegert wrote 07/06/2016 at 07:37 point


Nice work!

You could also use USB pin's as tx/rx/whatever, and leave lcd connected.
I haven't coded much at all the last couple of weeks. I did get a hold of an broken 791e.1  (2015 model, db504 motherboard) and started mapping the pin's out. It is very similar and program should be very easy to adapt (only include different define-files, one for lpc1768 and one for 1788).

I haven't tried pwm on p1.23. Have you connected a current-meter over the battery?
Raw adc for current Might be the in mA at battery terminal. (not the same as charge-pins, other voltages)

lMotorLeftCurrent etc might be measured speed and not current, this is based on db504 but I have no idea yet, current would seam more logical because of analog value. This will need to be determined.

I think circuit measure is current both directions.

  Are you sure? yes | no

Daniel Wiegert wrote 07/06/2016 at 07:41 point

Btw, did this work for you?? :o

void u8g_MicroDelay(void){
  vTaskDelay(1 / portTICK_PERIOD_MS);

portTICK_PERIOD_MS = 1ms (0.001) and lcd wants delay in micro µs (0.000001s) That's why I used a timer..

  Are you sure? yes | no

Daniel Wiegert wrote 07/06/2016 at 10:37 point

I made some changes too that you could test. It's for making code compatible with both KEIL and GCC.

  Are you sure? yes | no

Daniel Wiegert wrote 07/06/2016 at 17:44 point

I haven't looked into it, but every second batt debug shows:

Charge I: 1475mA
Battery U: 31.4V
Battery T: 4143380315.4294967295°C

the other one's are ok, 31.4v (adc 4095, I'm running on a development board.)

  Are you sure? yes | no

Robert wrote 07/06/2016 at 18:13 point

the first two are misreading from the accelerometer. the other ones are wrong measurements as well. The last one is probably an erroneous print out of -10°C, see print-func for negative accelerometer value to fix that if you like.

  Are you sure? yes | no

Daniel Wiegert wrote 07/06/2016 at 18:22 point

Thanks, I was just about to delete my message, I realized what I did wrong.. :) (me)

  Are you sure? yes | no

forgotten wrote 06/25/2016 at 19:16 point

Has anybody a Landroid with DB504-motherboard and wifi/wlan? I´m interested in the dip-switch-settings under the rubber. Why? Maybe wifi is easily upgradable. I´ve found that at least the firmware for 796e.1 and for 754e/756e the same , bit by bit. So the difference must be on the motherboard. 

And in the firmware you can find hints for


  Are you sure? yes | no

Daniel Wiegert wrote 06/25/2016 at 20:13 point

There is a dip switch under gray rubber. Wifi module are supplied from, uses SPI (SSP0) communication. All db504 runs same firmware. only dip switch setting that differs (and hardware parts, like wifi)

  Are you sure? yes | no

Matevz Gacnik wrote 06/26/2016 at 09:12 point

My WG796E.1 dip switches are all set to false, according to /jsonDebug.cgi, which spews out JSON debug states. Here's mine:

  "landroid": {
    "state": "home",
    "boardTemperature": 33.3,
    "distance": -6,
    "wheelLeftDistance": -4,
    "wheelRightDistance": -4,
    "angle": 0,
    "rainSensor": 3867,
    "aree": {
      "index": 0,
      "vet": [
    "battery": {
      "percentage": 100,
      "voltage": 28.08,
      "temperature": 26.8,
      "ntcResistance": 9419
    "batteryCharger": {
      "state": "idle",
      "chargeCurrent": 3.22
    "accelerometer": {
      "gravity": [
      "angle": [
    "gyroscope": {
      "angularSpeed": [
      "angle": [
    "motor": [
        "speed": 0,
        "maxSpeed": 51,
        "speedReduction": 0,
        "rpm": 0,
        "feedbackError": 0,
        "acceleration": 100,
        "deceleration": 220,
        "fault": false
        "speed": 0,
        "maxSpeed": 51,
        "speedReduction": 0,
        "rpm": 0,
        "feedbackError": 0,
        "acceleration": 100,
        "deceleration": 220,
        "fault": false
        "speed": 0,
        "maxSpeed": 92,
        "speedReduction": 0,
        "rpm": 0,
        "feedbackError": 0,
        "acceleration": 100,
        "deceleration": 250,
        "fault": false
    "guide": {
      "straightSpeed": 0,
      "turningSpeed": 0,
      "straightDistanceError": 1,
      "straightCorrection": 0
  "id": {
    "stop1": false,
    "stop2": false,
    "lift1": false,
    "lift2": false,
    "trappedLeft": false,
    "trappedRight": false,
    "door1": false,
    "door2": false
  "dipSw": {
    "sw1": false,
    "sw2": false,
    "sw3": false,
    "sw4": false
  "wireSensor": {
    "fwVer": 0.7,
    "left": "inside",
    "right": "inside"

Didn't open the machine, though.

  Are you sure? yes | no

Daniel Wiegert wrote 06/27/2016 at 20:01 point

If I didn't mess them up then I removed the silicone / rubber 791e1 has dip: 0,0,0,1 (sw4 = 1). Good to know about 0,0,0,0!

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates