Maze »

Troubleshooting and FAQ

Tasks

edit SideBar

Some possible hardware problems:

  1. Make sure IR sensor is as close to ground as possible
  2. Wires are soldered with the hooks of the motor. Loose connections could result in the wheels not turning.

Problem: Wheels not turning even without the motor shield.

Solution: Connect the positive lead coming out of the motor to positive wire of the battery. Do the same with the negative lead. If the motor spins, the hardware is fine. If it does not spin, connect the leads from the battery directly to metal hooks on the motor. If they spin now, it probably means that there were soldering issues with the wires and the metal hook in the first case, and the wires need to be re-soldered. If the wheels still do not spin even while connecting the wires to the metal hook, try replacing the batteries and redoing the above process. If it still does not spin, there might be a hardware issue with the motor.

Problem: Now if the wheels spin normally but not with the motor shield on:

Solution: Check if the wires going into the motor shield are connected properly i.e the 4 wires from the motor firmly fit into their sockets and the positive and negative leads are in the right place i.e positive from battery goes into positive of motor shield and negative from battery goes into negative of motor shield. If this works, make sure the motor shield is the PWRIN mode and the VIN mode. Be sure to remember to power both the Arduino Board and the motor shield separately, unless the digital ports for VIN and GND are being used to power both at once. Then connect the arduino board to the adapter and see if the wheels turn. If they do, the batteries have probably died out. If they still do not, there is probably something wrong with the hardware.

Problem: Parts of the IR sensor still glowing even though clearly above a black line

Solution: Try lowering the IR sensor. Sometimes if the sensor is too far above the maze it cannot detect the color. If lowering the sensor does not help too. Go back to the code and check if the pins have been initialized correctly. If you are using the analog pins as digital pins, then make sure they are used as PINS 14,15,16 and 17 instead of 1,2,3, and 4. That could lead to the sensors not working properly. If all pins are initialized correctly and the sensor is low to the ground and sensor still does not respond, there could be an issue with the sensor itself.

Problem: Robot turns different angles on different days.

Solution: This is probably because the battery power is gradually decreasing. The way to fix would be change the turning conditions in the code and make them based on sensor readings and not motor power and delays. The robots will turn quicker with newer batteries, so if you have the code for turning 90 degrees, manually measured with the correct motor speed and delays, it may not work after a certain period of time when the batteries are run out and the wheels do not spin with the same speed for the same value. Ideally you would want to make turns based on sensor readings which are more or less constant.


Page last modified on August 31, 2012, visited times

Edit - History - Print - Recent Changes (All) - Search