How to handle with insufficient pins with NANO


I want to connect both bluetooth HC-05 and Nrf24L01 modules to my arduino nano but these two modules require some pins in common like the D10, 11, 12 etc

The bluetooth module will be used for voice command (commanded with android "BT Voice Control for Arduino" app) and the Nrf24L01 will be used to communicate with another Nrf24L01 in another circuit.

I've attached an image of what I've got right now,

From this situation I only see two solutions, using transistors to change which module will be working at a time (but that would require the code to change depending on the module powered on) or use alternative pins.

If it is possible to use alternative pins which ones should I use?

(Software is Circuit Maker)

The HC-05 uses a serial interface, not SPI, so there should not be pins shared between the modules. Since Nano has only 1 hardware serial port the HC-05 could use a software serial port (pins depend on library chosen) and leave SPI for the RF24.

Hi groundFungus,

When you talk about using the SPI for the RF24 you mean using the ICSP headers to connect the RF24?

I'm sorry but I'm still newbie and I don't know much about coding yet

When you talk about using the SPI for the RF24 you mean using the ICSP headers to connect the RF24?

No, the schematics in your original post shows the RF24 connected to the SPI (bus) pins. The SPI bus uses pins 13, 12 and 11 for all devices connected to the bus. Also each device requires a chip select pin (and maybe additional pins for chip enable or whatnot). You could use the ICSP header if you wanted to, the pins go the the same places.

Got it!
So the RF24 is good to go, but how about the HC-05?
What pins do you recommend to use for the HC-05?

Any other. ecause like groundFungus said, it uses Serial to communicate. But the Nano only has one hardware serial interface and that's already connected to USB. So in order to keep that you need to use Software Serial and you can do that on any pin.

Okay understood, thank you both for giving-me a hand on this circuit!

Here is a good guide for using the RF24, it helped me a lot.

Nice, that guide sure will be handy, thanks! :slight_smile: