Hello, I am attempting to connect a sensor to the Arduino with an external isolated power source. The communication of the sensor is through SPI. When I use an external power source, I cannot communicate with the Sensor, I receive an SPI Interface Failure Message. I was wondering if this is an issue with SPI or with the sensor. Sorry I am not very familiar with SPI communication protocols.
Thank
Are you sure it is SPI ?
The SPI bus is a few MHz and for chips nearby, not to communicate with a sensor via a cable.
If you connect the GND and the SPI signals (MOSI, MISO, clock, chip-select), and the voltage levels do match, then the external power source should make no difference.
Which Arduino board do you use ?
Is the sensor with 5V SPI signals ?
Did you connect the GND ?
Who gives you that SPI Interface Failure Message ?
Which sensor is it ?
Hi Peter,
I am using the Arduino Mega 2560 R3, and the component is an ArduCAM mini 5mp.
For the external power I am using a 9V battery through a 5V regulator and a 1000uf capacitor.
I connected the power to the camera both vcc and ground to the external power source, however, the Arduino power is coming from my Laptop.
I was thinking this was the issue because the Arduino power and camera power are different grounds so the SPI would not share a common ground but I am not sure.
The SPI failure comes from the default sensor code I was sent by ArduCAM.
Thanks
Arducam mini : http://www.arducam.com/tag/arducam-mini/
That is SPI. I hope the wires are not very long.
You must connect Arduino GND to camera GND, or else the SPI signals have no meaning.
A 9V battery is almost never a good power source. They can supply maybe 50mA to 200mA. The Arducam Mini 5MP requires 390mA.
A 7805 needs 100nF at input and output. If you don't have those, it might oscillate and the 1000uF will not prevent that.
You need a better power source for the camera. Is the 5V of the Arduino board not enough current ? Give it a try.
This is the library for the Arduino : GitHub - ArduCAM/Arduino: This is ArduCAM library for Arduino boards
I can't find the file that shows that error message, but I might be looking in the wrong files.
Thanks!
I was hoping that was not the case with the ground.
For the power issues, I just have too many items connected to the single mega.
I will just move some to a slave uno.
Thanks Again