Trim Controller

From Bearhawk
Revision as of 20:30, 12 December 2023 by Admin (talk | contribs)
Jump to navigation Jump to search

General notes

Idea for vendor to make the boards https://www.pcbway.com/

Trim system controller is based on this board:

https://www.rugged-circuits.com/microcontroller-boards/ruggeduino-smalls-tcrmx

Which has the same pinout of this board:

Uno.jpg

Power supply circuit:

ClipCapIt-220222-144720.PNG

We also need the following:

  • (1) DRV8871 Motor controller
  • (1) digital pot MCP4651 (not MCP[1|2]XX because those are SPI which needs more pins)

Inputs are:

ADC

  1. ADC for linear resistor 1
  2. ADC for linear resistor 2
  3. ADC 4 for i2c
  4. ADC 5 for i2c

Digital

  1. Encoder A
  2. Encoder B
  3. Trim up (both up/down goto neutral)
  4. Trim down (both up/down goto neutral)
  5. Trim up (both up/down goto neutral)
  6. Trim down (both up/down goto neutral)
  7. Motor IN 1
  8. motor IN 2
  9. motor driver A
  10. motor driver B
  11. 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

  1. 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:

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.