GenBoard/VerThree input channels
We need a lot of inputs if we wish to integrate lots of functions. 1-wire daughterboard might be a solution but GenBoard/VerThree has some unused pins which are used as digital inputs.
Easy connection and configuration of these input pins is IMPORTANT!
I think we can activate the AVR's pullup resistor on the specific pin (if it's an AVR pin), and connect a simple switch between this pin and ground. Activated state means that pin is grounded (on logic level 0).
Functions that require input channel
These 2-state simple inputs are needed for some driver-controllable functions. For example:
- AntiLagSystem (on/off switch on dashboard)
- NitrousController (on/off switch on dashboard)
- LaunchControl? (on/off switch on dashboard and another for the clutch sensor)
- The number of the usable inputs of the AVR is very limited (GenBoard/VerThree only has about 2 times more inputs than required to run an engine injection and ignition, while it has 5x more outputs. Maybe changing in 4.x? )
- Also if you wish to use some of them, (in 3.x) you need to use wires to the connector outputs in the box.
- Also you must specify your own wiring standard to the EconoSeal? III connectors.
MembersPage/RobertOffner came up with the idea of several digital inputs with a simple shift-register read via SPI (standard genboard feature).
Use two 4021 Shift Register.
A define used in my_make so you can search for "SHIFTREGISTER" to view all related code;
On LCD page 08 you can see the Status of the Inputs. The SCK line MUST BE INVERTED otherwise it will not work but further testing (maybe with the latest code) is necsessary.
EC pin candidates
Fortunately, the number of connector pins is far enough, because most people doesn't use
- 8 injector channels and
- 8 coil channel power outputs
- secondary WBO2 pins (nernst is a natural input signal)
- stepper outputs seems also good choice
if you don't want to use them for their original function.
You could use the
- currently unassigned pin 14 and pin 15 on the EC18 connector at first see (we usually use it for RS232 TX, RX).
available signals on the board
I've found only the following pins to use as digital inputs:
- SCL (PD0) - on JP1 connector
- SDA (PD1) - on JP1 connector (current default for AntiLagSystem)
and, if you always prefer the BootLoader instead of ISP cable, you can use (on JP_ISPI connector):
- SS (PB0)
- SCK (PB1)
- MOSI (PB2)
- MISO (PB3)
- 8 inputs from MCP3208 (max 12 bit ADC, but usable for digital input as well). Some of them even has pullup. Some are available on the EC18. Some are easy to make very sensitive (a few mV), or differential input or both (with midOPA)
Any other possible pins?
- Which pins is the input channels 0-7, that you can choose in the new MT (1.0.53) fore ALS, Launch Controle and shift-cut settings?
- Check [product] in webshop for the EC18 availability of mcp3208 channels depending on product options (internal MAP, auditrigger and 1-wire)
- If you assembled yourself, check the assembly notes.
- take care with these unprotected inputs, anything outside the 0..5V range will kill the MCP3208 chip. Besides the pullup resistor (eg 10k to +5V) you might want to apply a 5.1V zener (or 2 protecting diodes, 1 to GND and other to +5V). Anyway, keep 12V far away !
One way to do it would be to get the 1wire thing working. Or SLCAN (using UARTs in bus, with the CAN transceivers).
Then an infinite number of inputs could be added. Saves a lot of wires.
One often needs 1-2 more switches for something odd the owner dreams up. Launch control (could be triggered from the VSS sensor), water injection pressure input, nitrous pressure/temp sensors, high boost switch, boost knob (adjustable), race gas switch, clutch switch are all inputs I've been asked for.