BJT totem pole questions - Page 1
Forum section: electronics / beginners

author: step_s
author_rank: Regular Contributor
timestamp: March 04, 2016, 02:46:34 pm
content: Hi there.I have been messing around with microcontrollers, and wanted to run the PIC from a 2.8V source, where as it needs to switch a mosfet at 5V.I figured a BJT gate driver would do, but i get nothing but the voltage from the microcontroller - diode voltage drop from base-collector, so around 2.2V.The BJT's are set in a totempole config, and the test setup is pretty straight forward. 5V goes to the drive, and the MC is set to the connected bases of the BJT's.I'm using a A733 PNPhttp://vakits.com/sites/default/files/2SA733.pdfand a C945 NPNhttp://cdn2.boxtec.ch/pub/diverse/C945.pdfThe MC is switching at 2kHz.Pretty new at this stuff, that's why it's in the beginners section

author: Ian.M
author_rank: Super Contributor
timestamp: March 04, 2016, 03:04:12 pm
content: That's a complimentary push-pull emitter follower, not a totem pole. Its output is smaller than the input as you loose one Vbe drop top and bottom. To make it work, you'd need a level shifter in front of it.

author: step_s
author_rank: Regular Contributor
timestamp: March 04, 2016, 03:10:54 pm
content: So a transistor with a pullup?

author: Ian.M
author_rank: Super Contributor
timestamp: March 04, 2016, 03:29:29 pm
content: Yes, in front of the push-pull pair you already have, but that will lift the 'off' level by Vce_sat which will end up giving you about 1V on the gate in the OFF state. Depending on the MOSFET minimum gate threshold, this may be an issue and cause excessive leakage current when off. A gate pulldown resistor may be required. You *MAY* be better off scrapping the whole discrete driver circuit and using a dedicated MOSFET driver chip, but you will need to be certain the PIC output @2.8V Vdd can meet its minimum logic '1' threshold.

author: danadak
author_rank: Super Contributor
timestamp: March 04, 2016, 03:34:59 pm
content: Single gate logic, dirtbag cheap, small packages.http://www.diodes.com/pdfs/74LVC%20Single%20and%20Dual%20Gate%20Logic%20Flyer.pdfRegards, Dana.

author: MK14
author_rank: Super Contributor
timestamp: March 04, 2016, 03:36:03 pm
content: You could use a fet, which has been designed, especially for low voltage gate drive activation. There are many new ones available (primarily produced for the huge mobile phone market, which are usually low voltage (3.6/3.7V)).Unless you need very fast switching speeds, they can usually be driven directly from the port pin (resistors etc, as needed).http://www.digikey.co.uk/Web%20Export/Supplier%20Content/ROHM_511/PDF/ROHM_LowGateDriveMosfets.pdf?redirected=1

author: step_s
author_rank: Regular Contributor
timestamp: March 04, 2016, 03:43:02 pm
content: @IanYe, the BJT's driving the mosfet seems to give that voltage drop issue. . . Making it not turn completely off.The whole problem in a nutshell is, that the mosfet used is a SI2301 with quite the gate capacitance, and with a direct pull-up resistor, it causes quite the power loss due to the small resistor size at higher switching speeds, if I want a nice square wave.Was looking at a dedicated mosfet driver, but wanted to see if there was another way.How about a CMOS switch instead of BJT's?

author: MK14
author_rank: Super Contributor
timestamp: March 04, 2016, 04:02:54 pm
content: Quote from: danadak on March 04, 2016, 03:34:59 pmGood suggestion.I think some people, parallel up multiple outputs, if they want to get even faster speeds, with this low cost, simple solution.Quote from: step_s on March 04, 2016, 03:43:02 pmWhat exactly do you mean by CMOS switch ?Do you mean discrete small signal fets ?EDIT: On reflection, I think I see what you mean now. I'm use to CMOS only being used to describe integrated circuits, rather than external fet combinations.This is why it is usually better to carefully choose the output fet(s), to have the correct gate driver voltage and/or be low enough capacitance to be easily driven, by your circuit. (N.B. NOT always possible, or cheap enough etc. So more easily said than done, in practice).But different people/organisations, vary in how they do things. So fair enough, if you want to use that specific fet (or already have it in stock).

author: step_s
author_rank: Regular Contributor
timestamp: March 04, 2016, 04:52:02 pm
content: @MK14The SI2301 is what I'm currently in possession of, and after looking on Digikey, a lot of the FET's don't have a gate capacitance rating.The ones with very low capacitance for their current rating, are very expensive compared to the manstream 2301.Yes, the CMOS as complimentary mosfets in an external circuitThe question here is if it's cheaper to make a CMOS switch from 2 lower rated mosfets, with a very low gate capacitance, or to buy a better transistor, or to use a mosfet driver?P channelhttp://www.infineon.com/dgdl/Infineon-BSS223PW-DS-v01_05-en.pdf?fileId=db3a3043321e49940132481523b6245f0.6 nC max on gate, should do the trick with a complimentary N channel?Very cheap also

author: dom0
author_rank: Super Contributor
timestamp: March 04, 2016, 05:04:06 pm
content: Are you sure you gave the right number? The SI2301 has only a dozen nC or so gate charge, not at all much.

author: step_s
author_rank: Regular Contributor
timestamp: March 04, 2016, 05:27:40 pm
content: @dom0Ye, I'm sorry that i have said 2kHz in my test setup, when what I'm currently talking about is the implementation.The SI2301 is sitting in a buck converter setup, where it will have to switch at around 250kHz-500kHz, and if the 10nC on the gate needs to be drained fast enough, a simple pullup resistor on the gate will have to be around 200ohms, and cause a lot of power loss in the system.So the CMOS would drive the SI2301 and the microcontroller would drive the CMOSHope it makes sense.

author: MK14
author_rank: Super Contributor
timestamp: March 04, 2016, 05:49:16 pm
content: Quote from: step_s on March 04, 2016, 04:52:02 pmI did not realize you needed somewhat high frequencies. 2 KHz is normally very easy with MCU port pins (unless very high currents or something are needed, even then you may still be ok).Hundreds of KHz, is a completely different matter, especially if you want high conversion efficiency and/or low device dissipation.Ironically I was looking into a similar problem, fairly recently. The best ideas (low cost), seemed to be to use cheap, high speed logic gates, and parallel the outputs (not everyone likes doing that), to increase the output drive current capabilities, still further.But there are many ways of doing it.For one offs (with little prospect of manufacture), or early prototyping. I prefer to take the quick/lazy/easy option of using standard fet drivers or fets with built in drivers (expensive, but ok for one offs). I've forgotten the part numbers. But some fet drivers I bought a significant stock of a while ago. Are so powerful, you don't even need the output fet, unless the currents are somewhat big, or it needs to dissipate power.Your low gate capacitance fets idea (driving the bigger output fet), could we worth trying. Sometimes the most successful solutions, are found, immediately after something does not work quite right.The pair of bipolar transistors, was a good idea in principle. But in practice, it can be exceedingly difficult to design it, given the huge potential of shoot through and/or the wrong voltages being produced at the output.2.8V is rather low.Good luck with solving the problem!

author: Zero999
author_rank: Super Contributor
timestamp: March 04, 2016, 08:51:35 pm
content: Two BJTs and a diode can be used to make a push-pull driver. This circuit was designed for 12V but it'll work fine from 5V.

author: MK14
author_rank: Super Contributor
timestamp: March 04, 2016, 09:00:03 pm
content: Quote from: Hero999 on March 04, 2016, 08:51:35 pmIf I understand it correctly. There would be about a volt, when it is trying to bring the gate (fet) low. (0.7V diode drop + transistor voltage drop). But it could well be fixable/improvable etc. Which might partly/slightly activate the fet ?

author: Zero999
author_rank: Super Contributor
timestamp: March 04, 2016, 10:25:38 pm
content: Quote from: MK14 on March 04, 2016, 09:00:03 pmIt will be about 0.7V when the transistor is on. The voltage drop due to the transistor is negligible, as long as there's adequate base current. Using a Schottky diode would reduce this down to below 0.4V. Whether this is a problem or not depends on the MOSFET.

author: MK14
author_rank: Super Contributor
timestamp: March 04, 2016, 10:56:16 pm
content: Quote from: Hero999 on March 04, 2016, 10:25:38 pmI agree. It can fall below 1 volt. Especially with a Schottky diode.When I originally said it was 1 volt, I was at least partially mistaken. Because I did not take full account, of the fact that the current will be very low, in the transistor, hence its voltage drop should be very low. (Even with significant current, it can still be rather low, depending on the specific transistor, and if it is saturated, or not).Maybe the $64,000,000 is, can it do it quickly enough ?There is plenty of potential to twiddle with the component values and types. Maybe the fet could be guaranteed off (at low gate voltage), and yet guaranteed on (at high gate voltage), by suitable device selection. Even if there is a small residual voltage, of a volt or whatever.I.e. at 500 KHz, and with good efficiency ?We are really getting to the point where I would prefer to simulate and/or build the circuit, to learn more about its behavior.

author: step_s
author_rank: Regular Contributor
timestamp: March 04, 2016, 11:19:48 pm
content: @Hero999The voltage drop being around 0.7V (Maybe 0.45V with SK diode?) could potentially still affect the mosfet. The issue here was effeciency, and even a small amount of current floating backwards in the buck converter, will make it lose those sweet % that I was trying to gain.I thank you for the suggestion, and I will play around with it to see how much the drop matters@MK14Hehe, if you want to test it out, I would be delighted to see the results xDI'm afraid I live in a country where parts and postage are very expensive, and takes ages to arrive, so will try and get some < 1nC gate mosfets to play around with.

author: MK14
author_rank: Super Contributor
timestamp: March 04, 2016, 11:29:51 pm
content: Quote from: step_s on March 04, 2016, 11:19:48 pmSome of the simulators available, e.g. LTSPICE (which is genuinely FREE!). Can be useful, to help better understand your circuits, and play around with the values.http://www.linear.com/designtools/software/

author: Zero999
author_rank: Super Contributor
timestamp: March 05, 2016, 02:40:27 pm
content: Another transistor can be added to get close to 0V.

author: MK14
author_rank: Super Contributor
timestamp: March 06, 2016, 08:30:36 am
content: Quote from: Hero999 on March 05, 2016, 02:40:27 pmI've tried simulating it (LTSPICE IV), with general purpose parts, but it does not seem to work very well.At 500KHz, it basically does not seem to work.At 250KHz, it does work, but takes ages to switch states. So may not be very efficient.Simulations can get things WRONG. Since it is NOT my project, I DON'T want to build it for the OP, sorry!I've had a quick look (so could easily be mistaken), at what is going wrong.When the PIC's output port pin (input on diagram), attempts to switch off. There is some current in the pair of 1K resistors (while it is transitioning, and the bottom pair of transistors are trying to switch off), so the relatively weak port pin has a few hundred (very approximately) milli-volts on it.So we have about 700 milli-volts on the bottom pair of transistor bases, so there is only a few hundred milli volts across the 1K resistors. So not much current available, to fight the stray and base capacitance's. So it takes quite a long time. The simulator seems to say this is about a microsecond, which for a signal which changes state about every microsecond, it is too slow to keep up. (500KHz = 1,000,000 voltage transitions per second).To make matters worse, while the top transistor is conducting, the lower pair of transistors, ALSO begin to conduct, potentially causing lots of current to flow. I don't fully understand why yet. But the lower right most transistor, switches on, well before the lower left hand one.tl;drBottom right transistor conducts while the top transistor is still full on, potentially causing lots of current to flow.The bottom left transistor struggles to turn the top transistor off, because it is held up, by the diode and the top conducting transistor.Eventually (about 1uS), things settle down, but it is TOO late, because the 500KHz, has changed state again. (I set it to 50% on off duty cycle).I have NOT spent enough time with it to be sure of the exact faults/diagnosis, I also may have NOT chosen the best component parts. So if you want to say the circuit is still 100% fine until proven otherwise, or insist it is built and tested, rather than simulated. I already agree!I have NOT properly checked how bad the possible shoot through condition(s) are, because I had spent too much time with SOMEONE ELSE's project, as it is.Also the FET the OP is specifying, p-channel, seems to be fairly slow as well. Making 500KHz, even more out of reach, as well. (Yes it can reach that frequency, but spends too much of its time, potentially partly on, which would probably make the circuit inefficient). I did NOT use the OPs specified part, as it was NOT built in to the simulator. I did not want to download the correct spice model, as I don't want to spend that much time on it.If it was me, I would go for the Fet driver chip and be done with it.

author: matseng
author_rank: Frequent Contributor
timestamp: March 06, 2016, 09:40:55 am
content: With some Baker clamps and reducing the top resistor (R1) it looks kinda good at 500KHz having a load capacitance of 10nF.In steady-state the circuit draws 0.3watts when the input is high and 0 when input is low. It can be reduced by increasing the value of R1 at the expense of the wave shape.EDIT: I saw that the drive was 5 volts, not 12. But that doesn't change the result...

author: MK14
author_rank: Super Contributor
timestamp: March 06, 2016, 09:55:37 am
content: Quote from: matseng on March 06, 2016, 09:40:55 amYou've got nice clean 12V signals, coming from the 2.8V PIC MCU! (V2 on your diagram).2.8V (rather than your 12V) slows it down a fair bit, and has some resistance to it was well, as the PIC only likes to give a limited current. By the time the OP pays for all those extra components, the fet driver looks more and more interesting.

author: matseng
author_rank: Frequent Contributor
timestamp: March 06, 2016, 10:04:21 am
content: As I wrote in the edit it looks the same with a 5 volt input.I re-ran it with 2.8 volts input and with 50ns rise/fall times and it looks like this:The load capacitance of 10n is probably an order of magnitude too large for the fet that was discussed earlier as well.Still not too shabby for like 50 cents of parts...

author: MK14
author_rank: Super Contributor
timestamp: March 06, 2016, 10:06:50 am
content: Quote from: matseng on March 06, 2016, 10:04:21 amI'm going to try your modifications in my simulation circuit, and see how it goes.

author: matseng
author_rank: Frequent Contributor
timestamp: March 06, 2016, 10:16:12 am
content: Adding 470p caps in parallel with R2 and R3 improves the rise/fall times of the output a bit even if I add a 75 ohm resistor in series with the input to simulate the limitations of the microcontroller drive capabilities.Nope, I take that back. It only looked like that, but when I did a real comparison of both circuits in parallel the changes was just changes, not improvements...

author: MK14
author_rank: Super Contributor
timestamp: March 06, 2016, 10:23:22 am
content: Quote from: matseng on March 06, 2016, 10:16:12 amMines working reasonably well, now. I tried some of your changes, stage by stage. Amazingly, simply changing from the 2n3904's which were behaving badly/slowly on the simulator. The 2n2222's, have fixed it, and 500KHz, at least works now.How did you export the pictures/diagrams from LTSPICE ?I can't quickly see how to do it.Googling it seems to say I need to create printed PDFs. This would take some time for me to set up.

author: Zero999
author_rank: Super Contributor
timestamp: March 06, 2016, 10:28:25 am
content: It looks like I've been beaten to it. Yes, it's the storage time which was causing the problem.Regarding base resistor bypass capacitors: perhaps 470pF is too big? Did you try 100pF?

author: matseng
author_rank: Frequent Contributor
timestamp: March 06, 2016, 10:32:52 am
content: I use OSX so I just do a cmd-shift-4 to create a partial screenshot. I'm not aware of any other way of doing that - and the OSX LTspice is two orders of magnitude suckier than the Windows version...For me the 3904's perform about the same as 2n2222, but the old standby BC547B is quite bad here.

author: matseng
author_rank: Frequent Contributor
timestamp: March 06, 2016, 10:39:58 am
content: Quote from: Hero999 on March 06, 2016, 10:28:25 amMmmm... The Miller capacitance effect strikes again. Putting the transistors in deep saturation is a bad thing when it comes to rapid switching. To be fair I've been simulating and building circuits like this for a while now deigning a computer out of DTL-style discrete parts. Running at 2.4 volts and not really caring about having a low power consumption it's quite easy to reach quite good speeds.Yes, I swept the caps from 50p up to 1n without any joy here... They do make quite a difference in my logic gate designs though...

author: MK14
author_rank: Super Contributor
timestamp: March 06, 2016, 10:51:28 am
content: The "slow" ones, had the pulse slowed to 250KHz. The fast ones are full 500KHz.

author: MK14
author_rank: Super Contributor
timestamp: March 06, 2016, 11:50:08 am
content: Quote from: Hero999 on March 06, 2016, 10:28:25 amSorry for initially criticizing your circuit, when my choice of general purpose transistor, tended to spoil it.At a quick glance of the datasheets, the 2N3904 and 2N2222, don't seem too different.I've NOT got the inclination, to try it for real. But it would be interesting to know EXACTLY what the difference(s) is, that is causing the effect.The datasheet does seem to say that the 2N2222, is somewhat suited for fast circuits, whereas the 2N3904, does NOT sound suitable for such circuits.Maybe there is an oscillation/ringing (I vaguely remember seeing it), which is slowing things down.The ringing could be fooling the simulator, as it could be unsettling the calculations (guess, on my part). Or if real, it still makes sense, that it slows the response time down.But as you both mentioned earlier. Maybe it is just due to the slowdown effects of some transistors. Miller effect etc etc.

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: March 06, 2016, 11:52:13 am
content: Hi,Here is an idea for you:These are the results, 500 kHz square wave:The circuit is inverting, logic low turns on the MOSFET.I have attached the model.Regards,Jay_Diddy_B

author: MK14
author_rank: Super Contributor
timestamp: March 06, 2016, 11:54:31 am
content: Quote from: Jay_Diddy_B on March 06, 2016, 11:52:13 amYour results are beginning to look quite good!Maybe we should use this OP's problem, as the next competition to win a big prize. The best LTSPICE IV simulation results, WINS! (Joke, and I would come last!).

author: danadak
author_rank: Super Contributor
timestamp: March 06, 2016, 12:59:05 pm
content: An interesting ap note -http://www.irf.com/technical-info/appnotes/an-937.pdfRegards, Dana.

author: Simon
author_rank: Unknown
timestamp: March 06, 2016, 01:28:51 pm
content: I've been on this merry go round for a couple of days and have opted for a mosfet gate driver. They exist for a reason, sadly often more expensive than the mosfet itself.

author: nour
author_rank: Frequent Contributor
timestamp: March 08, 2016, 04:57:43 am
content: Quote from: Simon on March 06, 2016, 01:28:51 pmI have been for a couple of weeksif you are going to switch one or two mosfet I think integrated driver would be cheap and quick solution to gobut if you are going to driver 10+ mosfet, you will need to consider the costcurrently I am working on something that require switching 30+ mosfet (stepper drivers) so go figure

author: MK14
author_rank: Super Contributor
timestamp: March 08, 2016, 05:11:00 am
content: Quote from: nour on March 08, 2016, 04:57:43 amI'm rather surprised you can't just drive them all from your (presumably) digital signals ?MCU or whatever.There are plenty available (MCUs) with partly higher drive current pins, and can be further speeded up with low cost (suitable) logic gates/buffers whatever. Even doubling up or more the gates, to achieve even higher speeds.Is it some kind of severe microstepping scheme (high accuracy), or VERY powerful steppers or something ?Typically I would expect them to be driven directly from the MCU (or logic as just described).EDIT: On reflection, I usually let off the shelf ICs, perform microstepping for me.Maybe if you have a sophisticated microstepping scheme, you need to turn the mosfets on/off VERY quickly.EDIT2:SORRY!I've been a bit foolish.I'm use to relatively slow steppers, with on-off control operation and/or microstepping via off the shelf ICs.Presumably you have got a sophisticated, high (freq) PWM scheme, hence the fast on/off mosfet requirements.Sorry again!

author: Simon
author_rank: Unknown
timestamp: March 08, 2016, 06:50:53 am
content: The problem is charging and discharhing the gate capacitance quickly. Also if you have a long trace to your mosfet gate the inductance will cause oscilation. One microchip driver actually comes in 2 pin out versions so that whichever side of the mosfet your on or it's pinout you can straddle the driver right across the mosfet with minimal trace and inductance.

author: MK14
author_rank: Super Contributor
timestamp: March 08, 2016, 07:51:39 am
content: Quote from: Simon on March 08, 2016, 06:50:53 amThe bit that I still can't quite get my head round. Is WHY are mosfet drivers, so so expensive ?It's somewhat crazy, you can get a full micro controller from Microchip, with somewhat hefty capabilities for say $0.39Yet their quad fet drivers are about four times ($1.39/$1.67) that value, in quantities of 5K.A long time ago, MCUs were quite expensive, but transistors and stuff, were considerably cheaper, in general.I wonder why mosfet drivers are so expensive.Presumably they are a major electronics engineering marvel in their own right. Needing lots of IC process steps, to make them.Even so, one would have thought that they can sell so many (at the right price), that they can sell them cheaply.Another possible factor, is that I think it needs P channel mosfets, so that it can rapidly switch the fet, BOTH on and off. That probably is making it rather expensive.

author: Simon
author_rank: Unknown
timestamp: March 08, 2016, 08:00:39 am
content: Yes they do need some really good output mosfets of both polarities. Thing is while they on average can handle mA continuously they are expected to handles amps in small peaks.

author: MK14
author_rank: Super Contributor
timestamp: March 08, 2016, 08:07:27 am
content: Quote from: Simon on March 08, 2016, 08:00:39 amThanks for the explanation.Which probably means large (relatively speaking) die area.Hence EXPENSIVE production costs.One often encounters various weirdly (apparently way over priced) components and stuff in Electronics. But I guess it helps make it fun and interesting.E.g. I initially found it strange that when a component is beginning to be withdrawn (phasing out/stopping production), the prices can immediately go very high for it. I think I know why now (manufacturers getting scared their PCB layouts will need changing etc, so they buy up all available stock).Supply and demand, can sometimes do odd things as well.

author: ali6x944
author_rank: Frequent Contributor
timestamp: March 08, 2016, 10:22:47 am
content: use an open collecter drive with a schottkey from the gate to the emitter.

author: ali6x944
author_rank: Frequent Contributor
timestamp: March 08, 2016, 10:32:05 am
content: or use a tri-state buffer array. like SN74LS541or use an inverter like 74ls04.

author: dom0
author_rank: Super Contributor
timestamp: March 08, 2016, 10:46:15 am
content: Smart power logic (smart switches, FET drivers) need complicated layouts to combine high performance FETs and logic on the same die, i.e. lots of processing. A textbook I have claims that these are way more complicated to make than old MOS logic (2+ V).

author: matseng
author_rank: Frequent Contributor
timestamp: March 08, 2016, 10:52:55 am
content: Quote from: Simon on March 08, 2016, 08:00:39 amIs really a P-channel required? With a charge pump and level shifters N-channel fets can be used at high side as well. In an integrated solution that might give more bang for the bucks compares to trying to make good-performing P fets.

author: MK14
author_rank: Super Contributor
timestamp: March 08, 2016, 10:55:42 am
content: Quote from: dom0 on March 08, 2016, 10:46:15 amI can WELL believe it!Some things are extremely complicated to do. But almost everyone else outside of that particular industry or sector, or even very narrow field, is completely oblivious as to how much of a nightmare it actually is.For example, three clever people, are famous for inventing the first transistor, around 1947/8.BUT the really massively difficult part, was finding out/inventing how to mass produce reliable/cheap and useful transistors.This took another decode or so, and effectively (just about), also involved inventing the first early integrated circuits. As the "shaping", of transistors and IC masks, are VERY similar concepts. Or even identical.Funnily enough, Edison was one of the early inventors of electronic valves/tubes. BUT he did not realize their importance, so just patented it and moved on.A lot of early history has some amazing stories associated with it.

author: MK14
author_rank: Super Contributor
timestamp: March 08, 2016, 11:00:51 am
content: Quote from: matseng on March 08, 2016, 10:52:55 amI'm going to take a wild guess here. So feel free to throw a heavy lump hammer, made out of hand crafted, discrete transistors, into a DTL Flip-flop, so it continually flops me over the head, until I FLIP over into submission.Maybe the extreme gate transitions that chip (FET driver) needs, would consume too much of the charge pumped capacitor charge (being an IC capacitor, it would have a limited capacity, and use up tons of space, if bigger valued), and/or the complementary N and P channel method, may allow balancing stuff to minimize self oscillation (ringing) etc, while the huge and immensely fast, transitions takes place.By the way, what are you using or planing to use as memory for your discrete transistor DTL computer ?I'm curious.

author: matseng
author_rank: Frequent Contributor
timestamp: March 08, 2016, 11:20:07 am
content: I was only thinking aloud about the n vs p fets for an integrated fet driver. I haven't actually looked into that at all....Well, for my discrete computer I plan to have four kinds of memory - why be limited to just one when you can make life harder. Since it's a Harvard architecture (I.E separate data & code memories) it makes kinda sense.1) The Data RAM (8 bits wide) will be with discrete edge triggered D-style flipflops. They require a lot of parts for each bit to have good read and write speeds.There will bi a metric shitton of pcb's for any reasonable amount of memory. I most def need a pick n' place machine. Just populating a few hundred pcbs in China will cost almost as much as a Neoden machine. And with SOT's and 0603's any neoden machine should be good enough even without vision.The code memories (11 bits wide) I plan three different versions of:2) Code RAM A two transistor memory cell with some diode overriding logic to force it to set itself into 1 or 0. This is rather slow for writing, but can give full read speed.3) Code "EPROM". A less compact diode matrix with jumpers for each diode to set the bits.4) Code "ROM". A compact diode matrix type memory with diodes soldered into a grid on the pcb. So when the monitor and commin library functions is done and debugged I can just transfer the code from the EPROM or RAM boards into the ROM boards.

author: MK14
author_rank: Super Contributor
timestamp: March 08, 2016, 11:35:16 am
content: Quote from: matseng on March 08, 2016, 11:20:07 amWOW! and thanks for the information.That's a VERY big commitment, to do all that.How are you solving the following problem ?The microcode decoding "ROM" ?Possible solutions are:(1)...There is NONE, you are using a different type of cpu model, such as "severe" RISC design. (severe is NOT the right technical term, but to differentiate between that and something which still might have a microcode ROM in it).(2)...It will be hard wired diodes etc, like your EPROMs etc. But my concern is that it would be a REAL PAIN to debug it!(3)...It will initially be "ram", so you can change it like crazy, for test/debug/development reasons. Then later either always initialize that ram, or replace the final code with ROM/EPROM(4)...{Cheat} Use standard SRAM initially. Then when code is ready/complete/stable, you make another ROM/EPROM board, with the final debugged microcode.(5)...Determine microcode via FPGA and/or simulator and/or emulator. So you can set the microcode in stone, early on.My best guess now that I have typed all this stuff, is that there isn't any ?I'm convinced 4 is NOT the right answer, and consider 5 unlikely.Pity you aren't hand winding individual core memory elements. Then RAM/ROM/EPROM/MICROCODE etc, would all be one and the same.Also I know where you live now. I just need to borrow a thermal camera (from the other thread), go approximately to your location, then when your computer is finished and on, I'll search for the place, emitting HUGE amounts of heat.Or just ask the locals, whose place has the slowest computer, possible.Then enjoy seeing and discussing your new, self build/design computer. As I love stuff like that.

author: matseng
author_rank: Frequent Contributor
timestamp: March 08, 2016, 12:03:32 pm
content: It's a helluva big project :-) That currently are put a bit on hold when it comes to any practical tests since I'm in the middle of a move from Malaysia back to Dubai...Well, the compete plans are not drawn out yet, I'm building/planning the major blocks first and then time will tell how to glue them together. It's a bottom up version. I could of course have done it the other way, started with all my blocks in standard TTL ICs and then made the glue in discrete, followed by replacing the chips with insane amounts of PCBs of discretes...I currently hope to make it a single cycle processor (https://en.wikibooks.org/wiki/Microprocessor_Design/Single_Cycle_Processors) where all info required by one instruction is already there in the 11 bits of code. Then microcode is basically not really necessary and can be replaced by a simple lookup table to enable the correct muxes and other bits and bobs in the modules. At least this is what I hope :-)The machine will use quite a lot of power when fully operational. For instance the 16 bit program counter module (with an integrated single level stack) is pulling about 4 amps at 2.5 volts.... The Code ram modules (16 words each with two pcs of 4-to-16 decoders) are about 3 amps. And I plan to have 128 of them

author: MK14
author_rank: Super Contributor
timestamp: March 08, 2016, 12:17:34 pm
content: Quote from: matseng on March 08, 2016, 12:03:32 pmWe are completely back on topic then!Because 128 (Code RAM modules) X 3 Amps = 387 Amps + other stuff.So you will either need a MEGA super duper, fast FET driver, to drive the power FET(S), to make the MASSIVE SMPS.Or alternatively you will have to bid, on an old pre-historic super Mainframe computer.I.e. You may have to get hold of an old Cray1 SuperComputer to *Power* your "new", DTL computer.I.e. You raid/steal the massive power supplies from an old supercomputer, just to get/make a PSU big enough.(On a more serious note, You can buy large industrial metal framed (or similar), single low voltage SMPS, quite easily, but you may need quite a few of them, by the sound of it).When/if you finish it, you could send it to Dave, for a (non-destructive) tear-down and interview session. I originally typed this as a joke. But on reflection, it is not such a crazy idea. But I think the computer will weigh and be physically, a tiny little bit too much, to travel as hand luggage (joke).4 Amps for *JUST* the 16 bit PC counter, sounds rather HUGE. But I later realized, you have gone for VERY low value resistors, for MAX speed, but terrible power consumption.The room is also going to get very hot. Your design reminds me a bit of the bottom end (simple) PIC micros. They are sort of Harvard with this sort of combined word thing ("all in one", word).

author: matseng
author_rank: Frequent Contributor
timestamp: March 08, 2016, 02:12:43 pm
content: At 2.5 volts even 384 amps isn't a really huge amount of power. It's less than 1000 watts - about what a decent gamer PC is using. So if I can get the entire system running at 2 KW or less I consider that an success.But distributing 2.5 volts from a single point, or even a few points, is not reasonable. It would require a nasty amount of really thick wires and/or copper busbars. Then I rather cheat a bit by scattering many cheap 4/5 amp buck smsps around the system as needed and then power them by a few of the common 12V 200/300 watt PSUs usually used for LED lightning.If I then some day would go full retro (or full retard) I could special order a bigass toroid transformer and make a 2.5 regulator of or a hundred or so 2n3055's and a equally bigass heatsink. :-) But with the losses there I'd probably need another separately fused mains circuit.

author: MK14
author_rank: Super Contributor
timestamp: March 08, 2016, 02:28:21 pm
content: Quote from: matseng on March 08, 2016, 02:12:43 pmI agree.The 384 Amps sounded like tons of current/power. I did not pay enough attention to the voltage.I think some really old supercomputer/mainframes, e.g. Cray1 supercomputer.Would have had trouble making such a huge power supply.So it used a pair of GIANT motors, one an alternator, the other a motor, mechanically linked.By careful control of the rotational speed, the voltage could be regulated.In those days (around 1976 I think), such a huge current (it was something crazy like tens of thousands of amps, maybe more, I'm not sure though), would have been difficult to do with just the semiconductors of the time.But maybe it could have been done with semiconductors then as well.So a 2600F 2.5V UltraCapacitor, will power your entire new computer build for ages.Or hundreds of milli-seconds, whichever comes first.The thing about a linear power supply, is that the 2.5V, final regulated voltage, would still need to be a fair bit over the 2.5V, so the regulators can work. Also the bridge rectifiers would need extra voltage.So it could end up being 8V * 384A = 3072W + transformer losses = Get money back from your computer build by renting out "Sauna Rooms".3072W * 1.1 (transformer losses) = The biggest and best sauna in your area! (Joke).

author: Ian.M
author_rank: Super Contributor
timestamp: March 08, 2016, 03:54:46 pm
content: Hmm. Getting regulated smoothed low voltage DC efficiently with '60s technology will be *DIFFICULT*. I have visions of a massive multi-disk homopolar generator with Mercury wetted brushes driven by a big universal motor with a Heath-Robinson governor system for motor speed and generator field coil current.

author: MK14
author_rank: Super Contributor
timestamp: March 08, 2016, 04:04:36 pm
content: Quote from: Ian.M on March 08, 2016, 03:54:46 pmThat's similar to what I had (approximately) envisaged.In its day, the Cray 1, was an incredibly powerful computer.I would have loved to have met Seymour Cray.Source:http://research.microsoft.com/en-us/um/people/gbell/craytalk/sld062.htmQuote

author: step_s
author_rank: Regular Contributor
timestamp: March 10, 2016, 02:27:33 am
content: Hi again guys.Thanks for all of the great answers. It seems like you have had fun trying to figure this one out xDBut looking at the circuits, they seem to be quite complex for the tiny project I'm currently on.So i have been scouting around the web for solutions and came up with some stuff I wanted to hear your opinions on (Sorry for the long links):1: A CMOS configuration with two smaller MOSFETS driving the bigger one, where the gate capacitance of the smaller MOSFETS is 1/5 or lower, than the big. This would mean a pullup resistor setup, with only 1/5 of the loss. Found this one very cheap.http://www.newark.com/nxp/pmgd290ucea/mosfet-transistor-np-channel-725/dp/12X8769?ost=PMGD290UCEA&selectedCategoryId=&categoryName=All+Categories&categoryNameResp=All%2BCategories2: A mosfet driver. . . Yes, normaly they are expensive, but I did manage to spot a cheap one that would be able to drive a synchronous buck converter setup, or just a single MOSFET.http://www.newark.com/on-semiconductor/ncp5901dr2g/mosfet-driv-high-low-side-soic/dp/42Y0833The datasheet does confuse me a bit, since it seems to be tri-state, and figure 5 is quite strange to me. . .It seems this driver needs around 3.4V logic input as high, so I would have to drive the MCU at a higher voltage for it to work though.Please let me hear your thoughts

author: Simon
author_rank: Unknown
timestamp: March 10, 2016, 07:53:49 am
content: Your first one is not a mosfet driver but a 2 channel mosfet. Unfortunately farnell are a mess when it comes to categorizing things.

author: Zero999
author_rank: Super Contributor
timestamp: March 10, 2016, 11:12:31 am
content: What about a CMOS level shifter such as the CD40109B or CD4504B before the emitter followers?

author: Simon
author_rank: Unknown
timestamp: March 10, 2016, 02:59:02 pm
content: isn't a gate not verry good as it's not a hard enough drive ?

author: Zero999
author_rank: Super Contributor
timestamp: March 10, 2016, 07:34:19 pm
content: Yes a logic gate would be slow. The idea was to use it to drive a pair of emitter followers. I suppose I should post a schematic.

author: Ian.M
author_rank: Super Contributor
timestamp: March 10, 2016, 07:41:47 pm
content: While that would work nicely from 12V, with a typical MOSFET with a gate threshold voltsage >3V, delivering at least 10.5V swing at the gate, the O.P. wants to use 5V, so wont see more than 3.6V swing at the gate, and is already concerned about the OFF state level.Unless one is designing for volume production, its generally more cost-effective to bite the bullet and pay for an appropriately specified MOSFET driver IC.

author: chris_leyson
author_rank: Super Contributor
timestamp: March 10, 2016, 08:23:04 pm
content: Building a bjt driver for 5V threshold mosfets is going to be hard work. I would level translate your 2.8V logic levels to 5V with a jfet or mosfet level translator, sorry this is the best link I could find,https://learn.sparkfun.com/tutorials/bi-directional-logic-level-converter-hookup-guide. I've used this I2Clevel translation from 3V3 to 5V0 they work really well.Anyway, use a small mosfet to translate to 5V, buffer your 5V logic signal with a hex or octal HC or AHC buffer IC. If your hex or octal buffers can deliver 20mA then you've got 120mA or 160mA gate drive, fast rise and fall times, enough for a 5V threshold mosfet.

author: Ian.M
author_rank: Super Contributor
timestamp: March 10, 2016, 09:04:50 pm
content: That's over-complex. 74ACT logic is fast,relatively high output drive capability and has TTL compatible inputs so is happy with logic 1 levels right down to 2V. I'm thinking 74ACT245, with /OE and DIR strapped low, and all the B pins paralleled as inputs, and A pins paralleled as outputs. One gate will drive to within 0.5V of the rails with a 25mA load, will settle to within mV of the rails when loaded less than 50uA and it can deliver more like 75mA in the center third of the swing. Times eight, that's 200mA of fast drive to 5V levels and is going to be a lot better than can easily be done with discretes.

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: March 11, 2016, 03:04:52 am
content: Hi,Has the OP told us the part number of the MOSFET that he wants to drive?Some MOSFETs with low gate charge are easier to drive than others.Regards,Jay_Diddy_B

author: Ian.M
author_rank: Super Contributor
timestamp: March 11, 2016, 04:19:31 am
content: In Reply #6: SI2301Seehttp://www.vishay.com/docs/70627/70627.pdffor datasheet.That's P channel with a gate threshold of only 0.45V, and a max gate charge of 10nC, which he wants to switch at up to 500KHz. To do that with reasonable losses is going toneed a couple of hundred mA gate drive.

author: Simon
author_rank: Unknown
timestamp: March 11, 2016, 07:31:03 am
content: Oh, that small. Does ot need a driver ? won't the 40mA drive of a micro do it ? if not it needs a proper gate driver just so that another mosfet can fully pull the gate high to get under the 0.45V of the gate theshold.

author: Ian.M
author_rank: Super Contributor
timestamp: March 11, 2016, 08:25:01 am
content: I was figuring it as: half period of 500KHz is 1us. For switching time not to exceed 10% of the period, to charge/discharge 10nC in 100ns needs 100mA. That's a fairly high proportion of the period, and it would probably be better to aim for 5%., requiring 200mA. It looks like my suggestion of an octal 74ACT buffer with all sections paralleled would probably work.

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: March 11, 2016, 11:55:28 am
content: Hi,In the original post the OP said:"The MC is switching at 2kHz" which is 500us not 500 kHz.The OP shows a circuit with an N channel MOSFET, in the first post.In reply 6, the Si2301DS is P channel.I think we need clarification of the requirements, 2 kHz is a lot easier than 500kHz.Regards,Jay_Diddy_B

author: chris_leyson
author_rank: Super Contributor
timestamp: March 11, 2016, 12:27:26 pm
content: I went back and read the original post, 2kHz switching, so a simple level shifter will be fast enough.

author: Ian.M
author_rank: Super Contributor
timestamp: March 11, 2016, 12:31:39 pm
content: The O.P admitted 2KHz was a mistake:Quote from: step_s on March 04, 2016, 05:27:40 pm

author: chris_leyson
author_rank: Super Contributor
timestamp: March 11, 2016, 12:42:13 pm
content: Thanks Ian.MChris