Wednesday 26 October 2016

raspberry pi - control 3 status LEDs with 2 PCs


I'd like to control 3 status LEDs with two different PCs:



  • an OrangePI-PC, using the GPIO pins as power source (same pinout of a RPi2);

  • regular desktop PC, using the parallel port as power source.


Both PCs can be powered at the same time and shall share the same LEDs (there is no need to enforce a priority between them in case of conflict).


This is the wiring scheme i am thinking to use (sorry if it is a bit confusing, this is the first one i've made with fritzing):


scheme



My ideal solution should rely only on discrete component (diodes, resistors, etc.). I'd like to avoid using ICs, Arduinos, etc.


UPDATE: i've made the circuit and it works pretty well. I've also experimented with other interfaces, but in the end i've settled with the GPIO pins and the LPT port. Here it is the driving script in Python.



Answer



As mentioned, this is a simple diode OR bridge. It allows two sources to power a single circuit without back feeding each other. Prevents driving an output high when its own supply is off. Keep in mind that whichever has the higher voltage will be the actual source, but you already started that this is not an issue.


As you know, there must be a common ground between the two devices for this to work.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...