Neato XV rev113 board - ESP8266?

News and information about the Neato XV-11 Robotic Vacuum. All discussion and troubleshooting questions go here.

Neato XV rev113 board - ESP8266?

Postby willman3755 » March 25th, 2018, 11:36 am

Hello all,

New user here. First, a bit about myself: I'm an (electrical) engineering student who is a long-time electronics and programming hobbyist, and who recently just bought a Neato XV-11 used on eBay ($40!). Anyhow, the XV-11 had both wheel tensioner springs missing, with the plastic tabs on both motors and the chassis broken off (so all four tabs are broken). I have it temporarily working on my (very level) wooden floor with double-sided tape between the wheel assemblies and the frame, pushing the wheels out to exactly the right height for my floor. I've bought springs on eBay, and will fix it properly soon using eye-hooks. It also had other issues that I have since resolved.

Anyway, I really want to be able to remotely monitor and start a cleaning cycle, via my Android phone. Really all I want the following features:

1. A "clean now" button that can remotely start a cleaning cycle.
2. Push notification when it leaves the base successfully.
3. Push notification when it docks successfully.

Software-wise, all of the above is decently straightforward: I can use the PushBullet API for the push notifications, and I can sense 2 and 3 by polling the "ExtPwrPresent", and sending a notification when it switches from 0 to 1 and 1 to 0 accordingly. And of course, have a webserver that serves a webpage with a single "clean now!" button, that when clicked send the "Clean" command. For all of the above, an ESP8266 would be perfect. I can run all the code directly on it, and then use port-forwarding on my router to let me access its web page from anywhere in the world.

But the hardware side of things seems somewhat more complicated. I see people have been using a Spark device in USB-host mode to talk to the XV-11's USB serial port. That is somewhat complex. I also see that people have been using a Sparkfun BlueSMiRF to talk directly to the main board (older "Cruz" boards only - what I have) (http://www.robotreviews.com/chat/viewtopic.php?f=4&t=15349).

Two questions about accessing the "maintenance port" via this method:
1. Is this identical command-wise as plugging into the USB port and using the terminal there?
2. What is VCC and the logic level on this board? 3.3v or 5v? The ESP8266 is a 3.3V system, and is NOT 5V tolerant. If the board is running on 5V, then I'll need a 3.3V regulator and 3.3V-5V logic level converter.
3. What is the baud rate of this serial connection?

Thanks for any help with the above questions, and/or any other things I should know.
willman3755
 
Posts: 3
Joined: March 25th, 2018, 10:58 am

Re: Neato XV rev113 board - ESP8266?

Postby glnc222 » March 26th, 2018, 10:56 pm

See thread http://www.robotreviews.com/chat/viewtopic.php?f=20&t=19972 on using the ESP8266 on the serial connector in Botvac (revived from the newer XV 64 boards eliminating the original Rev. 113).
The command language is the same over whatever port.
There is no single voltage on the boards -- the sensors all run on 5v, but the microcontroller cpu may run lower, with regulators on board (a classic defect is the filter capacitor C10 on the memory power supply slowing power-start-up so the memory is initially dead when the cpu starts, putting the CPU into software update mode seemingly dead, but actually just waiting for flashing data over USB).
Motor drive power is 15v and switched on with command to enter Test Mode (or when cleaning) -- motors turn only under PWM control of RPM. The vacuum fan supply is included and supports a variable substantial load, a handy source for a regulator or buck voltage converter switched on only when the unit is cleaning (the capacity of the 5v supply system is not known, so maybe avoid any substantial additions). The Lidar has its own motor control, a self contained, serial interfaced unit sometimes used outside of Neato's (not sold separately by the company). The Lidar power supply is 5v I think -- easily checked with meter.
The Bluetooth interface project should show what voltages are on that serial header on the Rev113 Cruz XV board.
A number of projects have interfaced WiFi to the USB port using small router devices. See the Mods & Repairs list top of forum for links.

To tap the main 15v power supply involves more than just the battery, as the system runs on the dock power when on the dock, and can be charging the battery etc. This circuit has been traced, links in the Mods & Repairs list.
Mosfet switches and diodes redirect the power in the different operating states.

Special condition of serial com: the firmware will issue a request to disconnect the com cable to allow the unit to move when starting to clean (as opposed to static separate motor ops in Test Mode). The serial connection -- at least the USB -- must be disconnected (sometimes with custom firmware in the interface component used), until cleaning starts -- then com can be resumed.

For more effective use of the text command language the Neato Control program (separate thread) provides a graphical interface and continuous polling of sensors, and graphic display of the lidar scan, data logging etc.
The command language manual is at the company website, links top of the forum and in Mods & repairs thread.
glnc222
Robot Master
 
Posts: 4968
Joined: January 23rd, 2012, 9:19 pm
Location: North Carolina, U.S.

Re: Neato XV rev113 board - ESP8266?

Postby valamilamasag » March 28th, 2018, 12:13 pm

I only have a single botvac (not an XV) as a reference, but here we go:
willman3755 wrote:1. Is this identical command-wise as plugging into the USB port and using the terminal there?

Actually, the serial port has a few additional "commands". You can access the bootstrap loader/bootloader from there. But only do that if you don’t mind making a brick :). And keep in mind that if it goes to sleep it will also disable the port. Just send a few random commands and it will be woken up (not by the commands, but by the activity on the port).
You might need to send “clean” twice (after waking up the robot). The first one will only “activate” the robot: the LCD will turn on, but won’t start cleaning. (There is multiple sleep modes probably.) At least this is what the botvac does. It will return something like "cleaning mode 1 started".
willman3755 wrote:2. What is VCC and the logic level on this board? 3.3v or 5v?

Just measure it :) . On the botvac both the power supply that is there on the connector (always on) and the controllers logic level is 3.3V. Since the TX pin is active-low the IO voltage should be there if the CPU is running. The ESP can be powered by the 3v3 power rail on the serial connector.
Don’t forget to add a few hundred ohm resistor in series with the tx/rx pins for protection/EMC reasons even if the XV is 3.3V logic level.
If it's 5V, add an LDO for the ESP and increase the series resistors mentioned above to 10k. The clamping diodes inside the ESP will do the rest.
willman3755 wrote:3. What is the baud rate of this serial connection?

115200
valamilamasag
 
Posts: 18
Joined: March 19th, 2018, 5:31 pm
Location: Hungary

Re: Neato XV rev113 board - ESP8266?

Postby willman3755 » March 31st, 2018, 4:42 pm

Thanks for all the info.

One additional question: can you wake the robot from the serial port?
If not, then I'll just ping it every once in a while to keep it awake (and turn the LCD backlight and LED off via TestMode commands so as not to annoy me while I'm sleeping). I'll ping it with something stupid, like turning test mode on and then off. This, I would think, done every few minutes, would keep it awake.

I've been designing the UI (raw HTML with some javascript to make it dynamic) and writing the data parsing code over the past few days, and once I get the ESP I'll wire it up!

If it works super well I'm planning on making a PCB so that its plug(solder?)-and-play for others. Attached is a preview of the UI (nothing super exciting).
Attachments
neato web console preview.png
neato web console preview.png (27.97 KiB) Viewed 3638 times
willman3755
 
Posts: 3
Joined: March 25th, 2018, 10:58 am

Re: Neato XV rev113 board - ESP8266?

Postby glnc222 » March 31st, 2018, 10:19 pm

There were options in the LCD menu display regarding turning off the XV ring light when not running or charging, I used to use to eliminate annoying visuals, with where the robot was kept parked. The Botvac had a less obtrusive indicator needing less treatment.

I recall the USB going out after some time out unused requiring pressing the power button to wake up. Suspect a power saving strategy with a cpu sleep mode. If the serial header does not have a wake up function perhaps the USB connector does.
glnc222
Robot Master
 
Posts: 4968
Joined: January 23rd, 2012, 9:19 pm
Location: North Carolina, U.S.

Re: Neato XV rev113 board - ESP8266?

Postby valamilamasag » April 1st, 2018, 4:21 pm

willman3755 wrote:keep it awake

No need to do that. Just send a few character over (and a few backspace to delete them :) ). The activity on the bus will wake it up, ready to take commands. Then send clean followed by "line feed" twice (clean\rclean\r). Or it might be different for the XV. If it responds with "Cleaning Mode(CD): 1" then you are good to go.

Btw, I just use esp-link firmware to remotely connect to the bot. You can even use the "neato control" with that (create a virtual serial port that connects to the tcp endpoint of the esp-link)
valamilamasag
 
Posts: 18
Joined: March 19th, 2018, 5:31 pm
Location: Hungary

Re: Neato XV rev113 board - ESP8266?

Postby willman3755 » April 1st, 2018, 7:57 pm

Just send a few character over (and a few backspace to delete them :) )


Thanks for the info, good to know that can wake it up. And thanks for the esp-link info, I didn't know about that. Looks easy to set up and very straightforward in general. Using that I could easily have an actual web server serving the application, with commands getting relayed back over the network to the ESP.

There were options in the LCD menu display regarding turning off the XV ring light when not running or charging, I used to use to eliminate annoying visuals, with where the robot was kept parked.

Of course, as usual I'm overcomplicating things :D

I'll report back once I get my ESPs. I can't wait! I'm like a kid waiting for presents all over again :)
willman3755
 
Posts: 3
Joined: March 25th, 2018, 10:58 am


Return to Neato Robotics

Who is online

Users browsing this forum: b55er, dboston55, ehasley, im1kissfan, jdong, leonicholson, ps0001, RockinRay, vic7767 and 406 guests