Author Topic: Back-powering via GPIO pin  (Read 1082 times)

0 Members and 1 Guest are viewing this topic.

Offline CompoTopic starter

  • Newbie
  • Posts: 7
  • Country: gb
Back-powering via GPIO pin
« on: June 21, 2019, 07:40:53 pm »
I have a plug-in module for my 2.4ghz quadcopter controller that I have hard-wired. The controller outputs PPM data and the module (atmega and nrf24l01) takes these and transmits.
At the moment I switch on the controller then the module (it takes 5v from the controller batteries). My understanding is that the PPM output from the controller is backpowering the module chip whenever I have the controller powered but not the module?

I think the solution is to use a MOSFET with the gate connected to the module switch?

Can someone confirm thats right and maybe give some help on how to wire it up?

Thanks
 

Offline viperidae

  • Frequent Contributor
  • **
  • Posts: 306
  • Country: nz
Re: Back-powering via GPIO pin
« Reply #1 on: June 22, 2019, 07:06:16 am »
Can you set the gpio to open collector?
Then you won't need an extra MOSFET, just a pull up resistor.
 

Offline CompoTopic starter

  • Newbie
  • Posts: 7
  • Country: gb
Re: Back-powering via GPIO pin
« Reply #2 on: June 23, 2019, 05:01:27 pm »
Would I have to do that in code? I dont have access to the source.

I have some si2302 n-channel mosfets.

I though maybe I could use one of those on-on-on switches so the power connects then the ppm connects.
« Last Edit: June 23, 2019, 05:04:56 pm by Compo »
 

Online langwadt

  • Super Contributor
  • ***
  • Posts: 4857
  • Country: dk
Re: Back-powering via GPIO pin
« Reply #3 on: June 23, 2019, 05:12:01 pm »
could get the equivalent of open collector with a diode and pull up resistor
 

Offline CompoTopic starter

  • Newbie
  • Posts: 7
  • Country: gb
Re: Back-powering via GPIO pin
« Reply #4 on: June 24, 2019, 10:47:55 pm »
Is an open collector is for the output of a chip? Sorry but I'm not that experienced, I dont really follow
 

Offline DaJMasta

  • Super Contributor
  • ***
  • Posts: 2393
  • Country: us
    • medpants.com
Re: Back-powering via GPIO pin
« Reply #5 on: June 25, 2019, 12:19:33 am »
Is an open collector is for the output of a chip? Sorry but I'm not that experienced, I dont really follow

Usually called Open Drain and would be available as an I/O pin configuration setting.


Honestly, though, I don't think you're powering your whole main module through a GPIO pin.  A bit can go through it, sure, but depending on your main module, that could easily be tens or a hundred mA continuous, which I don't think your GPIOs are going to supply readily.  I'd check your other connections and verify that there isn't some extra power connection going through your wiring, and if not that, make sure there isn't anything in the bus protocol connecting the module with your powered one that would force the main module to wake up when talked to.


Very difficult to say without schematics/pinouts of what's being used, I just have my doubts that a substantial amount of current is powering your main module through the GPIO without damaging something on the sending or the receiving end.
 

Offline CompoTopic starter

  • Newbie
  • Posts: 7
  • Country: gb
Re: Back-powering via GPIO pin
« Reply #6 on: June 25, 2019, 07:03:32 pm »
Heres the schematic and photo:





I take PPM-out and ground from the trainer port. Ever since I put this module in, my trainer cable to my PC stopped working (it has 2 wires, PPM and ground). When using the cable I have controller on and the module off. If I switch on the atmega + nrf module, the trainer cable starts working instantly, thats when I looked up this backpower problem. 
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf