bwack / C64-Saver-bwack

Other
97 stars 14 forks source link

Optimizing gate voltage for Q1 #25

Closed franky1969 closed 1 year ago

franky1969 commented 3 years ago

I have built the Saver 2.4 Throughole but the output voltage was not disconnected at overvoltage. I meassured the output voltage of U1 (TL431) at overvoltage with 1,8V. The gate voltage of Q1 (2N7000) was after the divider 33k/82k at about 1.3V. According to the Datasheet of the 2N7000 the Gate-Threshold Voltage of is between 0.8 an 3V I did not find the the max output voltage of U1 (TL431) in the datasheet. I think this is about 2V. I think the values of the divider resistors should be changed. I changed the 82k to a 33k resistor this works with my parts. Maybe further investigation is necessary.

bwack commented 3 years ago

Thanks a lot for letting me know! I think I'll change the 2n7000 to 2n7002 due to the wide spread Vgs threshold.

franky1969 commented 3 years ago

According from the Datasheet from National Semi the 2N7000 is a pin version and the 2N7002 the SMD version. The threshold Voltages are nearly the same: 2N7000 : 0.8V - 3V 207002 : 1V - 2.5V The min. Voltage maybe the reason why there are less problems witch the SMD Version.

bwack commented 3 years ago

You are right. The problem is also with the smd version. Regarding less problems with smd version, I don't know, because there are not many of these out in the wild I think. The saver V1 was a different design, with TL431 and pmos. I made hundreds of those, but it had another problem with V1 that I fixed in V2. I think if I can't find another nmos, I can go with an npn bipolar transistor. The resistors R7 and R8 are there anyway, so it would be a job to ensure Vth, I_b, hFE and I_KA of the tl431 (which is plenty anyway). Then I can remove D1.

bwack commented 3 years ago

V2.4 for reference: Screenshot from 2020-11-14 12-41-39

V2.5 for reference: Screenshot from 2020-11-14 12-33-07

franky1969 commented 3 years ago

The Voltage divider i have chosen has an factor of 0.5 with R7/R8. So we can get 1V this is at least on the min. threshold of the MOSFET but in worst case we need 6V (threshold max. 3V) to switch the MOSFET. So the divider is no save solution for the MOSFET but witch an bipolar transistor it should work.

I think, i have another possible solution for the SMD Version. In the Wikipedia artikel about the TL431 i found this:

"On-state VCA drops to around 2 V, which is compatible with Transistor–transistor logic {TTL) and CMOS logic gates with 5 V power supply.[40] Low-voltage CMOS (e.g. 3.3 V or 1.8 V logic) requires level conversion with a resistive voltage divider,[40] or replacing the TL431 with a low-voltage alternative like the TLV431.[41]"

bwack commented 3 years ago

Very interesting. I looked it up. One reason for choosing TL431 is the high V_KA absolute max ~40V ish, while tlv is 10V. It would need some clamping i guess. I think maybe a bipolar is fine.

macacob commented 2 years ago

I recognize this is an old post but I am experiencing the same issue. I tested up to 7V and output voltage was not disconnected. I'm going to try replacing the 82k resistor with a 33k as suggested by frankly1969. I have rechecked my work and everything seems correct (correct components, good solder joints etc). Any other suggestions?

Thanks very much for your work on this by the way. Really a great project that should help keep more C64s alive for years to come.

bwack commented 1 year ago

Has anyone looked at this problem? In short, the challenge is that the "output" of U1 does not go to 0 V, it goes to around 2V and varies with device to device. Then there is the threshold level of 2n7002, which have worked for me, but because of tolerances it may not work for another board. Suggestions welcome. I might have a closer look myself. The pandemics and chip shortages amongst other events killed this project for me. I see some people building it over at forum64, and this might kickstart some interest to continue (or not).

bwack commented 1 year ago

I've been simulating a tl431 with cathode voltages from 1V to 2V. With a bipolar npn transistor replacing Q1, the threshold is a lot more stable than the nmos transistors gate voltage threshold. Also, not much change is needed to the layout (if any? I presume some pin re-arrangement). The R7 and R8 can be set to 330k and 100k. Though don't take my word for it yet. It is a complex circuit with the addon board should be working as well. I'm thinking of the gain of Q1, it should be quite high.

franky1969 commented 1 year ago

Hi bwack, do you still have the 2V problem with die bipolar solution? Maybe this is the red LED in the V2.5 Version. If there is no load connected to output, you get about 2V from the LED current trough R9/R10.

bwack commented 1 year ago

Hi again. This problem is with the threshold of 2n222 and variation in tl431. Regarding the led problem we can have a look at that in another issue :)

bwack commented 1 year ago

maybe i misunderstood. im playing with lt spice now. I'd like to take out the leds until i figure out the problem with tl431 and 2n2222.

franky1969 commented 1 year ago

Sorry, i miss understood your post about the output of 2V from U1. Forget my posting about the LED it has nothing to do with this topic.

bwack commented 1 year ago

No problem. I'm simulating with a npn transistor now and it can work. A bc547 seemed to work fine.. Also i moved the red led and resistor in parallel with R3. That seems to work fine as well.

bwack commented 1 year ago

This is what I've come up for the new throughhole version.

Screenshot_2023-03-20_01-31-20

Two leds, powered by the active components (D1, Q1). Removed zener at Q1. nmos replaced with bc547. Rotated the two TO92 packages to block less of the ground fill. Believe it or not I managed to get all components on the pcb and route them. not pretty but functional i hope.

Screenshot_2023-03-20_01-37-04 Screenshot_2023-03-20_01-35-37

franky1969 commented 1 year ago

Looks very nice. I have put this in my ltspice, which i found from two years ago. The BC547 is switching at about 2.5V. So this should work fine.

bwack commented 1 year ago

I'm testing now and it seems to work, however I cannot test for parameter spread thouhg. I noticed that the V_DS was high. I'll make another issue about it.

bwack commented 1 year ago

I'm closing this issue as resolved.