melair / ktane

Keep Talking and Nobody Explodes - Physical Edition
2 stars 1 forks source link

Respin ControlBoard PCB to revision B02 #8

Open melair opened 1 year ago

melair commented 1 year ago

Issues

The current A01 revision has the following issues:

  1. I2C is not available on any output port.
  2. SPI is only available on bomb ports B and C.
  3. DAC is only on port A, though this is unfixable without an analogue switch.
  4. It runs at 5V, could it run at 3.3V.
  5. ICSP interface is unreliable, LCD and ICSP share pin.
  6. LCD connectors are wasted on 75% of modules, 10 pins.
  7. We are unhappy with the 3.5mm TRRS connectors, can we move to RJ45 and a hub/edgework board.

Minor fixes.

  1. Need to migrate to magnetic buzzer.
  2. ICSP is labeled incorrectly as ISCP.
  3. Bomb ports being A-C is confusing with PIC ports being A-F. Could rename bomb ports to 0-2.

Approaches

One

We need I2C for the power supply module, the least effort approach is to scrap the dedicate LCD ports. This solves points 5 and 6. It can be replaced with another bomb port (D) which is supplied by PIC port C, which has I2C and SPI.

The LCD interface can be moved to a plug in module with a shift register, which can run in any bomb port with SPI. This also addresses point 2, as SPI would also now be available via bomb port D.

This is relatively light touch, although it does mean respinning all 10 bomb module control boards.

Two

We don't actually need a fourth bomb port, only Controller, Combination and Simon Says use two ports as it is. If we convert the LCD to a module then it will use the third bomb port on the Controller, other LCD modules would still have one free port. Edgework which would likely have an edgework IO module, audio module and SPI module, which would fill it - that seems reasonable.

There are 4 +5V and 4 GND pins on every bomb port, this is unneeded and was only done to make use of the pins. We could take SPI and I2C from PIC port C, and expose them on the lower row of pins, so rather than:

|VCC|VCC|VCC|VCC|GND|GND|GND|GND|

We could replace it with.

|VCC|I2C SCLK|I2C DAT|SPI CLK|SPI COPI|SPI CIPO||GND|

However this breaks compatibility with all of our plug in modules, some would be modifiable by cutting traces, but some like the SPI and Power boards would need larger rework.

If we introduce 3.3V and are respinning all boards, then:

|VBUS|V3,3|GND|I2C SCLK|I2C DAT|SPI CLK|SPI COPI|SPI CIPO|

ARGB can then move to the SPI peripheral properly, though we will need to switch the ARGB CLK pin with a chip select line if they are commoned (mosfet).

melair commented 1 year ago

One minor thought, if we rotate the plugs/sockets so the keying block will prevent old modules going in new ports, this will probably help us track/not break things. If we take option two.

melair commented 1 year ago

If we do this, then add a MOSFET for the SD card so that voltage can be turned off to the card, also add card detect if there are pins. As well as seperate INT for RTC/nf24.

melair commented 1 year ago

Moving away from the TRRS connector is an absolute requirement, the cables we currently use have a tiny guage, we're seeing a voltage drop of about 3.5Vdc at 5Vdc/800mA. We still need to identify how to handle the CAN bus termination and topology.

melair commented 1 year ago

The ARGB led SPI lines could be commoned with the other SPI bus by using a P-channel MOSFET on the CLK line headed to the ARGB led, with a pulldown to ground after it. This way the ARGB led would essentially have a /CS. It doesn't matter that the DAT line is pulsed.

Freeing up multiple pins potentially enables us to place an SD card on every main board for logging, or local resources. Freeing up space on the SPI module. We'd still need a p-channel fet on the 3.3V supply to the SD card though.

melair commented 1 year ago

Moving away from the TRRS connector presents a termination challenge. RJ45 or RJ11 (4/6) is enticing as it's easy to crimp our own cables, or in the case of RJ45 purchase 30cm cables premade.

We can either have two connectors on each control board, or have a hub board in each case. We could risk a star topology, which is likely to work given the lengths of our bus, though technically out of spec. Or we could have an in/out in the same RJ45 connector, and then the hub would have to chain them to avoid a star.

The TRRS connectors are really nice because they support self termination, if the plug is not present then a termination resistor is automatically connected.

With two connectors we could have a small microswitch to connect a termination resistor, allowing us to maintain a nice linear bus - or potentially switch a termination resistor in based upon presence of voltage or similar on pins in the RJ45, but this needs research.

melair commented 10 months ago

Todo for each module:

melair commented 10 months ago