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

I have been working on the pan/tilt scanner code this week. I finally got it all working yesterday! Now, W.A.L.T.E.R. can scan up to a full 180 arc (specified as -90 to +90 or 0 to 180 degrees), and take sensor readings every so many degrees, specified by an increment value. I can specify the arc range also, such as -45 to +45 degrees with an increment of 10 degrees. This would be done by using scanArea(&pan, -45, 45, 10). Servo data is defined in a data structure for each servo. The sensor readings are also stored in a structure that contains data for each sensor that is read. The scan readings are stored in an array, of up to 36 readings. This is enough storage for readings every 5 degrees of a 180 degree arc.

You can see the scanner in action on YouTube.

I’m going to be putting all of my SSC-32 routines into a library, so anyone who wants to use a BotBoarduino (Arduino) for robotics or other projects will be able to use them. I don’t know exactly when this will happen, because I am still adding to and testing my set of SSC-32 routines.

I got my Perma-Proto boards from Adafruit today! Now, I will be able to transfer the display and sensor circuit on W.A.L.T.E.R. now (on a regular breadboard) to a more permanent form. I won’t have to worry about jumper wires being pulled out anymore! I’m very excited to be able to finally start using these!

As soon as W.A.L.T.E.R.'s motor battery is charged up, I will start working on the motion routines that will allow him to move around on his own. I’ll be getting back to working with the RoboClaw 2x5 motor controller. I’ll disconnect the encoders for the first tests with it. Once these routines are working, I will connect the encoders up again and go from there.

Once I have all this working, and W.A.L.T.E.R. is able to move around on his own, I will switch over to using a Teensy 3.1 as the processor for his navigation subsystem. I already have a Teensy 3.1 mounted on a small breadboard, next to the large breadboard on W.A.L.T.E.R. The reason I want to switch to the Teensy 3.1 is it’s very small, faster, and has more dynamic memory than the Arduino Mega ADK board. I also just want to develop with the Teensy 3.1. :slight_smile: I know there is going to be some work to make everything I have work with the Teensy 3.1 because some of the Adafruit libraries (Gyro, Accelerometer, and Magnetometer) don’t give the same results as when running on a true blue Arduino board. I want to find out why, and make it work.

8-Dale

I’ve been tinkering with the RoboClaw 2x5 motor controller on W.A.L.T.E.R. and have not had any success with it. I have no idea what’s wrong, and I can’t get any responses from it, even using the examples that come with the RoboClaw library. I am about done messing with this controller, and it is causing me too much frustration. That is not a good thing!

8-Dale

I was just putting a tilt-pan on the SQ3 'bot for a Hero3+ camera. Need to machine a mount.
What are you driving your tilt-pan with?

Which robo claw are you using? I’d try some of the demo code available for it. Does it work at all? Can you run it from an R/C receiver?

Alan KM6VV

I’m using the SSC-32 for all servo control.

I already tried some of the demo code that comes with the RoboClaw library, and it’s not working. I can’t even read the version from the controller. It needs to work in Packet Serial mode, or it won’t work for me at all. This is a RoboClaw 2x5.

8-Dale

what are you driving the SSC-32 with?

Alan KM6VV

Arduino Mega ADK

EDIT: I just double checked my wiring and RoboClaw mode selection against the manual, and everything is correct. I think I have damaged the controller in some way, but I do not know how. It doesn’t seem to receive data at all now. The LED on the controller does not blink at all after it is turned on. I don’t even think it is getting initialized now.

8-Dale

This is really weird!

I don’t know what I did different when I was checking the RoboClaw mode and wiring, but it’s working now. I am getting data to and from the controller now.

I can read the RoboClaw version and other data now!

NOW, I can start developing the motion routines for W.A.L.T.E.R. 2.0! :smiley:

8-Dale

Maybe marginal battery/wiring. I had (working with the SSC-32) a 9V battery post a little rusted (long time in refrigerator). Even clean-up gave me some more intermittent instances. New batteries the next day.

Alan KM6VV

I have no idea what was different, but I don’t care as long as it works. :slight_smile: At least I know the controller is OK. I was worried I had damaged it, and these are not inexpensive (for me).

Now, I just have to figure out how to make the wheels move. I’m going to see if I can get some tips from the Orion code, and Kurt’s code.

8-Dale

Deleted message.

8-Dale

You quoted your self?

I’ve been tinkering with the RoboClaw 2x5 controller.

I just discovered that I have two bad motors and/or encoders on W.A.L.T.E.R.

I have been comparing my code with Kurt’s, and couldn’t figure out why my code was not making the motors go. Then, I wired the left motor wire to a different motor, and it worked. I did the same for the right motor, and it worked too. The test motor doesn’t have an encoder on it. I also have both encoders disconnected from the RoboClaw.

I have another motor here, and two brand new encoders, so I am going to see if I can attach the encoders to the motors. Then, if this works, I will replace the two motors on W.A.L.T.E.R. now.

I still got a bit of a buzz when I first saw my code driving a motor! :smiley:

I’m running with 7.2V motors now. Should I take this opportunity to switch to 12V motors and batteries?

8-Dale

12V motors are good, if you have the batteries and chargers to match. LM motors?

Yes, Lynxmotion motors.

I was just wondering if there is any real advantage to moving from 7.2V motors to 12V motors. I won’t move to the higher voltage unless there is a good reason to do it though. I’d have to buy a new 12V battery for new motors.

I ask because eventually, I will convert W.A.L.T.E.R. to a four motor configuration. I want to have all the motors be the same voltage, RPM, etc. If I am going to have to buy new motors, I want to buy all four at once.

There is a possibility I won’t have to buy new motors and encoders though. I have two more GHM-04 motors (one, which I used for testing) here, and a pair of brand new encoders (still in the plastic). If I can just find the other motor, and get the encoders put on them, I’ll be back in business.

I’m happy my RoboClaw 2x5 motor controller is working!

8-Dale

I like 24V motors for big robots, 12 for small robots. 7V is sometimes a little low for the H-bridges, depends on the parts.

Lynxmotion doesn’t have a 12V 50:1 motor, so I’ll stick with the GHM-04 motors I’ve got now and replace any I need to replace. The RoboClaw 2x5 seems to work with the 7.2V motors just fine so far, but I haven’t had a chance to do any real testing with them. W.A.L.T.E.R. 2.0 is my first robot build that uses motors.

I’m thinking seriously about just ordering four more of the GHM-04 motors plus four new encoders. I’ll test them all as soon as I get them. I’ll need all four motors for W.A.L.T.E.R. 3.0. :slight_smile:

I also want to get a BrickPi board for my Raspberry Pi.

8-Dale

I’m glad I still have the BotBoarduino mounted on W.A.L.T.E.R. I am going to have to remove the display and extra sensor handling from the Navigation sketch, if I want to continue to use the Arduino Mega ADK board (or another BotBoarduino) for navigation functions. Right now, there is too much going on in the main loop, and response time is not good enough to read the distance sensors often enough. A BotBoarduino will handle the displays and extra sensor functions - I’ve already had my Arduino Decimila running the display and sensor board before.

Once I switch W.A.L.T.E.R. over to using the Teensy 3.1, which is much faster, this may not be an issue. Only time will tell.

I will keep the current version of the navigation sketch, and just create a new version that is split in two parts. When I split the current navigation sketch, both parts should be small enough to run on BotBoarduinos. :slight_smile: The current sketch is only 41Kb of code.

8-Dale

I backed up all current versions of my navigation sketch, and created two new copies.

One is Navigation_Main for the Arduino Mega (and ADK), in the Walter20/MegaADK directory. This is still too big for a BotBoarduino, even after I stripped all the stuff that’s not needed out.

The second is Navigation_Sensors, in the Walter20/Arduino directory, which I may later rename to something like Sensors_Display. I haven’t stripped the stuff that’s not needed out of this one yet. It should be small enough to run on a BotBoarduino after I do that.

I have a Backup directory in the Walter20/Arduino and Walter20/MegaADK directories now, which has my original sketches.

I’ve updated my Walter20 repo with everything I’ve done, as of tonight. There is much more to do!

I’m planning to do hardware next, and work on transferring the display and sensor breadboard circuit over to a Perma-Proto board. This will require some planning, but it will also allow me to do some stuff I can’t easily do on a breadboard. For instance, I’ll be able to have pin headers for I2C and power connections.

8-Dale

I’ve got new battery packs for W.A.L.T.E.R., as well as standoffs to mount the Arduino Mega ADK board on the top deck. I tested my other two GHM-04 motors, and they worked fine before I mounted them on W.A.L.T.E.R. However, when they are on the robot, they do not work. I am not sure yet exactly what happened, but I am troubleshooting this problem now.

This is all that keeps W.A.L.T.E.R. from going fully mobile now.

I attached the two encoders to these motors myself, so I may have done something to mess things up. One of the encoder covers came off the motor, and I saw a brief arc at the wiring connection points. I don’t know if this damaged the motors or not, but neither of them work now. :frowning: If these motors are still good, it makes me wonder if the original motors are good or bad.

This is the first robot I have used motors instead of CR servos on, and it’s only my third robot build. As far as I can tell, the RoboClaw 2x5 motor controller is still working - it receives data, and does not give any indication of an error.

8-Dale

You can’t fry motors that easily. Encoders, yes. More likely the motor controller.

Alan KM6VV