Difference between revisions of "Trim Controller"

From Bearhawk
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
== General notes ==
+
=Possible configurations=
  
Idea for vendor to make the boards
+
* Input pins: 24, 11, 23, 10
https://www.pcbway.com/
+
* Input pins with external pull up: 9, 22
  
Trim system controller is based on this board:
+
==Button combos==
  
https://www.rugged-circuits.com/microcontroller-boards/ruggeduino-smalls-tcrmx
+
===Single or dual elevator trim with neutral and trim wheel===
 +
* Pilot and co-pilot: UP pin 24
 +
* Pilot and co-pilot: Down pin 11
 +
* Pilot and co-pilot: Neutral pin 23
 +
* Trim wheel: pin 9 and 22
  
Which has the same pinout of this board:
+
===Single or dual elevator trim with neutral and trim wheel and speed sense===
 +
* Pilot and co-pilot: UP pin 24
 +
* Pilot and co-pilot: Down pin 11
 +
* Pilot and co-pilot: Neutral pin 23
 +
* Trim wheel: pin 9 and 22
 +
* Speed sensor: pin 10
  
[[File:uno.jpg|500px]]
+
===Single Elevator and Single rudder/aileron trim with neutral===
 +
* Pilot and co-pilot: UP pin 24
 +
* Pilot and co-pilot: Down pin 11
 +
* Pilot and co-pilot: Neutral pin 23
 +
* Pilot and co-pilot: Rudder or aileron up pin 9 (requires external pull up resistor)
 +
* Pilot and co-pilot: Rudder or aileron down pin 22 (requires external pull up resistor)
 +
* Pilot and co-pilot: Rudder or aileron neutral pin 10
  
Power supply circuit:
+
===Single Elevator with neutral and Single rudder/aileron with speed sense===
 +
* Pilot and co-pilot: UP pin 24
 +
* Pilot and co-pilot: Down pin 11
 +
* Pilot and co-pilot: Neutral pin 23
 +
* Pilot and co-pilot: Rudder or aileron up pin 9 (requires external pull up resistor)
 +
* Pilot and co-pilot: Rudder or aileron down pin 22 (requires external pull up resistor)
 +
* Speed sensor: pin 10
  
:[[File:ClipCapIt-220222-144720.PNG]]
+
===Fixed===
 
+
* Master warning: pin 21
We also need the following:
+
* Master caution: pin 8
 
+
* Autopilot input: pin 7 and 20
* (1) DRV8871 Motor controller
+
* Analog output for trim position: pin 6 and 19
* (1) digital pot MCP4651 (not MCP[1|2]XX because those are SPI which needs more pins)
+
* Trim A sense and power: pin 1, 14, 2, 15, and 16
 
+
* Trim B sense and power: pin 3, 4, 5, 17, and 18
Inputs are:
 
 
 
ADC
 
# ADC for linear resistor 1
 
# ADC for linear resistor 2
 
# ADC 4 for i2c
 
# ADC 5 for i2c
 
 
 
Digital
 
# Encoder A
 
# Encoder B
 
# Trim up (both up/down goto neutral)
 
# Trim down (both up/down goto neutral)
 
# Trim up (both up/down goto neutral)
 
# Trim down (both up/down goto neutral)
 
# Motor IN 1
 
# motor IN 2
 
# motor driver A
 
# motor driver B
 
# transistor for sinking current to discrete input.
 
 
 
== MCP4651 notes ==
 
 
 
Tie A0, A1, A2 to get the default first i2c address. 
 
 
 
This code can probably work with some changes. 
 
https://github.com/uChip/MCP4551/tree/master
 
 
 
Notice that the code sets the default address to 0x2E
 
#define MCP4551_DEFAULT_ADDRESS 0x2E // A0 is connected to GND
 
 
 
That won't work on the 2 pot 4651.  See this note in the datasheet:
 
 
 
:[[File:ClipCapIt-231212-202111.PNG]]
 
 
 
The default 4551 with A0 low is '0101 11`b + 0 where b is a 0 to make a byte so 0101110 or 0x2E.  With a 4651 with A0, A1, A2 all low, we should get 0101000 or 0x28.  As for writing to the second resistor array looks like the first 4 bits change.
 

Latest revision as of 20:12, 27 January 2024

Possible configurations

  • Input pins: 24, 11, 23, 10
  • Input pins with external pull up: 9, 22

Button combos

Single or dual elevator trim with neutral and trim wheel

  • Pilot and co-pilot: UP pin 24
  • Pilot and co-pilot: Down pin 11
  • Pilot and co-pilot: Neutral pin 23
  • Trim wheel: pin 9 and 22

Single or dual elevator trim with neutral and trim wheel and speed sense

  • Pilot and co-pilot: UP pin 24
  • Pilot and co-pilot: Down pin 11
  • Pilot and co-pilot: Neutral pin 23
  • Trim wheel: pin 9 and 22
  • Speed sensor: pin 10

Single Elevator and Single rudder/aileron trim with neutral

  • Pilot and co-pilot: UP pin 24
  • Pilot and co-pilot: Down pin 11
  • Pilot and co-pilot: Neutral pin 23
  • Pilot and co-pilot: Rudder or aileron up pin 9 (requires external pull up resistor)
  • Pilot and co-pilot: Rudder or aileron down pin 22 (requires external pull up resistor)
  • Pilot and co-pilot: Rudder or aileron neutral pin 10

Single Elevator with neutral and Single rudder/aileron with speed sense

  • Pilot and co-pilot: UP pin 24
  • Pilot and co-pilot: Down pin 11
  • Pilot and co-pilot: Neutral pin 23
  • Pilot and co-pilot: Rudder or aileron up pin 9 (requires external pull up resistor)
  • Pilot and co-pilot: Rudder or aileron down pin 22 (requires external pull up resistor)
  • Speed sensor: pin 10

Fixed

  • Master warning: pin 21
  • Master caution: pin 8
  • Autopilot input: pin 7 and 20
  • Analog output for trim position: pin 6 and 19
  • Trim A sense and power: pin 1, 14, 2, 15, and 16
  • Trim B sense and power: pin 3, 4, 5, 17, and 18