Here's the write up from my blog about how I put her together. This week I'm adding the six ultrasonic sensors, and working on that code, as well as building/compartmentalizing the power distribution and electronics boxes. I'm also going to document my wiring and code before I get too far along, and work on some coding to make testing and maintenance easier ie: running the motors in an extended timed-loop to help cycle the batteries.
Anyway, Anna's introductory post from my blog at
www.JohnLizotte.com/Robotics:
I need to do some research on Smart Wheelchair technology, and what better way to do it than on an actual wheelchair?
Well, the better way was upcycling 3 broken wheelchairs into one working wheelchair-based robot. Total cost for the entire project: $40 for an Arduino and some ultrasonic sensors. I call her AnnaBot.
Quick glance as of today : Wheelchair base. Wi-fi enabled. Onboard camera. All controlled from the laptop using an Arduino microcontroller. Six ultrasonic sensors are waiting to be installed for basic obstacle avoidance.
Microsoft Robotic Developers Studio will be used to program speech recognition, conversation, and autonomous behavior, including “follow me” capability and gesture recognition using the Kinect sensor.
The first thing I did was take stock of the parts I could use that I already had around the house. I found an old laptop and a webcam. I was already playing with MRDS. That left me with two parts to find: a working wheelchair, and a microcontroller to interface to it.
I like my gadgets, so I ordered an Arduino Mega 2560 and some ultrasonic sensors. However, my budget didn’t allow for spending several hundred dollars on a used wheelchair. Here’s where I got creative.
I talked to several nursing homes, a hospital, and anyone who would listen, to tell them what I was trying to do. I also put an ad on craigslist. Wanted: electric wheelchairs, working or not. One man’s trash is another man’s treasure. That really paid off for me. Over a two week span, I got 3 wheelchairs. None of them working. None of them cost me a cent. I took the frame and motors from one, the wheels and electronics from another, and batteries and a charger from the third. I put it all together, said the magic word, and presto, I had one working wheelchair and a heap of spare parts after a few evenings of work.
So, the most challenging part was reusing the onboard electronics for the motor control. There’s lots of safety features built in, and they aren’t easy to hack. But they are designed to handle the high motor current. I wanted to keep them.
Inside the joystick
Originally, I was hoping to interface to a port on the outside of the controller, but this wasn’t possible. I had to hack the joystick. I got lucky again. You can see in the picture of the joystick, it’s only 4 wires. One X-axis, one Y-axis, plus power and ground.
I used a multimeter to measure the voltages of the joystick on the blue and yellow wires at neutral, full forward, reverse, left, and right. Then I used the Arduino PWM output to give me those voltages. Should have worked, right? Nope. Two problems. First, the electronics on the chair were sensitive enough to see that the voltage wasn’t steady, and they errored out. I fixed this by putting the PWM through what I call a “smoothing circuit”. I connected the PWM to a resistor, then to the positive leg of a capacitor. The negative leg of the cap went to ground. Then I connected the positive leg of the cap to the joystick control circuit. This let’s the cap carry the voltage in between the pulses, and it was enough to fool the chair’s controller.
The next problem was a joystick fault every time I changed motor directions. This was solved by connecting the Arduino’s ground bus to the ground bus inside the joystick. Giving them a common ground reference solved the last of my electrical problems.
Currently, I’ve got the Arduino programmed to send the proper voltage to move in whatever direction I choose, based on a keypress. “8″ drives it forward, “2″ reverse, “4″ is left, “6″ is right, etc. (The arrows on the number pad). Eventually, this will be under the control of MRDS.
The ultrasonic sensors are going on it next. Then it’s ready to start being somewhat autonomous. For now, I remote desktop into the laptop on Anna. I can access her webcam to see what she’s doing, and I use a simple serial port monitor to send her commands and recieve her responses.
I’m very happy with how this project came together. Much better and much cheaper than “SAM”, the little white robot I built back in the late 80′s. He was based on an 80286 desktop computer that I powered by battery. He had speech recognition, a webcam, and joystick control. For about $500 in 1987 dollars. lol.
SAM was ahead of his time…25 years ago.
My next step is to interface the Arduino to MRDS. Then I want to develop some low-cost cliff sensors, chair-based remote home automation, and such that will enhance the wheelchair user’s day to day safety and comfort. At an affordable price so that those who need it can actually afford it.
Thank you for reading about Anna