Difference between revisions of "Moving Holonomic Robot"

From Lofaro Lab Wiki
Jump to: navigation, search
Line 5: Line 5:
 
The following pins are used on the Arduino Pro Mini:
 
The following pins are used on the Arduino Pro Mini:
  
   Pins (3,9,10) - PWMs for Motors 1, 2, and 3
+
   Pins (3,9,10) - PWMs for Motors 1, 2, and 3.
   Pins (11,12,13) - Direction control (through a NOT gate) for Motors 1, 2, and 3
+
   Pins (11,12,13) - Direction control (through a NOT gate) for Motors 1, 2, and 3.
 
   Pin RX1 - UART connected to TX from Pi (Note: 5V (Arduino) to 3V(Pi) voltage divider is needed to protect the Pi, since the Arduino RX1 is  
 
   Pin RX1 - UART connected to TX from Pi (Note: 5V (Arduino) to 3V(Pi) voltage divider is needed to protect the Pi, since the Arduino RX1 is  
             seen to be asserted to HIGH some of the times
+
             seen to be asserted to HIGH some of the times.
   Pin RAW - Unregulated voltage upto 12V (regulated to 5V using on board regulator)
+
   Pin RAW - Unregulated voltage upto 12V (regulated to 5V using on board regulator).
 +
 
 +
 
 +
UART_pi_move.ino - UART communication is as follows:
 +
 
 +
Pi -> Mini Pro
 +
          1) 1 or 2 or 3 [Wheel No.]
 +
          2) 5 or 6 [Wheel Dir.]
 +
          3) 0 - 255 [Duty cycle sent is converted from percent to be [0 - 255]]
 +
          4) Repeat for number of wheels (i.e 3)
 +
          5) sending 1 and then 8 at anytime triggers ASM RESET

Revision as of 01:39, 23 May 2016

Two file are needed to be able to move the Holonomic Robot. UART_pi_move.ino contains the state machine for UART communication with the Raspberry Pi Zero and it also has the code for generating the PWM signals for the three motors and setting their direction. key_move_UART.py contains the controller to be able to move the robot with a keyboard from the Pi zero.


Arduino Pro Mini The following pins are used on the Arduino Pro Mini:

  Pins (3,9,10) - PWMs for Motors 1, 2, and 3.
  Pins (11,12,13) - Direction control (through a NOT gate) for Motors 1, 2, and 3.
  Pin RX1 - UART connected to TX from Pi (Note: 5V (Arduino) to 3V(Pi) voltage divider is needed to protect the Pi, since the Arduino RX1 is 
            seen to be asserted to HIGH some of the times.
  Pin RAW - Unregulated voltage upto 12V (regulated to 5V using on board regulator).


UART_pi_move.ino - UART communication is as follows:

Pi -> Mini Pro

         1) 1 or 2 or 3 [Wheel No.]
         2) 5 or 6 [Wheel Dir.]
         3) 0 - 255 [Duty cycle sent is converted from percent to be [0 - 255]]
         4) Repeat for number of wheels (i.e 3)
         5) sending 1 and then 8 at anytime triggers ASM RESET