WiShield problems
by Nerudin
on Thursday, 31 December 2009,
Ok so I am still having problems with this WiShield. I am finding it really difficult to get it to control functions uploaded on the Arduino. One of the problems is that when my two codes (one for controlling the Servos and one is for the WiShield to work and serve a page to the computer) are merged, the WiShield doesnt work and the LED turns off. I asked for help on why this was happening at the official forums, but they couldn't really help me as they did not know why.
Servo Problems
by Nerudin
on Thursday, 24 December 2009,
I have been having some problems with the movements of the robot. It seems that the two Servo motors which control the movemements of the robot aren't doing what they are supposed to do. The code I sent/uploaded to the Arduino, is meant to make the robot move in a way close to the figure 8, but all it's currently able to do, is to spin left and right in an endless loop. This is similar to what was happening with my first prototype where I was using the MotorShield and the two DC motors. At the time I thought it was a problem with my code, but it turned out that it was infact a problem to do with the Servos not being calibrated.
There are two different types of Servo motors, Regular Servos and 360Servos. 360Servos, as the name suggests, can rotate 360 degrees in either direction. Every 360Servo has something called a 'Centre Value', this value stores the the 'Neutral' position of the Servo. This position is the point where the Servo has the exact same amount of potential rotation in both the clockwise and anticlockwise directions. The value for this point can differ in all Servos, therefore a proper calibration is required to identify the exact 'Neutral' value.
I conducted some research into how to calibrate the Servos, and I discovered two ways to do it. Calibrating the Servos can be done manually, which involves manually rotating the arms of a Servo in one direction until it stops making note, then doing the same going in the opposite direction until it stops.
The other method to calibrate the Servo is automatic. Automatic in the sense that you can use dedicated applications to do the calibration, some are free, some you have to purchase. I was able to get my hands on a free one, but unfortunately it didn't work for me. In the end I was able to use the Serial monitor on the Arduino IDE so that I could send commands/serial data to the Arduino. The Serial Monitor is able to connect and send the serial data to the Arduino at a rate of 19200bps (short for 'Bits Per Second'). The 19200 bps or Baud rate, is the rate in which to transfer data to the Arduino.
With the Serial Monitor I was able to send commands to the Arduino to rotate the Servos. To do this, you have to send commands using the Serial Monitor by typing, e.g. SXX (XX = numerical value) and clicking 'Send'. 'S' is a delimiter and the 'XX' numerical value is the angle of rotation to send to the Servo. The 'Neutral' point can be found by sending the command e.g. s89, s90, s91, s92 and so on and so forth, until the servo stops moving. Each of the Servos have to be calibrated this way seperately, i.e. connected to the Arduino one at a time. My two Servo 'Neutral' points turned out to be at s87.
And that was it, my Servo problems were no more.
WiShield + MotorShield pin conflict
by Nerudin
on Thursday, 10 December 2009,
I finally received the WiShield couple of days ago. I have been trying to get it working with everything, i.e. the Arduino and the Motors/Motorshield with not much luck. The way the WiShield works is, it needs to be connected onto the Arduino, Pins 09, 10, 11, 12 and 13 to be precise. Comparing this to the MotorShield, I was able to discover that it requires several of the same pins also required for the WiShield, and because of this, pin conflict occurs on the Arduino.
I have researched into this issue, and have discovered that there isn't really any way of solving it other than getting rid of one of the components causing the conflict. I did find another device called 'Extender Shield', which gave me some hope for a little while, as it was adverticed that it would allow multiple shields to be connected to the Arduino. I found from the makers blog, that all it does is replicate the pins on the Arduino, and does not really solve conflicting pins, which is strange and contradicts what they advertise.
In the end I decided to discard of the MotorShield, which meant that I would be unable to use my current DC motor wheels as they draw too much current if connected to the Arduino without using a MotorShield. It is reported that doing this might cause severe damage to the Arduino controller. As a result, I decided to use Servo motors instead, which are pretty much no different to the DC motors. I also had to change the robot base because the Servo and the wheels that came with the Motors require a bigger space to be fitted. This is the Base/chassis that I am using now -----------
As you can see it comes with a Breadboard, which is needed to build the circuit connecting the Servos and the battery to the Arduino controller. Here is the Circuit required-- ----
For powering everything, the Arduino can only generate 5v of power, which isn't enough for two Servo motors. Therefore to power the Servos I am using 4, 1.5v AAA batteries, which in total give 6v of current needed for two Servos.
and the Arduino can either be powered using an external wired powersupply, a USB cable connected to a PC or a 9v battery. I will be using a 9v battery as I don't want to restrict the robots mobility. The 9v battery can be connected to the Arduino using a 2.1mm DC plug with a 9v battery clip.