W.A.L.T.E.R. Returns as a 2WD/4WD

I have created a public Git repository on GitHub for all of my Walter 2.0 software development. I already have my current Arduino code in there. Those who are interested can follow my development, as well as make comments and suggestions for improvements.

I’m in the process of splitting the sound detection code out of the navigation sketch into a separate sound detection sketch. I already have three GP2D12 analog IR sensors attached to my BotBoarduino for navigation, and the four channel sound detection code requires four more analog inputs.

I will be getting another BotBoarduino, as well as an Arduino Mega 2560 ADK with a shield that has three pin headers and XBee sockets.

All of the Arduino boards will be I2C slaves and will be controlled by one (at a time) of my small Linux computers (Raspberry Pi, BeagleBone Black, PandaBoard ES). Well, this is my goal anyway, so we’ll see what happens as things move along.

The basic mechanical and hardware build for Walter 2.0 is done, except for replacing the front PING sensor and SaberTooth 2x5 motor controller with a RoboClaw. That will be completed as soon as I get the new parts. After that, it will be mostly all software development.

I’m also in the process of building a small SES chassis for a balancing robot. I’ll use this to learn about using my IMU board, with the three axis accelerometer and three axis gyro. Everything I learn with this will be incorporated into Walter 2.0 at some point. I also have the RGB color and heat sensors. :slight_smile:

8-Dale

Very nice of you to share all that development with everyone.
I might just build something similar … :wink:

I believe in sharing and giving back. I’ve learned most of what I know about robotics right here. :slight_smile: I am just doing what everyone else here does - sharing what I do.

I just placed orders with both Lynxmotion and RobotShop (2 separate orders) for more robot parts. I’m getting another BotBoarduino, SSC -32, parts to complete the build for another robot (a small balancer), an Arduino Mega 2560 ADK board with a robot type shield, more sensors (IR and PING), a RoboClaw 2x5 for W.A.L.T.E.R., a prototype shield for one of my BotBoarduinos, and assorted hardware.

Robotics is not an inexpensive hobby!

8-Dale

Don’t tell me…
If i was rich i would have an Hexapod on my personal desk… :wink:

When I went to connect my I2C display and sensor breadboard up to the BotBoarduino on W.A.L.T.E.R., I realized I have a problem. Pod (rPi) is an I2C Master and is connected to the BotBoarduino, which is an I2C Slave. An I2C Slave can only communicate with I2C Masters, not other Slave devices. My sensors and displays are all I2C Slave devices, so the BotBoarduino can’t communicate with them. I can’t have Pod communicate with the BotBoarduino using the serial port, because the BotBoarduino connects to the SSC-32. That’s the problem.

I did find a SoftI2CMaster library for the Arduino, but I’m not sure what using it will require me to do. I don’t know if my sensors will communicate to a SoftI2CMaster or not. but I will find out soon enough. I am going to try and get it working tonight or tomorrow. Even if it does work, I am going to have to write new I2C routines that use SoftI2CMaster to access the sensors and displays.

I pulled all the sound detection code out of the navigation sketch and put it into a separate sketch. Then I added the code to read all the sensors I have and print the readings out. This includes the accelerometer, magnetometer (compass), and gyro. This brings the navigation sketch up to almost 50% of the BotBoarduino’s capacity, and I haven’t even written any navigation code that uses all this data yet. I also have the routines to read PING and GP2D12 IR sensors in the navigation sketch.

I’ve also added the RoboClaw, BMSerial, KalmanFilter, and SoftI2CMaster libraries. I hope to have my RoboClaw 2x5 motor controller sometime next week. Once I have that, I can start working with motor control and the encoders on the motors. If all goes well, I am hoping to have W.A.L.T.E.R. rolling around on his own, using basic obstacle avoidance, sometime later this month. I’ve got three GP2D12 sensors mounted, one on the front pan/tilt, and one mounted upside down on each side between that each wheels. There will also be a new PING sensor mounted on the front pan/tilt.

I also have to figure out how to use all this data to keep W.A.L.T.E.R. on course, right side up, and out of the way of imovable objects. I need to find out how to use an accelerometer as an inclinomiter. I have lots of research, learning, and code writing to do!

8-Dale

I had to completely rewire my display and sensor breadboard, because something was not right and I couldn’t see the problem. Everything is properly connected in daisy chain I2C fashion - the 7 segment display (address 0x70), the 8x8 matrix display (0x71), the 10DOF IMU (0x19, 0x1E, 0x6B, and 0x77), the DS1307 real time clock (0x68), and my BotBoarduino with the navigation sketch running (0x50). I haven’t tried to communicate from Pod to the BotBoarduino yet, but everything else is working as it should. This time, all my connections are properly color coded, so they will be much easier to trace if something gets disconnected.

I have to repatch two of the Adafruit libraries to add two features I need - setRotation() for the EightByEight class of Adafruit_8x8.py and clear() in the SevenSegment class of Adafruit_7Segment.py. Somehow, I managed to lose my patched versions of those libraries.

I haven’t tried out the SoftI2CMaster library on the BotBoarduino yet. I wanted to verify that my circuit works correctly with Pod first. That was a good move, because something was wrong.

8-Dale

I just did a merge of my navigation sketch with my IMU sketch. The space left to me on my BotBoarduino for new code is just a little over 6 Kb now. I haven’t even got all the sensor reading code in yet - I still have to add code to at least initialize and read the color and heat sensors.

I also haven’t even written any motor control or behavior code yet. I do have code to read the accelerometer, magnetometer (compass), gyro, GP2D12 and PING sensors written. I don’t have any code to get anything useful from the accelerometer, compass, gyro, or the color or heat sensor yet.

There is some code that I will remove, such as the Serial port display code for debugging, of course, and the code to display data on the 7 segment and 8x8 matrix displays can also come out. I suspect removing that code probably won’t free up a lot more code space though, but I could be wrong, and hope I am.

I received the new RoboClaw 2x5 motor controller today, and have the RoboClaw and BMSerial libraries installed for my Arduino IDE. I will be getting my stuff from RoboShop tomorrow, which includes 4 Sharp IR sensors, 3 PING sensors, an Arduino Mega ADK board with a shield that adds 3-pin headers and several XBee sockets, plus two complete “long range” 433 MHz radio transceiver sets, which I am excited about. This doesn’t even include the stuff to finish the 4 channel sound detection circuitry I’ll be adding to W.A.L.T.E.R. 2.0 - I just need four new electret mics for that.

I’m going to have to partition out the software load amongst more than one processing unit, but I have planned on doing that all along. I’ve been looking at a relatively new board on the block for the main “brain” on W.A.L.T.E.R. 2.0, and am going to try to get one next month. It’s a quad core embedded Linux board, with an Arduino Due built in, and full communication in both directions. With the Arduino Mega ADK board, I’ll have four hardware serial ports to play with, which is going to be very important.

I’m building and testing everything in a modular fashion, so I know exactly what does and doesn’t work at any given time. I am hoping to have W.A.L.T.E.R. make his first fully autonomous run sometime later this month.

I have been waiting a very LONG time for this! :smiley:

8-Dale

Here is a short video showing W.A.L.T.E.R. and his BotBoarduino running my latest sensor circuit. The IMU board is to the right of the second display at the top of the breadboard. The real time clock is below that.

Yes, I know I need better lighting, Alan. :stuck_out_tongue:

W.A.L.T.E.R.

Edit: Corrected the link to the video

8-Dale

Got them all working right.
The light is not that bad, i can see everything… :wink:

I need to get another light coming in from the back of everything. :slight_smile:

I just created a version of my Navigation sketch that doesn’t have any display routines in it and was very surprised at the results.

Sketch uses 17,342 bytes (56%) of program storage space. Maximum is 30,720 bytes.
Global variables use 935 bytes (45%) of dynamic memory, leaving 1,113 bytes for local variables. Maximum is 2,048 bytes.

This is versus the 24+ Kb and 81% of capacity with all the display stuff in the sketch. Not bad!

8-Dale

I just received my parts from RobotShop! :slight_smile:

I’m a little disappointed in this shield for the Arduino Mega ADK board, because it only has headers for analog inputs 6 to 15. That still gives me 10 analog inputs to play with though, so overall, I think this will work out great. I will have me enough analog inputs to run all the Sharp IR range sensors I have and the four channel sound detection circuit.

This shield is made by DFRobot, and also has headers for three of the hardware UARTs (in addition to an XBee socket for each one), and a micro SD card slot. I have to find out if there is a library that works with the SD card slot. It also has 3-pin headers for a lot of digital and most PWM pins. There is also a dedicated header for I2C, which makes me very happy.

I might dedicate the BotBoarduino to the sound detection circuit, general sound generation, and some digitial stuff. That would be a great fit for the BotBoarduino. I already have a dedicated Sound sketch created. I just need four new electret microphones to complete the circuit.

OK, it’s time to PLAY now!

8-Dale

Today, I’ll mount the new RoboClaw 2x5 motor controller on W.A.L.T.E.R., and exchange all the front sensors for new ones I received yesterday. This will provide W.A.L.T.E.R. 2.0 with basic movement ability, as well as basic sensing capability. This will bring him right up to the same level as W.A.L.T.E.R. 1.0 was at. I’m going to start out driving the RoboClaw with PWM, just like I did with the Sabertooth controller.

I won’t be utilizing any of the new capabilities (encoders, etc.) of the RoboClaw controller right away. I just want to get W.A.L.T.E.R. moving around autonomously first. I do have encoders on both of W.A.L.T.E.R.'s motors, and will start working with those after I’ve got W.A.L.T.E.R. 2.0 moving around autonomously at least as well as W.A.L.T.E.R. 1.0 did.

I will build W.A.L.T.E.R. 2.0’s basic sensing around the front pan/tilt with new Sharp GP2Y0A21YK0F IR and Parallax PING Ultrasonic range sensors. I’m going to mount the other two new PING sensors on the front at 45 degree angles to the pan/tilt base. I’ll mount three new Sharp GP2Y0A21YK0F IR sensors at the back, one center and one each side at a 45 degree angle. It will be interesting to see if the new Sharp GP2Y0A21YK0F IR sensors are plug in compatible with the code for the older GP2D12 IR sensors.

After I get all the hardware changes done, I can finally start writing sensor based behaviors for navigation and movement for W.A.L.T.E.R., utilizing the BotBoarduino and SSC-32.

Even as I work on this, I am planning the first major upgrade, which will be to the locomotion system, which I already have everything for, except the new wheels.

8-Dale

Mission accomplished, achievement unlocked!

I mounted the new motor controller on the underside of W.A.L.T.E.R., replaced all four sensors and wired them to the BotBoarduino, and wired the pan/tilt servos to the SSC-32. There are now three PING sensors and one IR sensor covering the front of W.A.L.T.E.R.

Tomorrow, I will configure the RoboClaw 2x5 controller, and complete the wiring to make W.A.L.T.E.R. mobile! :smiley: I can’t mount any more sensors until I get more MPSH-01 Multi-Purpose Sensor Housings. I am way ahead of where I thought I would be at this time. :smiley:

I still have a lot of work to do before W.A.L.T.E.R. 2.0 can make his first solo run though. I have two of his three batteries on chargers now and will charge the third one tomorrow. Then I will have to bench test everything. Finally, it will be time to start writing sensor based behavior code, and test/debug it all. I believe W.A.L.T.E.R. will be able to make his first solo run sometime later this month.

It was a great day today! :smiley:

8-Dale

Indeed, very nice progress.

Thanks! :smiley:

Today, all I need to do is configure the RoboClaw, wire it to the motors, battery, and wire the control signals to the SSC-32. I’ll be running it in Mode 1 to start with, R/C mode without mixing. I really hate this part of the wiring on rovers.

After the wiring is complete, I can start testing everything. I did some minor reconfiguration of the Navigation sketch last night, to switch some pin assignments around. I may try using SoftwareSerial to drive the SSC-32, and eventually the RoboClaw. I still have digital pins 9 to 12 I can allocate for two SoftwareSerial devices.

Note to Lynxmotion: When designing Arduino Uno compatible robot controllers, PLEASE put all fixed resourses at the TOP of the digital pin range. I.E., the speaker is on pin 5, and the buttons/switches are on pins 7 to 9. These should be in the last block of digital pins, unless there is a very specific reason for putting them where they are. Having them where they are makes it difficult to have groups of like sensors on consecutive pins, and process them in loops. Of course, this wouldn’t be an issue with a Mega compatible board.

My current pin allocations are:

0, 1 --> Hardware serial for programming
2, 3 --> Software I2C
4 --> Not yet allocated
5 --> Speaker
6, 7, 8 --> 3 PING sensors
9, 10 --> Software Serial for the SSC-32
11, 12 --> Software Serial for the RoboClaw 2x5
13 --> On board standard Arduino LED
14, 15 --> Not yet allocated

Analog 0 to 3 --> Sharp IR sensors
Analog 4, 5 --> Hardware I2C

I’m not using the buttons or user LEDs at all. I don’t know if SoftwareSerial will work with the RoboClaw. I’ve been considering whether to move to the Arduino Mega ADK (with the shield) for main “brain,” so I can have more hardware serial ports and such.

I definitely want to add XBee, Bluetooth, and WiFi at some point. These might be better handled by a nice Linux board, such as a quad core UDOO. The UDOO has Linux, built in WiFi, and a fully Arduino Due compatible controller, all on one board.

8-Dale

True. Although this was before we took over operations, there was likely a reason why it was done the way it was. Unfortunately we don’t know what that reason was.

I understand that.

My note is meant for design decisions on future controller products. So far, the BotBoarduino is fitting in with W.A.L.T.E.R. really well. As you can see, I have 3 pins still available, and 2 of those are consecutive. :slight_smile: I wish I had 2 more hardware UARTs, but other than that, we will see how things go.

I’ve got power to the RoboClaw 2x5 now, and both motors are connected to it. I always hate this part because it’s where I can lose my motor controller, even though I am very careful when connecting things. Now, I have to find 2 long servo extension cables I can modify to remove the power lead, so I can connect the motor control lines to the SSC-32. I will have to rearrange my wiring to see if I can free up 2 of those.

8-Dale

I’ve passed my first smoke test with W.A.L.T.E.R. 2.0! I didn’t let the magic smoke out of the RoboClaw 2x5, got it successfully configured to mode 1 (R/C without mixing), and have the motors connected. I also have the control lines connected to the SSC-32 with two modified 12" servo extender cables.

All I have to do is connect the second battery up to the BotBoarduino and SSC-32, and W.A.L.T.E.R. 2.0 should be good to go for initial testing. I did have to temporarily sacrifice the use of the PING sensors on each side to get the cables to connect the RoboClaw to the SSC-32, but that’s alright for now as I didn’t plan to use those right away.

8-Dale

I’ve spent quite a bit of time looking at the various Arduino examples for the RoboClaw motor controllers. I am thinking seriously of going right to running it in Packet Serial with all the encoder options rather than using simple PWM first. I never really did like using PWM for motor control.

8-Dale

Not sure if it will help you, but on my Raspberry Pi project (www.github.com/kurte) I have a version of the Roboclaw code base in my library directory and a test app and the start of a Rover that uses it…