Today I mounted the Arduino that will be controlling the 2 motors and the motor shield. I mounted it to the inside of the front support wall so that I could have access to the ports for power and USB connections for programming when needed.

With the controller mounted, I ran the motor wires through a few wire ties and connected them up to the board for testing on the robot.

Once the final testing has been done and the motor controller programmed, I can shorten the wires a little and enclose them in protective casing and keep them tied out of the way. I anticipate mounting another board on this back plate and then most likely the batteries for the micro-controllers in this location as well, but there will have to be some testing on that idea as I get closer.

Once the board was mounted I connected a power supply up to the board (you can see the red/black wires running to the board power on the bottom of the board in the picture above) and then plugged in a USB cable to the board and ran some tests. The motors work just fine as the test motors did and the steering motor turns freely.
Then it hit me! The steering motor is a stepper motor, so it will turn just fine, but without some kind of switch to tell it when it has reached either the center, or the left/right extremes, how will it ever know how to get back or where it is starting from once the power is switched off and then back on? If you turn off the power to the stepper and leave it partly turned, then turn the power back on again, it will never know where it is starting from.
<sigh> Another issue I did not think of at the moment. I am kind of used to servo motors that know where they are and so you can tell them to turn right 90 or left 90 and then back to the center or 0 position and they will remember their location.
I will have to think up some way of mounting switches on this to make sure I know where it is positioned.
While that is happening, I am going to test the keypad and lights to see how I can control them. If you do not remember what those look like...here is a shot of the head again...

That keypad and those lights to the right of it need to be programmable for functions the robot has so I am off to think up how to make a key matrix and program that from the master micro-controller that will be inside this robot.
No comments:
Post a Comment