Week 11

This week started with one meeting with professor Miguel Oliveira.

During the meeting some ideas were discussed, and some work was pointed out:

  • Make an URDF/XACRO file to define the platform.
  • Introdution to the ROS packages to the camera and pan and tilt unit (these packages algo have the URDF files to integrate in the robot).
  • Discussions about the platform architecture.

The URDF/XACRO file was made and integrated in rviz and gazebo, where is possible to send commands and see the platform moving in the simulation. Despite this part is partially implemented, is still necessary more time to fully understand it’s concepts.

The Arduino Micro ordered previously was installed and the code was downloaded to collect and transfer the encoder data to ROS.  This part is work, witch means the data is being transfered, but the encoder signal is not good. Despite the bad encoder signal, to test this part of the code, was not necessary a perfect wave.

Also, the work of writing the thesis was carried out, as it’s expected to be continued regularly in the next weeks.

Advertisements

Week 10

The work of the previous week was carried out during this one:

  • The skeleton of the thesis was improved and some pictures, tables and diagrams were introduced in the Latex template;
  • The code was also improved: timer interrupts were conflicting with PWM pins and therefore the timer was integrated with PWM; also the I2C code was changed to transfer only two integers via I2C, instead of a string (the code had some changes because it can only be transmitted one byte at once).
  • A new Arduino Micro was ordered and a new PCB (with sockets to facilitate the replacement) was made to integrate the Arduino when it arrives (Figure below);
  • Some tests were perfomed with the remote control. The ROS tutorial to control the turtle bot with the remote control was made.

Week 9

This week was dedicated to the following tasks:

  • Design of electric schematics that match what’s connected at this point;
  • Elaboration of the thesis skeleton (main chapters and sections) and template in Latex;
  • Interconnection of all developed code that was implemented separately. In this stage was detected that some code could not be combined together

The next step is to implement the PID control, but this stage was not performed because an Arduino Micro malfunction was the detected. The board cannot communicate via I2C, everything else works, except the I2C pins SDA and SCL. The board needs to be replaced.

Week 8

This week was dedicated to solve the DC drives problem.

The problem is that the driver has a PCB (designed by Robosoft and not the DC Drive manufacturer) and it works in a different way: 1 single analog continuous signal from -5V to 5V allows to control the motor speed and direction. Because of this, a circuit had to be designed  to convert the PWM signal from the Arduino Leonardo to a type of signal explained before.

The circuit schematic can be observed in the picture below.

level_shifter_sch

Additionally, the circuit was implemented, tested and mounted in prototype PCB.

Week 7

In the beginning of this week has been set a goal: finish the hardware. This means finish all the connections, install the Arduinos, the back LED status panel and fix everything up.

The first task was to project a way to fix the used eletronic. It was drawn, in SolidWorks, a board that could fit in the rack mount. Some holes and space was left to fix the Arduinos and to pass to cables. The used material was polycarbonate (similar to acrylic). This design can be watched further in this post.

After that, the goal was to make the board to put the Arduino Micro to receive the encoder signals. As you can see in the picture below, screw connectors were used to make the connections.

placa_ArdMicro

Another detail is the existing socket, witch will be used to place capacitors to filter the signals from the encoders.

After mount the Arduino Micro, the rest was assembled and tested in the mean time:

Montagem_arduinos_vista1

Arduinos and relay module installed with connections.

Montagem_arduinos_vista2

In this picture it is possible to observer the pan/tilt unit installed.

The next step was to connect the LED status panel to the main circuit, and make the emergency button disable the DC drives power and the ON/OFF disable the DC power supplies (DC/DC converters).

montageem_traseira.jpg

After the assembly the following items were successfully tested:

  • Status LED’s : 5, 12 and 48V;
  • Emergency button;
  • ON/OFF button;
  • Read encoder data and transmit it via I2C;
  • Data transmission via Ethernet to ROS;
  • Actuate motors (the motors can be actuated but not as desired)

Despite that, a major problems persists, the motors are not rotating both ways. There is a problem with the PWM signals to the DC drive that could not be solved yet.

 

Week 6

The week has started well, the new Arduino Micro was already available in the lab so the development was carried out on the new board, meaning the Arduino Uno was left behind. After having the SPI communication established between the Arduinos, this part was merged with the code of the TCP/IP communication to ROS.

While doing this a new problem came across that was not detected previously: the SPI pins are used to the TCP/IP communication, witch means both parts can’t be merged!

Knowing that, a new protocol was used: I2C. It is a little bit slower than SPI, but has the advantage of connect multiple devices easily.

This protocol was implemented successfully with encapsulated messages (with special characters in the beginning and end), witch means the message can vary in length and still be recognized properly.

Note that the same method was used with the Ethernet communication between ROS and Arduino Leonardo ETH to prevent errors and make the data transmission more reliable.

Status Panel

On the rear of the vehicle there was a status panel giving information about the Robuter’s signals. On the picture below this can be observed.

On this rear part the following tasks took place:

  • Removing the existent ultrasound sensors;
  • Pinout the DB25 connector to match the wires to the PCB connection;
  • Add roofmate to give resistance to the rear part. This way can absorb some unexpected impact;
  • Study and alter the circuit to the new requirements;
  • Extend the wires from the main connector and solder some resistors.

The improvements can be observed in the next pictures

Week 5

The batteries are already connected. It’s visible in the picture that the cables are longer than needed, but this way each battery car can be take separately without disconnect anything. The final arrangement was the series of the 4 batteries, resulting in 48V.

baterias

Additional wires were made to charge the batteries from the rear of the vehicle. To power the robot, the 48V terminals were soldered to a main connector on the bottom of the battery support.

Read encoder data

After establishing connection between ROS and the Arduino Leonardo ETH in the previous week, a new goal was put in place: use an external chip to count the encoder pulses, communicate with the Arduino Leonardo ETH and display the values in ROS.

The first test was made with an Arduino Uno reading the data using interrupts to count the pulses and transmit it via SPI. Several ways of transmission were tested in order to simplify/reduce the amount of transmitted data.

When implementing the temporary setup, the necessary specifications were identified and the Arduino board was selected: Arduino Micro. It has 5 interrupt pins, I2C, SPI and a 16Mhz crystal witch are enough specs to solve the needed problem.

arduino_micro