Examining Battery of Thrift Store Neato XV-21

This Neato XV-21 robot vacuum did not power on when I found it in the thrift store. Now that I’ve verified there isn’t anything fundamentally broken or missing on the robot, the next thing is to try to charge its batteries. But since the thrift store didn’t have its charger, we have to go to plan B: Pull out the batteries and see if we can work with it.

The interior component packaging of this vacuum divides its battery into two packs, each in their own battery bay on either side of its dust collection chamber. These two bays are accessible from the bottom of the vacuum, each with a door that opened by unscrewing a pair of Philips screws. Each battery pack has a 4-wire pigtail terminating in a connector that plugs into the vacuum.

It takes quite a bit of force to remove the connector. One battery was removed without incident, but the other battery required so much force it actually broke something holding the vacuum side connectors to the vacuum body. Fortunately this appears to only be a minor mechanical annoyance and will not derail the project. At worse, we now have a connector that will rattle as the robot moves around.

Neato XV-21 battery pack

Once the battery pack was removed we could read its printed information, identifying itself as a nickel-metal hydride (NiMH) battery pack. The general shape implies six cells, and the stated nominal voltage of 7.2 is consistent with six cells in series. Each cell is rated with a capacity of 3200 milliamp-hours. I didn’t know what “4/3A” meant but a quick web search indicated it was the physical form factor (size) of the battery. “McNair” appears to be the name of a battery manufacturing company, and finally “MC20120924” probably meant this battery was manufactured on September 24th, 2012.

Attention then turned to the four-wire connector. Typical convention hints black is probably negative and red is probably positive. A voltmeter said there was less than a volt across those wires, which is not just flat but might also indicate damaged battery cells. The next question: What are the two yellow wires? It is something the vacuum control board would want to know about, and our hypothesis is that it is a thermistor to measure battery’s temperature. As an experiment to test this hypothesis, we put a ohm meter across the two yellow wires and warmed up the battery pack with our hands. We saw resistance change in response to temperature.

With some confidence the yellow wires are not directly involved in charging, it’s time to put a little bit of power across those red and black wires to see what happens.

Digging Into Thrift Store Neato XV-21

Of course, I didn’t buy a nonfunctional robot vacuum from a thrift store just to admire how clean it is. I bought it to see if it can be brought back to life. So out comes the screwdriver set and it’s time to dig into those non user serviceable parts inside. Fortunately Neato didn’t feel the need to complicate this effort with “security” bits that would only hamper resourceful hackers by a few seconds – they were straightforward Philips head screws. I had expected fine pitched machine screws, but they were actually coarse pitched screws that self-tap into plastic. This limits the number of times we can assemble and disassemble this vacuum before the screws become too loose to hold themselves in place, but that’s a concern for the future.

Neato XV-21 with bottom panels removed

There are three easily accessible panels. Two rectangular battery compartment doors each held by two screws, and a large semicircular panel held in place by four screws.

Underneath the semicircular panel is a large centrifugal (squirrel-cage) fan responsible for creating the suction that gives vacuum cleaner their name and purpose. The filter sitting in the back end of the dust bin is visible. Air would move past the filter, through the fan, and exhaust out the grating at the back. It would not have been surprising to find a coat of fine dust that made their way past the filter, but the fan compartment is pristine. Either the filter is far more capable than I give it credit for, or this vacuum was indeed barely used.

Neato XV-21 wheel encoder

On either side of the fan are motor gearbox assemblies for driving the vacuum around. The motor appears to be a commodity DC brushed motor, but it does have some sort of encoder mounted to its back. Looking at the circuit board we saw a single sensor, indicating this encoder can sense motor movement but not its direction: a full quadrature encoder would have had two sensors on the board.

Also visible behind the robot’s left wheel (right side of top picture) are wiring for external connectors:

  • Mini-USB for serial data, which would be extremely interesting if I could get the vacuum powered up.
  • Barrel jack for a charging adapter I don’t have.
  • Two thick metal wires to make contact with a Neato charging dock, which I also don’t have.

Given that the official chargers were absent from this thrift store purchase, the next step is to remove these two battery packs and see what we can do with them.

A Curiously Clean Thrift Store Neato XV-21

I went to a thrift store to take pictures, but came home with a Neato XV-21 vacuum that did not power on. At $7.99, it was a cheap gamble to see what might be usable in this robot vacuum cleaner. In my cursory in-store examination, it looked to be in good shape. After I took a little time for a closer look, I realized it was actually in even better shape than I had initially thought.

Super clean Neato XV-21

Of course, there’s no mistaking the vacuum for new. There is dirt in the dust bin and visible black smudges on top of the vacuum. But beyond that I found almost no other signs of wear. The exterior sides of this unit are clean, free of the scuff marks and other marring I associate with robot vacuum veterans. Although my experience are mostly with affordable models of Roomba and similar vacuums that perform a random walk through its environment, bumping into things along the way. The selling point of a Neato is its lidar for object avoidance, so the nearly pristine sides of may just be a result of excellent object avoidance and not lack of use.

Super clean Neato XV-21 brush

Its floor cleaning brushes show some dirt but is actually really clean. My own home vacuum would show more dirt than this after a minute of use. Brush roller drive belt looks to be in good shape.

At this point I’m still undecided whether this was a barely used robot vacuum or maybe the previous owner is just very meticulous about keeping their tools clean. The clean brush and dust bin certainly imply the former, but the latter is also quite possible as indicated by the presence of original protective plastic over the control panel. The previous owner was one of those people who did not remove plastic protective film that were meant to be removed, a mindset very different from mine.

Me? I peel that stuff off before I start taking this vacuum apart to examine its internals.

New Project: Neato Hacking

My ROS learning robot Phoebe was built mainly around a laser distance scanner module salvaged from a Neato robot vacuum cleaner. At the time I knew people were selling them for $50-$75 on Craigslist in varying condition, but I was content to pay $45 for just the laser scanner. It was all I needed for my own robot exploration purposes. I thought a full Neato vacuum might be fun to play with, but I have enough projects on my to-do list that I didn’t feel the need to go out and find one.

Unless when I do. I recently wrote a Hackaday article about bargain shopping in a thrift store, and I needed a picture to go with my article. I went into my local thrift store to take some pictures, but it was also an opportunity to practice what I preached. I spent most of my time in the electronics section and didn’t find anything I wanted to take home with me. On my way out the door, though, I took a glance at the kitchen electronics section and spotted this beauty: a Neato robot vacuum with a price tag of only $7.99.

Savers Neato XV-21 1600

It doesn’t power on, and external accessories were nowhere to be found: neither a wall wart charger nor its charging dock. But it looked to be in pretty good condition with only minor cosmetic blemishes on the exterior. Aside from the missing charger, all other major components appear to be present. But the purchase decision was based on the most interesting part: I looked inside the top bump to verify presence of a familiar looking laser scanner unit. If I all I get out of this $7.99 is a Neato lidar, I’ll be happy. If anything else worked, they would just be icing on the cake.

It’s a big question mark, but it’s one I’m buying to take home for a closer look.

Robot Disorientation Traced To Timing Mismatch

Once the Roboclaw ROS Node‘s wheel parameters were updated to match the new faster motors, Phoebe went on a mapping run. And the results were terrible! This is not a complete surprise. Based on previous experimentation with this LIDAR module, I’ve seen its output data distorted by motion. It doesn’t take a lot of motion – even a normal human walking pace is enough to cause visible distortion. So now that Phoebe’s motors are ten times faster than before, that extra speed also adds extra distortion.

While this is a problem, it might not be the only problem behind the poor map. I decided to dig into an anomaly I noticed while using RViz to calibrate wheel data against LIDAR data: there’s some movement that can’t be entirely explained by a LIDAR spinning at 240 RPM.

The idea behind this odometry vs. LIDAR plot on RViz is to see if wheel odometry data agrees with LIDAR data. My favorite calibration surface is a door – it is a nice flat surface for LIDAR signal return, and I could swing the door at various angles for testing. In theory, when everything lines up, movement in the calculated odometry would match LIDAR observed behavior, and everything that is static in the real world (like the door) would be static in the plot as well.

In order to tune the base_width parameter, I looked at the position of the door before turning, and position after turning. Adjusting base_width until they line up, indicating odometry matches LIDAR. But during the turn, the door moved relative to the robot before finishing at the expected position.

When Phoebe started turning (represented by red arrow) the door jumped out of position. After Phoebe stopped turning, the door snapped back to position. This means non-moving objects appear to the robot as moving objects, which would confuse any mapping algorithm.

Odom LIDAR Mismatch No Hack

I chased down a few dead ends before realizing the problem is a timing issue: the timestamp on the LIDAR data messages don’t line up with the timestamp on odometry messages. At the moment I don’t have enough data to tell who is at fault, the LIDAR node or the Roboclaw node, just that there is a time difference. Experimentation indicated the timing error is roughly on the order of 100 milliseconds.

Continuing the experiment, I hard-coded a 100ms timestamp delta. This is only a hack which does not address the underlying problem. With this modification, the door still moves around but at least it doesn’t jump out of place as much.

Odom LIDAR Mismatch 100ms hack

This timing error went unnoticed when Phoebe was crawling extremely slowly. But at Phoebe’s higher speed this timing error could not longer be ignored. Ideally all of the objects on the RViz plot would stay still, but we clearly see nonuniform distortion during motion. There may be room for further improvement, but I don’t expect I’ll ever get to ideal performance with such an inexpensive LIDAR unit. Phoebe may end up just having to go slowly while mapping.

(Cross-posted to Hackaday.io)

Phoebe vs. Office Chair Round 2

Phoebe was built to roam my house, but the first draft chassis was unable to do so effectively due to a few problems that the second chassis aimed to solve. The first one was ground clearance, which was solved by raising the main chassis and sloping the bottom of the electronics tray. Sloping that leading edge gives Phoebe a better approach angle for smoothly transitioning between floor surfaces.

The second major problem was the LIDAR scanner’s height: it was too high to see the legs of an office chair. Hence the other major goal of the second chassis was to lower the LIDAR mounting point and hopefully bring an office chair’s legs into plane of view.

Placing the newly rebuilt Phoebe next to the chair looks promising at first glance. Unlike the taller first chassis, the LIDAR’s horizontal plane of sight is now low enough it should be able to see the legs.

Phoebe vs Chair Round 2

The proof is in the occupancy grid, and the RViz plot shows that Phoebe can now see the legs of the chair blocking its way.

Phoebe Sees Chair Legs

It’s not a very solid detection, though. Something about the surface texture and/or angle of the plastic results in a weak laser return.  And there’s the risk of a leg going undetected when if approached from the end, as the dark sloped rounded end of the chair leg is nearly invisible to LIDAR.

But it’s a huge improvement from before, where the LIDAR was too high to see any part of the starfish pattern. It’s good enough for us to proceed with the next task: integrate Phoebe’s new faster wheel drive motors into the system.

(Cross-posted to Hackaday.io)

Observations From A Neato LIDAR On The Move

Now that the laser distance scanner has been built into a little standalone unit, it’s easy to take it to different situations and learn how it reacts by watching RViz plot its output data. First I just picked it up and walked around the house with it, which led to the following observations:

  • The sensor dome sweeps in a full circle roughly four times per second. (240 RPM) This sounded pretty good at first, but once I started moving the sensor it doesn’t look nearly as good. Laser distance plot is distorted because it’s moving while it’s sweeping, visibly so even at normal human walking speeds. Clearly a robot using this unit will have to post-process distance data generated by this sensor to compensate for speed. Either that, or just move really slowly like the Neato XV-11 robot vacuum this LIDAR was salvaged from.
  • The distance data is generated from a single narrowly focused beam. This generates detailed sweep data at roughly one reading per vertical degree of separation. However, it also means we’re reading just a very narrow one degree horizontal slice of the environment. It’s no surprise this is limiting, but just how limited wasn’t apparent until we started trying to correlate various distance readings with things we can see with our eyes.

Autonomous vehicles use laser scanners that spin far faster than this one, and they use arrays of lasers to scan multiple angles instead of just a single horizontal beam. First hand experimentation with this inexpensive unit really hammered home why those expensive sensors are necessary.

Neato LIDAR on SGVHAK Rover

After the few handheld tests, the portable test unit was placed on top of SGVHAK Rover and driven around a SGVHAK workshop. There’s no integration at all…. not power, not structure, and certainly not data. This was just a quick smoke test that was very productive because it lead to more observations:

  • Normal household wall paint, especially matte or eggshell, works best. This is not a surprise given that it was designed to work on a home vacuum robot.
  • Thin structural pieces of shelving units are difficult to pick up.
  • Shiny surfaces like glass become invisible – presumably the emitted beam is reflected elsewhere and not back into the detector. Surprisingly, a laptop screen with anti-reflective matte finish behaved identically to shiny glass.
  • There’s a minimum distance of roughly 15-20cm. Any closer and laser beam emitted is reflected too early for detector to pick up.
  • Maximum range is over 4-5 meters (with caveat below). More than far enough for a vacuum robot’s needs.

The final observation was unexpected but obvious in hindsight: The detection capability is affected by the strongest returns. When we put a shiny antistatic bag in view of the sensor, there was a huge distortion in data output. The bag reflected laser back to the scanner so brightly that the control electronics reduced receiver sensitivity, similar to how our pupils contract in bright daylight. When this happens, the sensor could no longer see less reflective surfaces even if they were relatively close.

That was fun and very interesting set of experiments! But now it’s time to stick my head back into my ROS education so I can make use of this laser distance sensor.

Making My Neato LIDAR Mobile Again

The laser distance sensor I bought off eBay successfully managed to send data to my desktop computer, and the data looks vaguely reasonable. However, I’m not interested in a static scanner – I’m interested in using this on a robot that moves. Since I don’t have the rest of the robot vacuum, what’s the quickest way I can hack up something to see how this LIDAR unit from a Neato XV-11 works in motion?

Obviously something on the move needs to run off battery, and there’s already a motor voltage regulator working to keep motor speed correct. So that part’s easy, and attention turns to the data connection. I needed something that can talk to a serial device and send that data wirelessly to my computer. There are many ways to do this in the ROS ecosystem, but in the interest of time I thought I’d just do it in the way I already know how. A Raspberry Pi is a ROS-capable battery-powered computer and everything I just did on my computer would work on a Pi. (The one in the picture here has the Adafruit servo control PWM HAT on board, though the HAT is unused in this test.)

Mobile Scanning Module

The Raspberry Pi is powered by its own battery voltage regulator I created for Sawppy, supplying 5 volts and running in parallel with an identical unit tuned for 3 volts supplying power to spin the motor. As always, the tedious part is getting a Pi on the wireless network. But once I could SSH into the Pi wirelessly, I could run all the ROS commands I used on my desktop to turn this into a mobile distance data station. Reading in data via FTDI serial port adapter, sends data out as ROS topic /scan over WiFi.

Using a Raspberry Pi 3 in this capacity is complete overkill – the Pi 3 can easily shuttle 115200 bps serial data over the network. But it was quick to get up and running. Also – the FTDI is technically unnecessary because a Pi has 3.3V serial capability on board that we could use. It’s not worth the time to fuss with right now but something to keep in mind for later.

Now that the laser is mobile, it’s time to explore its behavior on the move…

Shouldn’t Simple LIDAR Be Cheaper By Now?

While waiting on my 3D printer to print a simple base for my laser distance scanner salvaged from a Neato robot vacuum, I went online to read more about this contraption. The more I read about it, the more I’m puzzled by its price. Shouldn’t these simple geometry-based distance scanners be a lot cheaper by now?

The journey started with this Engadget review from 2010 when Neato’s XV-11 was first introduced to fanfare that I apparently missed at the time. The laser scanner was a critical product differentiation for Neato, separating them from market leader iRobot’s Roomba vacuums. It was an advantage that was easy to explain and easy for users to see in action on their product, both of which help to justify their price premium.

Of course the rest of its market responded and now high-end robot vacuums all have mapping capability of some sort or another, pushing Neato to introduce other features like internet connectivity and remote control via a phone app. In 2016 Ars Technica reviewed these new features and found them immature. But more interesting to my technical brain is that Ars linked to a paper on Neato’s laser scanner design. Presented at May 19-23 2008 IEEE International Conference on Robotics and Automation titled A Low-Cost Laser Distance Sensor and listing multiple people from Neato Robotics as authors, it gave an insight into these spinning domes. Including this picture of internals.

Revo LDS

But even more interesting than the fascinating technology outlined in the paper, is the suggested economics advantage. The big claim is right in the abstract:

The build cost of this device, using COTS electronics and custom mechanical tooling, is under $30.

Considering that Neato robot vacuums have been in mass production for almost ten years, and that there’s been ample time for clones and imitators to come on market, it’s quite odd how these devices still cost significantly more than $30. If the claim in the paper is true, we should have these types of sensor for a few bucks by now, not $180 for an entry-level unit. If they were actually $20-$30, it would make ROS far more accessible. So what happened on the path to cheap laser scanner for everyone?

It’s also interesting that some other robot vacuum makers – like iRobot themselves – have implemented mapping via other means. Or at least, there’s no obvious dome of a laser scanner on top of some mapping-capable Neato competitors. What are they using, and are similar techniques available as ROS components? I hope to come across some answers in the near future.

Simple Base for Neato Vacuum LIDAR

Since it was bought off eBay, there was an obvious question mark associated with the laser scanner salvaged from a Neato robot vacuum. But, following instructions on ROS Wiki for a Neato XV-11 scanner, results of preliminary tests look very promising. Before proceeding to further tests, though, I need to do something about how awkward the whole thing is.

The most obvious problem are the two dangling wires – one to supply motor power and one to power and communicate with the laser assembly. I’ve done the usual diligence to reduce risk of electrical shorts, but leaving these wires waving in the open will inevitably catch on something and break wires. The less obvious problem is the fact this assembly does not have a flat bottom, the rotation motor juts out beyond the remainder of the assembly preventing the assembly from sitting nicely on a flat surface.

So before proceeding further, a simple base is designed and 3D-printed, using the same four mounting holes on the laser platform designed to bolt it into its robot vacuum chassis. The first draft is nothing fancy – a caliper was used to measure relative distance between holes. Each mounting hole will match up to a post, whose height is dictated by thickness of rotation motor. A 5mm tall base connects all four posts. This simple file is a public document on Onshape if anyone else needs it.

Each dangling wire has an associated circuit board – the motor power wire has a voltage regulator module, and the laser wire has a 3.3V capable USB to serial bridge (*). Keeping this first draft simple, circuit boards were just held on by double-sided tape. And it’s a good thing there wasn’t much expectation for the rough draft as even the 3D printer had a few extrusion problems during the print. But it’s OK to be rough for now. Once we verify the laser scanner actually works for robot project purposes, we’ll put time into a nicer mount.

Simple Neato LDS base
Bottom view of everything installed on simple 3D printed base.

(*) Disclosure: As an Amazon Associate I earn from qualifying purchases.

Neato Vacuum Laser Scanner Works in RViz

Scanner Motor SpinsI bought a laser scanner salvaged from a Neato robot vacuum off eBay. The promised delivery date is mid next week but the device showed up far earlier than anticipated. Which motivated me to drop other projects and check out the new toy immediately.

The first test is to verify the rotation motor works. According to instructions, it demands 3.0 volts which I dialed up via my bench power supply. Happily, the scanner turns. After this basic verification, I took one of the adjustable voltage regulators I bought to power a Raspberry Pi and dialed it down to an output of 3.0 volts. Since the connectors have a 2mm pitch, my bag of 4-pin JST-XH connectors could be persuaded to fit. It even looks like the proper connector type, though the motor connector only uses two pins out of four.

The instructions also had data pinout, making it straightforward to solder up an adapter to go between it and a 3.3V capable USB serial adapter. This particular adapter (*) claims to supply 3.3V between 100-200mA. Since the instruction said the peak power draw is around 120mA, it should be OK to power the laser directly off this particular USB serial adapter.

Scanner Power and Data

With physical connection complete, it’s time to move on to the software side. This particular XV-11 ROS node is available in both binary and source code form. I chose to clone the Github source code because I have ambition to go in and read the source code later. The source code compiled cleanly and RViz, the data visualizer for ROS data, was able to parse laser data successfully.

That was an amazingly smooth and trouble-free project. I’m encouraged by the progress so far. I hope we could incorporate this into a robot and, if it proves successful, I anticipate buying more of these laser sensors off eBay in the future.


(*) Disclosure: As an Amazon Associate I earn from qualifying purchases.

Incoming: Neato Robot Vacuum Laser Scanner

The biggest argument against buying a Monoprice robot vacuum for ROS hacking is that I already know how to build a two-wheeled robot chassis. In fact two-wheeled differential drive is a great simple test configuration that I’ve done once or twice. Granted, I have yet to build either of them into having full odometry capability, but I do not expect that to be a fundamentally difficult thing.

No, the bigger challenge is integrating sensing into a robot. Everything I’ve built so far has no smarts – they’re basically just big remote-control cars. The ambition is to ramp up on intelligent robots and that means giving a robot some sense of the world. The TurtleBot 3 Burger reads its surroundings with a laser distance sensor that costs $180. It’s been a debate whether I should buy one or not.

But at this past Monday’s SGVHAK meetup, I was alerted to the fact that some home robot vacuums use a laser scanner to map their surroundings for use planning more efficient vacuum patterns. I knew home robot vacuums have evolved beyond the random walk vacuum pattern of the original Roomba, but I didn’t know their sophistication has evolved to incorporate laser scanners. Certainly neither of the robot vacuums on clearance at Monoprice have a laser scanner.

But there are robot vacuums with laser scanners and, more importantly, some of these scanner-equipped robot vacuums are getting old enough to break down and stop working, resulting in scavenged components being listed on eBay… including their laser scanner! Items come and go, but I found this scavenged scanner for $54 and clicked “Buy It Now”. The listing claims it works, but it’s eBay… we’ll find out for sure when it arrives. But even if it doesn’t, Neato vacuums are available nearby for roughly the same price, so I have the opportunity for multiple attempts.

The unit off eBay was purportedly from a Neato XV-11 vacuum and someone in the ROS community has already written a package to interface with the sensor. The tutorials section of this package describes how to wire it up electrically. It looks fairly straightforward and I hope it’ll all come together as simply as I hope it will when the eBay item arrives in about a week and a half.

Neato Scanner 800