I'd like to connect a Raspberry Pi A+ with an Arduino leonardo. I'd like the rapsi to be able to upload HID sketches on the arduino.Then I'd like the arduino to run the sketch over the USB interface which is connected to a laptop for example. Is it possible?
The i2c connection seems to be easy to make: only 3 wires to plug. However I'd like to know if a single power supply was possible? For example only the raspi or only the Leonardo. I planned to provide energy to my raspi and plug a single wire between the two +5V of the devices. I read it could work but it was not safe at all. Is there a simple and safe way to proceed ?
-
\$\begingroup\$ I don't understand your question. I think it might be a bad translation. What do you mean by "alimentation"? \$\endgroup\$Scott Seidman– Scott Seidman2015年04月07日 15:04:15 +00:00Commented Apr 7, 2015 at 15:04
-
\$\begingroup\$ Generally the word "alimentation" seems to mean "charger" or "charging connection". \$\endgroup\$David– David2015年04月07日 15:06:05 +00:00Commented Apr 7, 2015 at 15:06
-
\$\begingroup\$ Yep, sorry, I fixed it. I meant charging connection! \$\endgroup\$lolive– lolive2015年04月07日 15:10:28 +00:00Commented Apr 7, 2015 at 15:10
1 Answer 1
Yes, there is a safe and simple way to proceed.
The Arduino can be powered from a +5V source (connected to the 5V) pin. The schematic allows for both 5V from the Arduino's voltage regulator or 5V from an external source (like from USB) with protection for the LDO. So you can supply unregulated power to the RaspberryPi and use it's regulated 5V to power the Arduino.
If doing this, I'd suggest powering the RaspberryPi with a source> 5V. From what I've seen the RaspberryPi's voltage regulator can supply up to 1A of current. This will be shared between the RaspberryPi and the Arduino. So, you'd need to keep an eye on your design to ensure the overall current consumption stays below 1A.
-
-
\$\begingroup\$ Yes, that's fine. The page on the Leonardo even explicitly says you can supply regulated 5V through that pin: arduino.cc/en/Main/ArduinoBoardLeonardo \$\endgroup\$iheanyi– iheanyi2015年04月08日 15:44:25 +00:00Commented Apr 8, 2015 at 15:44
-
\$\begingroup\$ A sub-question : Is it possible to link the Arduino to a computer through the USB in the described configuration? I can't find a clear answer... \$\endgroup\$lolive– lolive2015年04月10日 08:48:32 +00:00Commented Apr 10, 2015 at 8:48
-
\$\begingroup\$ Yes, you can safely connect the Arduino USB to a computer while supplying power via the 5V pin. \$\endgroup\$iheanyi– iheanyi2015年04月13日 21:05:05 +00:00Commented Apr 13, 2015 at 21:05