New SES Rover

I got my order from Lynxmotion yesterday, and this is what happened…


Yes, I built a new rover!

This one uses two CR servos for locomotion, has a BotBoarduino brain, an SSC -32 for servo control, and a Little Grip gripper with 3DOF (raise, wrist rotation, and open/close). The BotBoarduino is communicating with the SSC-32 using SoftwareSerial on pins 2 and 3. I’ve already got the initialization code finished. I still need to add some sensors. I’m going to pull at least 1 PING sensor from W.A.L.T.E.R. because they just work great. I’ll also put a Sharp IR sensor on this rover. I’m going to figure out how to put my RGB color sensor and heat sensor on this too.

This is an almost complete robot. It just doesn’t have any sensors yet, but will have some soon. :slight_smile: I can actually play with this rover right now, and it didn’t take long to build. I based this little robot on the Lynxmotion two wheeled rover. It inspired me!

I’ve always wanted to put two compasses on a robot - one for the robot to use for navigation, and one on the pan servo of a pan/tilt unit. The idea is to scan the area with the pan/tilt, and get the heading of where something is detected, then have the robot be able to turn to that, heading and move toward the object. This would be extremely interesting, if there were color and heat sensors, as well as the usual ultrasonic and IR range sensors on there as well. :slight_smile:

8-Dale

A gripper and a lot more! Well done. Curious question - why have the body in two separate sections rather than one long channel? Videos?!

Thanks! :slight_smile:

I didn’t have a single long channel long enough to work for what I want to do. :slight_smile: I’m seriously considering getting a single longer channel for the foundation of the chassis though. There are some things I would like to do, but the current body is just not long enough to add more stuff, as you can see.

Not yet, but how about a few new pictures? :slight_smile:


This robot has not been in motion at all yet, but I am hoping to change today sometime. I just added a pan/tilt with a PING ultrsonic sensor, and a Sharp GP2Y0A21YK0F IR sensor. :smiley: Everything is wired up and ready for more software now! :smiley: I still need to test and adjust the CR servos being used for locomotion, and new sensors.

I also ran out of 9V batteries today, so I don’t know if I will be able to do any on the floor playing with this robot today or not. I need to get another 6V battery to power the BotBoarduino, or get a larger capacity (2800 mAH) battery to power the SSC-32.

NOTE: The Sharp GP2Y0A21YK0F IR sensor appears to have a different curve than the older GP2D12 IR sensor. This means I am going to have to adjust the code that reads it, so I can get good readings. That is not happening right now.

8-Dale

I had, to make a little test jig thing for testing wheeled robots. It’s not fancy, but it works!


8-Dale

Another approach would be to see just how compact you can make it. Looking forward to seeing what it can do.

Well, there is a weight balance issue I have to deal with here. There is a lot of weight at the front, with the gripper, especially when it’s extended. Now there is the pan/tilt with sensors also. That’s why the electronics and batteries are mounted as far back as I can get it. This is where a slightly longer chassis could come in and help a lot.

With everything I have on this robot right now, I don’t really think it can be more compact and still not fall forward on its nose. :slight_smile: I got four more 9V batteries, so there will be some on floor time for the robot today.

I’m working on figuring out how to mount the color and heat sensors on it now. :slight_smile:

8-Dale

I’m working on behaviors today. I need something that uses the sensors and moves the robots, so that is my goal for today.

There are many things I want to experiment with, as far as behaviors, and data processing.

I’m already working on an area scan routine that takes readings every so many degrees, and stores them with the position the reading was taken at. :smiley: This routine has parameters for starting position, stopping position, and increment, so will be very flexible and useful. So, doing an areaScan(&pan, -90, 90, 10) would do a complete 180 degree scan and store readings every 10 degrees. As I add sensors, I will add a place to store data for it in this struct, which will give the robot a lot of data to base decisions on. :smiley:

This would eventually allow the robot to choose what object interests it most, turn in that direction, and move toward the interesting object. To implement this though, I need to put a compass on the pan/tilt unit, and another on the robot itself. Then the robot can turn until its heading matches the direction the interesting object is at. I have one IMU I could pull off W.A.L.T.E.R., but this would be for the robot itself, not the pan/tilt unit. Fortunately, each device that is part of the IMU I have is also available separately. I only need one LSM303 breakout board to make it possible for me to implement this. The IMU I have also has an LSM303 on it, along with an L3GD20 gyro, and BMP180 temperature/pressure sensor.

My TCS34725 RGB color sensor and TMP006 heat sensor would enable the possibility to track warm objects and colored objects. :slight_smile:

8-Dale

Crap!

I have run out of memory to store data! :frowning: :frowning:

It looks like I may not be able to use BotBoarduinos (regular Arduino) for the main processor on any of my robots. There just aren’t enough resources on the AtMega 328 chips. :frowning:

I am going to look and see if I can decrease my memory requirements, but I am not optimistic about this. I do NOT want to go to a physically larger processor board on this robot!

8-Dale

Sad… :frowning:

What’s taking all that memory… lol
I know it will sound dumb… is there a way to add memory to a processor. Like pigyback…

It’s the data memory I’ve run out of, not program memory.

There is no external memory bus on an Arduino, so there isn’t any way to add memory or for it to address more memory.

This is depressing! :frowning:

I won’t be able to work on this robot for about two weeks + the time required to receive an order with an Arduino Mega 2560 R3 and another DFRobot shield for it.

I’ve already figured out how to mount it on this robot - I’ll have to make an adapter to adapte the Arduino Mega 2560 mounting holes to the SES Electronics Carrier mounting holes. I have a piece of think plexiglass that would probably work for that - just drill the two sets of mounting holes and cut the piece to the size of the Arduino Mega.

8-Dale

Have not seen your program, but there might be some stuff you can do, to minimize data usage and try to move some stuff into program space. Things like:

Serial.println("This is a Test"); 

The string is in data space. But if you change it to:

Serial.println(F("This is a Test"));

The string is now in program space…

I assume you already know about using PROGMEM for non-modifiable look up tables and the like in Phoenix code base:

static const word GetSin] PROGMEM = { 0, 87, 174, 261, 348, 436, 523, 610, 697, 784, 871, 958, 1045, 1132, 1218, 1305, 1391, 1478, 1564, 1650, 1736, 1822, 1908, 1993, 2079, 2164, 2249, 2334, 2419, 2503, 2588, 2672, 2756, 2840, 2923, 3007, ...
Has the table in program space, but then to access on AVR processors where program and data are in different address spaces,
you must do some special stuff like:

sin4 = pgm_read_word(&GetSin[AngleDeg1/5]);

Note: PROGMEM is a AVR thingy… Luckily some other ones like Teensy, define this header file, such that it works on their processors, where everything is in one address space and you do not have to do anything special.

I’ve made this modification to all the print strings in the SES Rover code. It has saved me enough dynamic memory that I can store 36 area scan readings (IR, PING, Color sensor, and Heat sensor readings), and still have plenty left over. I’m only using 61% dynamic memory now, instead of around 90%, and I’m not getting stability warnings from the IDE, or weird stability issues anymore. :smiley:

NOTE: This is running on a BotBoarduino, and I still have just over 50% program flash available for code.

Yep, I got this one down. :smiley: I use it to store bitmaps that are displayed on an 8x8 matrix display.

Yes, this is an extremely nice compatibility feature Paul has built into TeensyDuino! :smiley:

I have the SES Rover on the bench now, and am working to figure out why my scan routine isn’t scanning a full 180 arc when I tell it to. I suspect the problem is in my moveServoDegrees() routine somewhere, and that’s what I am looking at now.

EDIT: The problem I am having is definitely in the moveServoDegrees() routine somewhere. Luckily, I have my error checking setup such that I basically get the equivalent of a stack trace when something goes wrong - error message print out in order, from where the problem first occured.

8-Dale

I’m stalled on development until next month.

I think I have a bad 6V@1600 maH battery, which powers the SSC-32, so I’m going to order two 6V@2800 maH batteries next month. The SSC-32 is getting power and it’s getting data from the BotBoarduino, but nothing is happening with the servos at all. I charged the battery over night, so it should have a full charge now.

8-Dale

… and what was the voltage in the morning? Can you use it to power a DC motor directly?

I don’t know what the voltage is. I don’t currently have a working DMM, so can’t measure it. :frowning: From the indications I am seeing though, I think this battery has gradually been going bad. Everything else is as it should be.

8-Dale

Can you connect it up to one of the Botboarduinos? Then use the Voltage Divider built in and read the Analog voltage. It is going through 4x1 divider, so for example
6v would come in at 1.5v so: 1.5/5 * 1024 = 307…

Kurt

I’m going to do that at some point. I want to know what’s going on with the power situation.

Mean while, I have purchased four brand new battery packs, two 6V@2800 mAH packs and two 7.2V@2800 mAH packs, which I am using now. I mounted a 6V pack (for servos) and a 7.2V pack (for motors) on W.A.L.T.E.R. 2.0, and a 6V pack (for servos) on the SES Rover (which had a 6V@1600 mAH pack). I have the SES Rover setup to use a high capacity Lithium Ion battery for the Arduino Mega 2560 R3 board (switched from the BotBoarduino).

I’ve been working on the SES Rover all day today. I just can’t give up the memory used for the sensor scan readings, which is the main reason I am switching processors. Since the SES Rover doesn’t have any other distance sensors, it needs to be able to make maximum use of the two distance sensors (PING and IR) on the pan/tilt.

I believe I have the code from the BotBoarduino converted over to take advantage of the additional resources of the Arduino Mega R3 board (mainly, the additional hardware UARTs). I’ve also purchased another DFRobots Sensor Shield for this Arduino Mega R3 board. I really like this shield for the Mega! I like it so much, that I also got the version of the shield for the Arduino Uno sized boards. It made sense, since I still have my older Arduino Duemilanove. :slight_smile:

Before I started this processor conversion, I wrote some routines to handle initializing motors and setting motor speed. The SES Rover is a Lynxmotion 2WD servo rover on steroids. :smiley: My code can now control the two CR servos that act as motors for this robot. :slight_smile: The direction of motion is handled behind the scenes, so the programmer doesn’t have to think about each servo normally running in opposite directions. You just set the speed from -1000 to +1000 for the servo motor you are setting. Positive speeds move forward, negative speeds move in reverse, and a speed of 0 (zero) stops the motor.

My best friend is going to cut some material for me, so I can make a mounting adapter that will convert from the Lynxmotion form factor to the Arduino Mega form factor. I’ll have the option of leaving the BotBoarduino on the robot, and mounting the Arduino Mega/Sensor Shield on the back of it, or removing the BotBoarduino and just piggy backing the Mega and Shield on the back of the SSC-32. :smiley:

After I have all this working, I will have to figure out which Linux board I want to mount on the SES Rover. It will most likely be a Beagle Bone Black or Raspberry Pi, since I already have both of these. However, this would also be a great opportunity to take an UDOO quad for a real test drive, since it has a Quad core Linux board, and an Arduino Due combined on it. :slight_smile: All it would take to mount an UDOO Quad on the SES Rover, or any other robot, is a different mounting adapter…

I haven’t got an Arduino Due yet, so have not had the opportunity to see how my code would run on it. Then, there is also the possibility of putting a Teensy 3.1 on this robot. There are many options, and I will probably try them all at some point! :wink:

8-Dale

Here are construction pictures for the SES Rover:

Here, I’m doing the final mechanical alignment of the servos. This has to be done in order to make sure the servos line up properly in the correct neutral position. This is usually for a pulse of 1500 uS. Most standard R/C servos, which these are, will take a pulse of 500 uS to 2500 uS, with 1500 uS being centered.


I’m just getting ready to do the CPU swap.

This is the make shift mounting adapter I made to adapt the mounting holes for the BotBoarduino to the Arduino Mega R3 mounting holes. My best friend, Ken, cut the material for me. I did everything else.

I’ve added the standoffs for the Arduino Mega R3 board.

The adapter is mounted on the robot, using the BotBoarduino mounting holes.

The Arduino Mega R3 board has been mounted on the adapter.

This is it! The Sensor Shield is now mounted on the Arduino Mega R3 board.

The SES Rover is almost ready to rock! I’ve added the XBee (ZigBee) Mesh Wireless adapter.

Parts for the power adapter I need to make for the Arduino Mega R3 (or any Arduino board).

This is the completed power adapter. It’s not fancy, but it works! :slight_smile: The next one I make will have a switch in it. Actually, I could add a switch to this one… :wink:

There, you have it! I’m getting ready to wire everything up to the Arduino Mega R3 board now. I’ll have more pictures later! All I need to do to get this robot fully mobile is get power to the Arduino Mega R3 board, and write/debug some motion code. I already have code that sets motor speeds and stops the motors, which call my existing servo move routines.

8-Dale

Here are the last construction pictures for the SES Rover. This does not mean there will not be modifications in the future! :wink:

Here is the completed power adapter, with the 6V @ 1600 mAH battery that will power only the Arduino Mega R3 board. I’d really like to find a higher voltage battery in the same form factor, because this mounts very nicely in space that might otherwise go unused.

I’ve installed the battery that will power the Arduino Mega R3 board.

The SES Rover is READY TO ROCK now! All I have to do is plug the battery cable into the Arduino Mega R3, and it will be able to go fully, and autonomously, mobile! :smiley:


The task now, is to do final calibration of the servos and servo motors, and write/debug motion code that makes the best use of the two distance sensors. I’ll do the final calibration in software. I just have to tweak constants in the header file to make changes in the calibration of the servos and motors. I designed this robot to have just two sensors on it, so I would be forced to write code that uses them to best advantage.

I already have the area arc scanning routine working, and have written (but not tested) code to find the closest and farthest objects in the scanned arc. I have a few ideas on how to use this data, such as moving towards the farther interesting object, and running away from the closest objects. I also have two Parallax PIR motion sensors, and might find a way to add one to the back of this robot.

8-Dale

Here is a short video of the SES Rover, with my pal Benji. It shows the robot’s full initialization sequence, including the area scanner.

The area scanner can scan a defined (by parameters) arc of up to 180 degrees in front of the robot. It takes sensor readings at predetermined intervals (a parameter). Currently, the sensors it can currently read are the Parallax PING ultrasonic sensor, Sharp GP2Y0A21YK0F IR sensor, the TMP006 heat sensor, and the TCS34725 RGB Color sensor. The readings are stored in an array, of up to 36 readings for a full 180 degree scan. The position of each reading is also stored, to enable finding the closest and farthest objects.

8-Dale