Changes between Initial Version and Version 1 of PiBotHat


Ignore:
Timestamp:
Aug 21, 2016, 3:46:14 PM (9 years ago)
Author:
David Albert
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PiBotHat

    v1 v1  
     1Raspberry Pi computers are powerful and inexpensive, but require additional hardware to connect to robot sensors and actuators.  In Pi parlance, an auxiliary circuit board that plugs onto the Pi 40-pin expansion connector is called a 'hat'.  The PiBot Hat is designed to make it easy to connect motors, sensors, and other peripherals to a Raspberry Pi.  It provides:
     2* switching power supply to allow the Pi to run from battery power
     3* voltage level converters to allow the 3.3v Pi to interface with common 5v sensors and controllers.
     4* a dedicated PWM controller to offload the work of fine motor speed/position control from the Pi
     5
     6'''OVERVIEW'''
     7This PiBot hat allows any Raspberry Pi or compatible to serve as a robot controller.  The footprint is identical to the Pi Zero and mounting holes are included to allow mounting to a Pi Zero with standoffs.  The hat includes:
     8
     9    A switch-mode power supply that will accept +6v to +24v battery input and generate the +5v required by the Pi.  Overcurrent protection is provided (but it is not protected against reverse polarity...maybe next spin...please be careful and observe the polarity markings on the battery connector!)
     10    Active level shifters adapt the +3v3 input/output levels required by the Pi to the +5v input/output levels required by many sensor and controller modules.
     11    A multi-channel PWM generator that will allow the Pi to control up to 5 motors (DC motor controllers or servo motors)
     12
     13Like the roboRIO, connectors are provided that allow many devices to be connected with a single cable that provides both power and signal connections.  Two level-shifter ICs and two transistors shift voltages between the 3v3 used by the Pi and the 5v required by most of the modules.
     14Connectors are provided for:
     15
     16    2x DC motor controller (nominally the L298N dual motor controller but can use any)
     17    9 degrees of freedom (9DOF) sensor: accelerometer, gyroscope, magnetometer
     18    Ultrasonic rangefinder
     19    3x servo motors
     20    2x wheel encoders (or can be used for general-purpose I/O)
     21    2x digital I/O
     22
     23'''PWM'''
     24Because the Pi has very limited PWM capability, the PWM outputs are generated by an NXP PCA9685.  There are two PWM outputs for the DC drive motors and 3 PWM outputs to control servo motors.  Servo1 is expected to control a small servo motor that pans the ultrasonic sensor and camera.  Servo 2 and 3 are available to control other motors.
     25
     26    * http://www.nxp.com/products/power-management/lighting-driver-and-controller-ics/i2c-led-display-control/16-channel-12-bit-pwm-fm-plus-ic-bus-led-controller:PCA9685
     27
     28    * All address pins are grounded (0) so address is 1000000x  or 0x80 and 0x81; it also will respond to 0xE0 (All call address) and 0x06 (software reset).  Note that the low bit is for r/*w  (1=read, 0=write).  For more details see the device datasheet.
     29
     30'''Connector Pin-outs'''
     31
     32    * Black 5-pin EXP expansion
     33
     34        * +5v
     35        * SDA (level shifted to 5v)
     36        * SCL (level shifted to 5v)
     37        * +3v3
     38        * GND
     39
     40    * Red 6-pin motor controller - designed to mate with the L298N dual DC motor controller
     41        * PWM1
     42        * DIO24 (GPIO24 level shifted to 5v)
     43        * DIO22 (GPIO22 level shifted to 5v)
     44        * DIO18 (GPIO18 level shifted to 5v)
     45        * DIO17 (GPIO17 level shifted to 5v)
     46        * PWM0
     47
     48        * Note that the motor control interface can also drive 2x high-current motor controllers such as Talon SR or Spark using standard PWM cables.  Connect the PWM cables with the white wires on the outside pins (1,6) and configure as follows:
     49            * Motor 1: white (signal) to PWM0, red (+5v) to DIO17, black to DIO18
     50            * Motor 2: white (signal) to PWM1, red (+5v) to DIO24, black to DIO22
     51            * Drive DIO17 and DIO24 high to provide +5v reference
     52            * Drive DIO18 and DIO22 low to provide ground return/reference
     53
     54    * White 4-pin 9DOF
     55        * +3v3
     56        * GND
     57        * SCL (3v3 levels)
     58        * SDA (3v3 levels)
     59
     60    * Blue 4-pin Ultrasonic
     61        * +5v
     62        * Trigger/DIO23 (GPIO23 level shifted to 5v)
     63        * Echo/DIO27 (GPIO27 level shifted to 5v)
     64        * GND
     65
     66    * Red 3-pin Servo motor 1
     67        * PWM2
     68        * +5v or +6v (see servo power jumper)
     69        * GND
     70
     71    * Black 3-pin (2x) servo motors 2,3
     72        * PWM3 for servo 2, PWM4 for servo 3
     73        * +5v or +6v (see servo power jumper)
     74        * GND
     75
     76    * White 3-pin Left-wheel encoder
     77        * DIO5 (GPIO25 level shifted to 5v)
     78        * GND
     79        * +5v
     80
     81    * Blue 3-pin Right-wheel encoder
     82        * DIO12 (GIO12 level shifted to 5v)
     83        * GND
     84        * +5v
     85
     86    * Yellow 3-pin (2x) digital I/O 1,2
     87        * DIO6/GPIO6 for DIO1 connector, DIO13/GPIO13 for DIO2 connector
     88        * +5v
     89        * GND
     90
     91    * Black 2-pin: battery/power
     92        * +6-24vdc
     93        * GND
     94
     95    * Black 3-pin Servo Power
     96        * Jumper pins 1-2 for the PiBot Hat to supply 5v to the servo motors
     97        * For higher power servo motors, remove jumper and connect external +6v power to pin 2 and ground return to pin 3.
     98
     99        * +5v supplied by PiBotHat
     100        * Vout to Servo motors
     101        * GND
     102