REGBOT version 3

From Rsewiki
(Difference between revisions)
Jump to: navigation, search
(Missing/bugs)
(Teensy pin assingnment)
Line 53: Line 53:
 
* 5 servo pin 3 (PWM) - og 2nd SPI CS pin (4) (see also teensy pin 24)
 
* 5 servo pin 3 (PWM) - og 2nd SPI CS pin (4) (see also teensy pin 24)
 
* 6 Start button
 
* 6 Start button
* 7 motor slew ctrl -> flyttes til motor enable D2
+
* 7 motor slew ctrl -> ny RX3 (ekstra seriel forbindelse)
* 8 motor right direction
+
* 8 motor           -> ny TX3 (ekstra seriel forbindelse)
* 9 motor right PWM -> flyttes til servo PWM (servo pin 4)
+
* 9 motor right PWM -> flyttes til servo PWM (servo pin 4) på hardware 3 -> pin 9 ny servo 2 PWM
* 10 motor right D2 enable - > flyttes til servo PWM (servo pin 6)
+
* 10 motor right D2 enable - > flyttes til servo PWM (servo pin 6) på hardware 3 -> pin 10 ny servo 3 PWM
* 11 SPI MOSI
+
* 11 SPI MOSI -> ny motor enable (D2) på hardware 3
* 12 SPI MOSI
+
* 12 SPI MOSI -> ny right motor direction
  
 
Vin side
 
Vin side
  
* 13 heart beat LED og SPI clock
+
* 13 heart beat LED og SPI clock -> ny: kun heart beat LED
 
* 14 (A0) IR dist 2
 
* 14 (A0) IR dist 2
 
* 15 (A1) IR dist 1
 
* 15 (A1) IR dist 1
 
* 16 I2C SCL
 
* 16 I2C SCL
 
* 17 I2C SDA
 
* 17 I2C SDA
* 18 Line sensor LED power (skal ikke også til servo pin)
+
* 18 Line sensor LED power
 
* 19 encoder left B
 
* 19 encoder left B
 
* 20 encoder left A
 
* 20 encoder left A
Line 76: Line 76:
 
End
 
End
  
* A14 (analog out) servo pin 5 (i/o, ikke PWM) - for switch in or signal out (mostly)
+
* A14 (analog out) servo pin 5 (i/o, ikke PWM) - for analog in or analog signal out
  
 
2nd row
 
2nd row
Line 94: Line 94:
 
* A20 line sensor pin 10
 
* A20 line sensor pin 10
  
* 24 SPI CE (SPI CS pin (pin 3))
+
* 24 SPI CE (SPI CS pin (pin 3)) -> ny digital I/O pin på servo block (hardware 3)
 
* 25 Line sensor LED HIGH
 
* 25 Line sensor LED HIGH
 
* 32 IR power on
 
* 32 IR power on

Revision as of 15:53, 1 November 2016

Contents

Aim

  • maintain frame,
  • Avoid too many satellite PCB's,
  • more powerfull 5V,
  • fix PCB errors on version 2,
  • new servo interface plug
  • battery saver - turn OFF if battery voltage is low.
  • battery saver - turn IR sensor off if not used.

Status and observations

  • Line sensor low power pin (Teensy pin 25) now working. Pin 25 set to output in main.cpp (line 125), and pulsed in main.cpp (line 425 and 466). Line estimate seems OK (after calibration) - line sensor calibration missing in regbot.ini.
  • IR sensor power control is OK. IR sensor calibration missing in regbot.ini.
  • Power off by "halt" and by too low battery voltage is OK, back on by "power" button in both cases OK. Power off (by halt), no USB, then power on by power button is OK.
  • wifi is OK, (partially - see bug below).
  • IMU interface OK
  • start button OK
  • servo implemented (333hz, 10 bit PWM control) - and tested - +/- 512 (unit is us) gives about 90 deg, +/- ~750 should give about 180 degree - (about 150 deg for a Savox servo). OK on hardware 3 (only).
  • current sensor OK - better filter capacitors should be used (impossible on hardware 2 - but functional with much noise)
  • motor control OK
  • start button OK
  • version 3 ready for production - with socket for cheaper motor controller.

Missing/bugs

Software robot side (Teensy)

  • control implement test of edge, wall and forward distance controllers - partially tested (velocity, heading, position and balance seems OK)
  • wifi - is OK after a reboot,but stops after a few minutes, if no wifi client is attached. Sometimes also if used.
  • AD converter for "servo" 4 and 5 (when not output pins) is not implemented, and should be available as continue condition in missions.

Software client side

  • Servo debug page is a mess with edit/apply/cancel, as most actions work instantaneously.
  • Tab order is a mess.
  • Help in control dialogue is missing - should refer to wiki page.

Teensy pin assingnment

GND side

  • 0 serial RX (wifi)
  • 1 serial TX (wifi)
  • 2 motor left direction
  • 3 motor left PWM
  • 4 motor left D2 enable -> flyttes til right motor PWM
  • 5 servo pin 3 (PWM) - og 2nd SPI CS pin (4) (see also teensy pin 24)
  • 6 Start button
  • 7 motor slew ctrl -> ny RX3 (ekstra seriel forbindelse)
  • 8 motor -> ny TX3 (ekstra seriel forbindelse)
  • 9 motor right PWM -> flyttes til servo PWM (servo pin 4) på hardware 3 -> pin 9 ny servo 2 PWM
  • 10 motor right D2 enable - > flyttes til servo PWM (servo pin 6) på hardware 3 -> pin 10 ny servo 3 PWM
  • 11 SPI MOSI -> ny motor enable (D2) på hardware 3
  • 12 SPI MOSI -> ny right motor direction

Vin side

  • 13 heart beat LED og SPI clock -> ny: kun heart beat LED
  • 14 (A0) IR dist 2
  • 15 (A1) IR dist 1
  • 16 I2C SCL
  • 17 I2C SDA
  • 18 Line sensor LED power
  • 19 encoder left B
  • 20 encoder left A
  • 21 encoder right B
  • 22 encoder right A
  • 23 (A9)battery voltage

End

  • A14 (analog out) servo pin 5 (i/o, ikke PWM) - for analog in or analog signal out

2nd row

  • A10 motor current left
  • A11 motor current right

button side

  • A12 line sensor pin 3
  • A13 line sensor pin 4
  • A15 line sensor pin 5
  • A16 line sensor pin 6
  • A17 line sensor pin 7
  • A18 line sensor pin 8
  • A19 line sensor pin 9
  • A20 line sensor pin 10
  • 24 SPI CE (SPI CS pin (pin 3)) -> ny digital I/O pin på servo block (hardware 3)
  • 25 Line sensor LED HIGH
  • 32 IR power on
  • 33 Robot power on

Message to-from regbot

PID control message

All controlls is formatted with 26 values, and looks like this example (balance)

cbal 1 -3 0 1 9999.99 1 0 1 1 1 0.029 0.001 0 1 1 1 0.1 5 1 0 1 0 1 1 1 99.99

The indivitual numbers are - after the controller keyword (here 'cbal'):

 1 cbal 1 // use (any part of controller)
 2     -3 // Kp
 3      0 1 9999.99 1 // integrator (use, tau, limit, (and_zero - not implemented))
 7      0 1 1 // lead forward (use, zero, pole)
 10     1 0.029 0.001 // lead backward (use, zero, pole)
 13     0 1 1 // pre-filt (use, zero, pole)
 16     1 0.1 5 1 // post integrator (use, tau, limit, and_zero)
 20     0 1 // feed forward (use, Kff)
 22     0 1 1 // feed forward pole-zero (use zero pole)
 25     1 99.99 // output limit (use, limit)
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox