Tinker Board Forum

Full Version: Using GPIO pin output LOW state as ground
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
As the title, I have this idea, admittedly sounds crazy, to use GPIO pins as switch instead of using an external transistor. So I thought I will connect the 3V3 to one output pin in LOW state to prevent current flowing to external circuit and when I set the output pin to HIGH state, the current from 3V3 pin will flow to some outside circuit, in my case DC-DC booster module. 

So the questions are will I damage anything in doing so (CPU, GPIO pins, etc...) and will such a setup would work? If it is feasible to do, what is the limiting current before I destroy my GPIO?

Thanks.

P.S. This maybe bad practice I understand. But I was just thinking of a way to do away the transistor and resistor.
GPIO are designed also as switches. There are specs to observe. I presume that the maximum load as drain or sink must not exceed 12 mA. Also to limit the number of pins as such level of load. I don't have the details, but by a rule of thumb I'd suggest to load no more than 8 pins.
Take a good care that the voltage don't exceed the nominal value of 3.3 (perhaps 3.6 allowed). Also avoid inductive loads, to prevent big spikes to destroy the GPIO.

For further details you may consult this even is not TB related, or this, but I find hard to determine how much is the total power dissipation or a mention of current capabilities.
I'd suppose that a protection will intervene when the head will be at risk, so if you have an overload then it will dropped to none. Therefore I advise to use an appropriate interface which mostly won't be power hungry, so the rest of your circuitry will remain safe.
(11-02-2018, 04:31 AM)turtlens96 Wrote: [ -> ]As the title, I have this idea, admittedly sounds crazy, to use GPIO pins as switch instead of using an external transistor. So I thought I will connect the 3V3 to one output pin in LOW state to prevent current flowing to external circuit and when I set the output pin to HIGH state, the current from 3V3 pin will flow to some outside circuit, in my case DC-DC booster module. 

So the questions are will I damage anything in doing so (CPU, GPIO pins, etc...) and will such a setup would work? If it is feasible to do, what is the limiting current before I destroy my GPIO?

Thanks.

P.S. This maybe bad practice I understand. But I was just thinking of a way to do away the transistor and resistor.
Hi turtlens96, could you explain exactly which dc/dc booster and for what you are using?
If your DC/DC booster takes more than some mA, I doubt you can do it.
If you need something like this Adafruit PowerBoost https://www.adafruit.com/product/2030 I can recommend. It has an Enable input that can be controlled by gpio, forced to low the output is switched off.
Surely you can find something similar much cheaper.
(11-02-2018, 12:25 PM)lobo Wrote: [ -> ]Hi turtlens96, could you explain exactly which dc/dc booster and for what you are using?
If your DC/DC booster takes more than some mA, I doubt you can do it.
If you need something like this Adafruit PowerBoost https://www.adafruit.com/product/2030 I can recommend. It has an Enable input that can be controlled by gpio, forced to low the output is switched off.
Surely you can find something similar much cheaper.

Hello lobo,

The booster I'm using this XL6009 DC-DC Step-up Converter (https://artofcircuits.com/product/xl6009...ut-current) to generate voltage for muscle stimulation. I am able to source out ~50V using the 3V3 yellow pin. Now I just need to find out how can I control this  Smile .
Hello turtlens96, as I saw the datasheet of this booster I can say that it is not possible to supply it by a gpio output. Also you should supply this booster not from the 40pin header of the Tinker Board, as it could overload the internal supply and destroy it. You should use an extra power supply for it. Also I saw in the datasheet of the xl6009 that it has an Enable input at pin 2, but it seems that this pin is not stripped on the printed board. What you can do is to solder a wire to the pin 2 and control it with a gpio output, to switch on and off. But please take into account that the backvoltage on pin 2 could be higher than TB's 3.3V (EN Pin: -0.3V ... Vin), so it would be better to connect with a transistor or to protect the gpio output, e.g with a zener diode.
If you do so, please check if the pin 2 of the xl6009 is not connected directly to the supply voltage, in this case you would need to loosen the pin 2 from the printed board.
You shouldn't stress TBS by such way. Anyway if you like to control the output just put a relay, then can stimulate muscles even by wall supply.
Definitely you may not expect high frequency and it's better to power the opto-coupler by the 3.3 V on board, because the control is using an active low level. So for such condition you may face the relay switched on when the TB is turned off.
For fast switching then you might look for a mosfet module, which probably will work with active high logic.
Thank you Im4Tinker and lobo very much.

It seems that the better way to do this is to power it with another external supply and control it with the TBS pins and MOSFET. Will attempt and see how that go.

Thanks again.