andrejmoltok Posted September 15, 2017 Posted September 15, 2017 I have an issue with armbian installed oPI PC+. I have it in a case with a cooling fan installed and connected to 2 GPIO pins. My question is: could the cooling fan connection be the cause for my oPI PC+ won't shut down from the power supply and keeps running in the background after i shut down armbian? Any suggestions, I haven't tried starting without the cooling fan yet.
martinayotte Posted September 15, 2017 Posted September 15, 2017 A Fan cannot be attached directly to GPIO, especially between 2 GPIOs ! You need some transistor/MOSFET driver and drive it in Sink mode with a single GPIO and other wire directly on PSU.
andrejmoltok Posted September 15, 2017 Author Posted September 15, 2017 10 minutes ago, martinayotte said: A Fan cannot be attached directly to GPIO, especially between 2 GPIOs ! You need some transistor/MOSFET driver and drive it in Sink mode with a single GPIO and other wire directly on PSU. Here's the proof how it connected to the GPIO pins: but maybe I have found the solution myself here -> Shutdown Button See the pictures below.
martinayotte Posted September 15, 2017 Posted September 15, 2017 2 hours ago, andrejmoltok said: Here's the proof how it connected to the GPIO pins Those 2 pins are not GPIO, but GND and 5V, so the fan continuously running ... If you wish to control the fan with gpio, take a look at this schematic, and add the GPIO control in shutdown scripts.
andrejmoltok Posted September 16, 2017 Author Posted September 16, 2017 Thank you for this schematic, but one thing still isn't clear, how am I supposed to connect this and how to add into scripts? The GND should remain as it is now? and the 5v should be connected to pin17? Don't really understand this? Where do i need to put those 2 resistors? Those resistors how strong should be? So, probably this is why my oPI won't shutdown completely, because it continuously gets power, right?
martinayotte Posted September 16, 2017 Posted September 16, 2017 9 hours ago, andrejmoltok said: why my oPI won't shutdown completely, because it continuously gets power, right? There is no power switch on those board ! When you do "shutdown" command, it bring the kernel in idle state, but the power supply is never disconnected. 9 hours ago, andrejmoltok said: 5v should be connected to pin17? Don't really understand this? I think you don't understand the above schematic ... It is describing a power switch for the fan itself : R1 should be around 10K, it is there to make sure that when GPIO17 (17 is only an example, it could be any other GPIO) is left floating the MOSFET is turned OFF. If GPIO17 is HIGH (thru R2, which can be around 1K), the Gate of the MOSFET will be HIGH, therefore it will be turned ON, providing GND to the fan, so the fan will spin. 9 hours ago, andrejmoltok said: how to add into scripts You can, for example, add commands to turn GPIO to LOW or floating as input to /etc/init.d/halt script.
andrejmoltok Posted October 8, 2017 Author Posted October 8, 2017 Does this switch necessarily need to be a hardware switch? Is it by all means programmable inside the Pi PC+, to make it a software switch of some kind? Or I am knocking on walls instead of doors?!
martinayotte Posted October 8, 2017 Posted October 8, 2017 What do you mean ? As I said previously, the OrangePiPC still has power connected to it, even after shutdown. If you really wish to have it disconnected, you need the same kind of circuit shown above along with proper gate control.
Recommended Posts