Pull a pin LOW

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
twelchptm
 
Posts: 49
Joined: Fri Jan 24, 2014 12:33 pm

Pull a pin LOW

Post by twelchptm »

I am working with a PowerBoost500 Charger. It has access pins down the side of it that if utilized properly can allow alot of interaction with the device. One thing I am trying to accomplish is a Powersave Mode. The PB500C is being used for my RaspberryPi and I am using an ATTIny85 to control the interaction. I am specifically at this point trying to work with the Enable Pin, it states in the documentation if this pin is pulled low the output is cut off. I am looking for recomendations for what component is best suited for this (transistor, MOSFET, relay, optocoupler, etc. ) Any input is appreciated.

User avatar
adafruit_support_bill
 
Posts: 88097
Joined: Sat Feb 07, 2009 10:11 am

Re: Pull a pin LOW

Post by adafruit_support_bill »

You can use a pin on the ATTiny to pull it low.

twelchptm
 
Posts: 49
Joined: Fri Jan 24, 2014 12:33 pm

Re: Pull a pin LOW

Post by twelchptm »

If this pans out, I am going to kick my self, I have been messing aroung with 20 different things trying to figure this out, and now your saying I can just hook the pin straight to the ATTiny?
I don't have a camera handy but let me try to explain what i have wired up here,

The PowerBoost is plugged into the wall, my RaspberryPi is plugged into the PowerBoost, the 2500mAh 3.7V lipo is plugged into the PowerBoost. I am powering the ATTiny85 from the battery via the pins on the side of the PB.

If I am getting what your saying I don't need any type of external relay and can simply hook the enable pin directly to the ATTiny and then the pin on the ATTIny would be an output and setting the output low would pull the Enable pin low and nothing will explode or go poof?

User avatar
adafruit_support_bill
 
Posts: 88097
Joined: Sat Feb 07, 2009 10:11 am

Re: Pull a pin LOW

Post by adafruit_support_bill »

Yes. As long as the ATTiny and PowerBoost have a common ground for a signal reference, you should be able to do that.

twelchptm
 
Posts: 49
Joined: Fri Jan 24, 2014 12:33 pm

Re: Pull a pin LOW

Post by twelchptm »

Yep, it works....Now one last step and my project is complete, On the Raspberry PI mentioned earlier, I have a GPIO pin that is held high with a pull up resistor, A program I am running on the Pi is monitorring this pin waiting for it to be pulled low, can I hook this one to the ATTIny direct as well?

twelchptm
 
Posts: 49
Joined: Fri Jan 24, 2014 12:33 pm

Re: Pull a pin LOW

Post by twelchptm »

I think just answered my own question, Yes as long as I make sure not to excced the 3.3v that RPi GPIO is rated for.

But now I question, can I do this with a resitor or should I introduce a voltage regulator or logic level convertor?

User avatar
zener
 
Posts: 4567
Joined: Sat Feb 21, 2009 2:38 am

Re: Pull a pin LOW

Post by zener »

If the Tiny is 5V and the pi is 3.3V then probably the best way to pull the pi pin low is with a small NPN transistor like PN2222 or similar. You would hook the emitter to ground, the collector to the pi input and the base to the Tiny output through a base resistor.

twelchptm
 
Posts: 49
Joined: Fri Jan 24, 2014 12:33 pm

Re: Pull a pin LOW

Post by twelchptm »

The Tiny is actually running at 4V, I tried using several different transistors including a PN2222 and no arrangment of base,collector,emmiter would work, The only one that worked was a TIP120 MOSFET, but its huge.. I actually just finished hooking everything up and connecting the pin from my Pi to the Tiny pin through a 1M resistor hold my pin high at 3.35V.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”