Problem with hidden pins


#1

Hi, in my circuit I would switch on and off a schmitt hex inverter with a transistor.

So I switched on the Show hidden pins icon and connected the transistor to the GND pin of the 74HC14 (ERC doesn’t give me errors).
But in PCBnew it doesn’t works as expected: it grounded both pins of the transistor and the pin 7 of the 74HC14.

I’re read somewhere that, if I make a direct connection to an hidden pin, it overrides the automatic rule of attaching the pin to power rail. But looking at PCBnew it isn’t true, it is still attached to the power rail.

Is it possible to do it with standard library or I should create a non multipart component to avoid this hidden power fuss?


CD4051 power pins not available in schematic symbol
#2

I would advice against using the symbols in the logic lib as they are now. My suggestion is to copy the part to your personal lib and change it in a way to avoid hidden power pins.

You can even do it with multi part symbols. Just make a separate unit for the power pins.
Some time ago i made tutorial how to edit the symbols in this library to have the power pins on a separate unit.

That’s strange did you recreate the netlist and did you reimport it in pcbnew?


#3

Yes. I added the transistor to Eeschema and connect it to the 74xx. I regenerate the netlist and imported in PCBnew. PCBnew added the transistor but with this erroneus connection.


#4

I don’t know what the rest of your circuit looks like but switching the gnd pin of an IC like that could be problematic. Is there not a better way you could accomplish what you are trying t do?


#5

I read a capacitive soil moisture probe. I use only one unit of the hex inverter and I don’t want that it works all day when I need it about 2 or three time a day.

Any other suggestions?


#6

What have you done with the unused inputs?


#7

Chained together with the input of the first connected to ground. This to avoid floating inputs.


#8

Well that’s likely to be a problem. You would be better off switching the Vcc pin.

The inputs of 74HC devices have clamp diodes that connect the input to both Vcc and Gnd. With the unused inputs tied to Gnd they will actually hold your Gnd pin at about 0.5 V. The 74HC devices will work down to 2 V between Vcc and Gnd so if you are supplying 2.5 V or more to Vcc the chip won’t turn off when you turn the transistor off.


#9

Thank you very much!


#10

Just changed the schema. Now I switch VCC of the hex inverter.
Still PCBnew reports me an unconnected error between the emitter and collector of the transistor. Why?


#11

Could you make a screenshot of the schematic. (We mainly need the part where you connect the power pins of the inverter.)


#12

here the schematic


#14

Maybe that’s because on the HC14 side the net inherits ‘VCC’ from the hidden pin, and on the collector side it is ‘VCC’ again, because the net is named so.
If that makes sense.


#15

Ok i played around a bit.
If you want to use the original symbols you can not use the vcc power label at all.
You will also not be able to use multiple different symbols that use a hidden vcc power input.
My tests: (Tested on 7 month old nightly and on 4.0.2 stable. My old fedora 23 does not give me any other options. I really should get a new operating system.)


So if you want to do this, you will need to change the symbol such that it does not have hidden power pins.


#16

And don’t take up the idea to put a label on the net at the HC14 side in a weak attempt to rename it. Would not work. Stays VCC forever.


#17

You may already have considered this but I thought I would point it out in case. Your use of an NPN transistor there as an emitter follower, while technically okay, you may have issues depending on the rest of the circuit. The emitter of your transistor will always be 0.7 V below the base (when possible). So it doesn’t matter if Vcc is 5 V, if your PROBE_DRIVER signal is only 3.3 V then the power pin on the IC will only see 2.6 V. Using the NPN transistor to instead drive a FET would provide more voltage to your IC. The accuracy of your probe circuit might be voltage dependent, so perhaps consider simply using an LDO regulator with an enable pin.

But, as I said, maybe you’ve already considered this and the circuit as is will suffice.


#18

Hidden power pins automagically generate their own special net label. There is no workaround for that, nor is it likely to change (because legacy).

I think it has been known for some time that hidden power pins (and hidden pins in general) are terminally broken.
Official policy is not to change existing behaviour (even if broken). At least we can remove them from the official libraries (I’m pleased to see this is in progress) and discourage users from attempting to use them.

Personally, I handle backward compatibility by popping up a dialog box when deprecated features are detected. The user can then choose to ignore on a project or installation basis (I set a flag in config file to indicate a legacy mode). This enables existing projects to work with the least amount of grief, nudges users towards better features, and new users never even know about the previous broken stuff.


#19

Well, I have much things to learn because I’m new to the hardware world (I’m mainly a software guy).
I’m doing this as hobby and I assemble my circuit googling here and here to learn how to do it.
At this point, the better thing is to not turn on and off the IC at all leaving it on all the time.
I saw a similar circuit with a NE555 powered directly by a pin of the atmega328 and I tried it with a transistor thinking it should be a better thing.
Thank you again for all your suggestions


#20

If you are just doing this as a hobby for educational purposes then I wouldn’t want to discourage you from trying things. That is how we learn after all. I would suggest keeping your transistor. You can always bypass it later if it doesn’t work. Or maybe even include the option of having a MOSFET transistor there as well. Experiment by having different options available.

I have also seen the 555 version of the circuit, and it might be the more robust option.

It’s not a lot of components and it won’t make much difference to the cost of the board so go ahead and experiment with different variations of the circuit.


#21

As a newbie in the kicad world, I’m curious why the inverters should be chained together at all. I would have grounded the inputs to all unused ones, and left the outputs unconnected. Is chaining them better in some way?