MitchSF:
is whether R3 is necessary, and if so, are the values of R3 and R8 appropriate?
R3 not neccessary. The inputs of 74hc07 are very high impedance, only a tiny current will flow.
R8? Did you mean R6? If so, yes, because without it, the 74hc07 output would be damaged by short circuit when it goes low.
MitchSF:
EDIT: With VCC at 7v maximum, I'm not sure that the 74HC07 will turn on the MOSFET. I was thinking that it could be connected to 12v.
I said that 74hc07 has open-collector output, but did not explain what the benefit of that would be. The 74hc07 chip itself would be powered with 5V. Because it's outputs are open-collector, it won't be damaged if those outputs are exposed to 12V, unlike other chips (such as 74hc04 or ht16k33 or Arduino pins). Open collector outputs can only pull a signal low, they cannot source current to pull a signal high. That is why R6 is there. So to answer your question, the 74hc07 does not switch the MOSFET off. R6 does that. But the 74hc07 can turn the MOSFET on by pulling its gate low, overcoming R6 pulling it high.
PaulRB:
I said that 74hc07 has open-collector output, but did not explain what the benefit of that would be. The 74hc07 chip itself would be powered with 5V. Because it's outputs are open-collector, it won't be damaged if those outputs are exposed to 12V
I do not agree with your, here is a schematic from the hc07 datasheet:
74x07 6 hex buffer gate open-collector 30 V / 40 mA
This is why I was surprised by what you posted from the hc07 data sheet. They do not seem to agree. The data sheet implies the gate is inverting, but the above does not. And with that diode shown in the data sheet, it would not be safe to connect the output to a 30V source...
PaulRB:
From this list of 7400 series logic chips:This is why I was surprised by what you posted from the hc07 data sheet. They do not seem to agree. The data sheet implies the gate is inverting, but the above does not. And with that diode shown in the data sheet, it would not be safe to connect the output to a 30V source...
It do not, you have an inverting gate followed by an inverting output transistor, result: non-inverting.
The old TTL logic could handle higher voltages, but on CMOS you often get a protection diode and that is spoiling the HC07 chip. There are CMOS chips that can handle higher voltage on input/outputs.
Since there is no keyboard scanning necessary, in effect the outputs from the HT16K33 should be the same for this purpose, is that correct?
I did switch back to a 74HC04 and that is in the last schematic because I thought that since the 2N7000 inverts the signal from the COM line, the 74HC04 will invert it back. Is that wrong?
Based on these comments, I'm not sure what changes need to be made to the circuit. I think that R3 should be removed, the 2N7000 should be removed, and the 74HC04 should change to a 74HC07, connecting directly to the gate. Is that correct?
HKJ-lygte:
It do not, you have an inverting gate followed by an inverting output transistor, result: non-inverting.
Ah, yes, quite correct, sorry!
HKJ-lygte:
you often get a protection diode and that is spoiling the HC07 chip.
I think you are correct there too. Bang goes my idea. I was trying to minimise the component count for the OP, hoping to find an easily available and cheap component to drive the MOSFETs directly.
MitchSF:
Since there is no keyboard scanning necessary, in effect the outputs from the HT16K33 should be the same for this purpose, is that correct?
Yes, all outputs are a mos transistor pulling high or low depend on row/column output.
MitchSF:
I did switch back to a 74HC04 and that is in the last schematic because I thought that since the 2N7000 inverts the signal from the COM line, the 74HC04 will invert it back. Is that wrong?
Based on these comments, I'm not sure what changes need to be made to the circuit. I think that R3 should be removed, the 2N7000 should be removed, and the 74HC04 should change to a 74HC07, connecting directly to the gate. Is that correct?
No, go back to my first post: COM pulls low when it want to activate a output and high impedance when not, this means a pullup is required.
Next you want the low output to activate the MOSFET output transistor (Q1). lets take is one step at a time:
Q1 is a P-channel MOSFET and needs a input a couple of volts below S to turn on and G need to be at S voltage to turn off. R6 handles the off nicely and Q3 handles the on. To turn Q3 on a high voltage is needed on Q3 G input. This is the opposite of the COM output, hence we need a inverter to fix that.
If the circuit had been 5V only two inversion could be removed (U4 and Q3), but due to the higher voltage on Q1 we need something that is not limited to 5V. That could be a driver without strict voltage limitations (that means a real MOSFET driver) or as here a transistor with a pullup resistor and a inverter before it. There is probably some other solution that would work also, but I cannot provide a working idea at the current time*.
*Using a real MOSFET driver might be able to replace Q1, Q3, U4, R6, but that would require that I read a couple of datasheets and started thinking and I am not sure it would be cheaper.
MitchSF:
Based on these comments, I'm not sure what changes need to be made to the circuit. I think that R3 should be removed, the 2N7000 should be removed, and the 74HC04 should change to a 74HC07, connecting directly to the gate. Is that correct?
Not sure now, @HKJ-lygte blew a big hole in my idea! Need to re-think. My idea might work with an LS07 but not, it seems, with its more modern replacement HC07.
MitchSF:
I think based on these comments, that the last schematic is ready to breadboard. Is that correct? Thanks again.
You already have my meaning about that, but keep looking at the comments, I frequently makes mistakes (Like above where I initially forgot the base resistor).
I do sometimes have the smell of mistakes in my lab! I hate it when that smell comes from a $100 (or more) device! What you have to accept is that when doing many projects you will also do many mistakes.
In case you is wondering: I do not see any problems in your schematic and there is nothing in that schematic that can release any smell
MitchSF:
Which is the better choice for the MOSFET:
For a 9V system I would use the L version, but not for a 12V system. If you have not decided between 9/12V stay away from the L version, it is best in 5V to 9V systems.