Sensor with Custom Board - Photon & Electron

I am developing a custom board that ca take an Electron or a Photon. The board will be connected to a serial sensor.

If a Photon is plugged in, the sensor will be using SoftSerial pins on the Photon. If an Electron is plugged in, I plan to use Serial2. The reason is that Serial1 is already used.

My question is it OK to have traces going from the sensor RX/TX lines to both the soft pins AND the TX/RX on Serial2 or do I need to have a jumper to select one of the two paths?

Thanks in advance for the community’s input.

I suppose you’d rather want to use Serial4 (C2/C3) or Serial5 (C0/C1).

I’d suggest you use cut/solder jumpers. But as long you can ensure that the “SoftSer” pins are in Hi-Z when using the alternative HW interface, there should not be any issue either.

Thank you @ScruffR.

Will use Serial4 then. What does Hi-Z mean? How is this done?

Thanks again.

You could use a dual 2x1 analog switch/ multiplexer to control your paths. That would most likely ensure the unused paths are in a high- impedance (hi-z) state. You could control which path is used by using a couple of GPIO pins from the uC or use a pin header and jumper.

1 Like

As @ninjatill already said, it means high-impedance which means there won’t be any siginificant current go in or out of the GPIO. And the default mode of all GPIOs is exactly that, so when you don’t set pinMode() or use any library or HW interface on the respective pins at all or set it to INPUT the pins should be set to Hi-Z.

1 Like