Community
OpenEnergyMonitor

OpenEnergyMonitor Community

How many free pins on emonTx Shield?

Tags: #<Tag:0x00007f68102b6c20> #<Tag:0x00007f68102b6b58> #<Tag:0x00007f68102b6a90>

Hello,
I want to measure the voltage of several batteries while using the Arduino for controlling some relais and running the energy monitor software.

Now I’m asking myself how many pins are left unused after mounting the emonTx-shield on the baseplate.

Edit:
I just read this in another forum:
“Shift registers are only one option you can use chips called port expanders connected either through the I2C or SPI buses on the arduino.
Typical of these would be the MCP23S17 and the MCP23017 - each give you 16 more input / output pins and you can connect eight easily and more with a it of trickery.”
(by Grumpy_Mike, https://forum.arduino.cc/index.php?topic=173357.0)
So are those I2C or SPI buses still free to use with the emonTx shield?

I read on the arduino-tutorial-site that by “Using a parallel to serial shift register you can collect information from 8 or more switches while only using 3 of the pins on your Arduino.”. Which is also a good option.

Are there some obivous and important pros and cons for either way?

Best regards

For clarification, I have changed the title of your post, as you seem to be considering only the emonTx Shield. (The emonTx and the emonTx Shield are quite different.)

The main source of information is https://wiki.openenergymonitor.org/index.php/EmonTx_Arduino_Shield#emonTx_Arduino_Shield
I suggest you look at the circuit diagram, which you can download from https://github.com/openenergymonitor/Hardware/tree/master/emontx-shield-smt

If you are not using the RFM12B/RFM69CW radio, then the pins used by that are available for other uses. If you are using the radio, then your choices are more limited.

You might also have another digital I/O pin available if you do not need the temperature sensors.

Are you using all the analogue inputs? AI0 - AI4 are in use for voltage and current, but by cutting the pcb tracks, unused ones could be made available for d.c. inputs.
(But I must caution you about the “common ground” danger when you make a direct metallic connection to another piece of equipment.)

You could also use an external multiplexer - controlled by spare digital outputs and feeding into AI5.