Interfacing logic gates to BBB GPIOs

Dear all, I recently bought a new Beaglebone Black(BBB), I want to interface a push button to BBB, as I got in the book (Exploring BeagleBone: Tools and Techniques for Building with Embedded Linux 2nd Edition
by Derek Molloy) that, BBB GPIOs are 3.3V tolerant and you can only source 4–6 mA and sink about 8 mA to each pin.

There is a good circuit given in this book for interfacing pushbutton to BBB in which the pushbutton is connected in pull-up and its output goes to RC network and then goes to 74hc14 hex inverter, now the output of the hex inverter is supposed to go to the BBB GPIO pin.

Now my doubt is that is it safe to directly connect the output of the hex inverter to the BBB GPIO pin, as when the output of the hex inverter goes logic high (3.3V) it will be equivalent to connecting 3v3 to BBB GPIO pin directly, as there is no resistance or current limiting component connected between the output of the hex inverter and the BBB GPIO pin.

Should I connect a series resistance or a pullup resistance (if I am not using the bbb GPIO’s internal pullup) between the output of the hex inverter and the BBB GPIO pin to use the BBB GPIO pin safely.

Thanks in advance.

I was all set to say that direct connection was okay, until I failed to find the absolute maximum rated sink current in the data sheet(s) (T.I. document IDs sprs717l and spruh73q.)

Putting a 470 ohm resistor in series to the BBB isn’t going to hurt things when the GPIO is set to an input, and if the BBB accidentally starts driving against the 'hc14(s) output will limit the current enough that you’ll still be able to see what’s going on.

You shouldn’t need a pull-up the 'hc14 is a totem-pole output that will drive the output either rail.

Great thanks for the reply, actually the main problem is that I could not find the input and output impedance of BBB GPIOs in the processor datasheet.

Can somebody please help me to find the input and output impedance of BBB GPIOs.

And if we connect a 470 ohm resistor in series between hc14 output and BBB GPIO input, when hc14’s output goes high (3v3) a current of (3v3/470ohm + input impedance of BBB input pin, letting BBB GPIO pull-up is not activated)) goes into BBB GPIO pin

So i need the input impedance of BBB input pin to analyze more.


Sounds like you are over complicating things. Why not set the gpio as an input with pull up enabled and then switch the pin to gnd via button ? You will if course need to take care of denounce in software

or can you use an ammeter on the output of your gate? Ohm’s law still baffles me, how are you powering the logic gate (from BBB or external power)? 8ma is well within the range of even the most basic meters.

But, the datasheet ( as I read it says that (Maximum)output current is +/- 25Ma. Also, this datasheet says that the input current to the gate can be as low as 1uA.

when I’m worried about damaging a BBB (or any device), I prove out the idea with a scope or MM. A limiting resistor on the gate input (Vcc) is the first variable I would explore, considering the wide range of input voltages / current that the gate supports.

good luck!

You’ll get some clues on the input impedance by checking out the input leakage current specifications on the AM3358 data sheet (TI document id SPRS717L) in section 5.7 around page 88.

And considering that the actual impedance will vary quite a bit based on the conditions of the transistors those BGA pads are hooked up to, you’re not going to se a simple number…ever. This means that you’re left looking at the corner cases to get an idea of what it’s going to be doing (input/output; pull-up/pull-down/not;external voltage high/low/open) It’s only about 18 conditions, with a lot of them eliminated with simple deductive reasoning.

I apologise in advance if I’ve missed something here, but it looks to me like there’s a huge amount of confusion in this thread.

Just connect the 47HC14 output to the bbb input - any other components are not needed and best not used.

(Note: If the HC14 is operating at a different supply voltage then a level shifter will be required. Also, if the bbb pin might be configured as an output at some point, then this will be a problem that will need to be addressed, depending on your particular situation).