Announcement

Collapse
No announcement yet.

Driving a JFET from a micro

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #61
    Originally posted by 6666 View Post
    Thanks, so far I have shied away from experimenting with a 4053 on breadboard because of having to ground all the floating pins, I have been driving my TX fets IRF740 gates direct from my micros, 12f683, 12f1840, just with a series resistor, I have found that a 740 is fully turned on with 4.7 volts, so with 5 volts works nice. Been trying to do away with totem pole drivers.
    es, that will work fine if the Drain current is not too high.

    Look at Fig 1 in the data sheet:
    https://www.vishay.com/docs/91054/91054.pdf

    This shows Drain Current verse Drain to Source Voltage with a series of Gate-Source Voltages.
    Then compare to Fig 2 and note that as the junction temperature increases a high Gate-Source Voltage is required.


    Y

    Comment


    • #62
      Originally posted by 6666 View Post
      Thanks, so far I have shied away from experimenting with a 4053 on breadboard because of having to ground all the floating pins, I have been driving my TX fets IRF740 gates direct from my micros, 12f683, 12f1840, just with a series resistor, I have found that a 740 is fully turned on with 4.7 volts, so with 5 volts works nice. Been trying to do away with totem pole drivers.
      My preference with the IRF740 is a 10V gate drive, I've seen some where 5V isn't quite enough. Also, the speed of turn-off depends on how fast you can remove gate charge, and the I/O drivers on a PIC are probably not the most robust for that. What you are doing works, but if you are looking for more performance then look at the gate drive.

      Comment


      • #63
        Gate drive is must.

        I've been trying to master out the Proteus and its simulator.
        Just to experiment with various gate drives these days.
        But i can't force it to work in one case.
        If i want to replicate Barracuda timing circuit and place CD40106 in simulator, its power pins are hidden.
        Clicking on its properties i can see the hidden pins and designate them power supply connections.
        But i have narrow choice.
        Either Vdd or Vss or GND.
        So i put battery in simulator and named its pins reversing them, so plus pole to be Vss and minus pole to be Vdd.
        When start simulations; it stops giving me errors!?
        So i can not use neither one chip and supply it between GND and Minus, because of that.
        Maybe is impossible in Proteus. And maybe i just don't know how to do it.
        Anyone more skilled with Proteus here?

        ...
        Simple two stage inverter can do the drive job just fine. With 2uS delay, which can be compensated later in code.
        I solved the problem how to implement Atmega in Barracuda and yet how to supply it "normally" between 0 and 5v.
        All i needed was level shifter made from inverters.
        Adding MUR460 between drain and coil benefited me 7uS more to lower main delay, from 35uS to 28uS.
        But adding level shifter added 2uS back again.
        So by now as it is; it can sample not earlier than 30uS.
        Detection on iron targets is never better.
        But more work is in progress...

        Comment


        • #64
          No response?
          As usual, i am on my own.
          Success after few attempts.
          Anyway... Proteus is real bijou!

          Click image for larger version

Name:	sim1.jpg
Views:	1
Size:	289.2 KB
ID:	357358

          Comment


          • #65
            Originally posted by ivconic View Post
            No response?
            As usual, i am on my own.
            Success after few attempts.
            Anyway... Proteus is real bijou!

            [ATTACH]50242[/ATTACH]
            No response?
            Not so many active here now, not like old days.
            I have never used proteus so cannot help you there, but glad you got it working, I like your setup, With the 740's I went old school with an amp meter and resistor on the drain, and pot and volt meter on the gate and just wound up the gate voltage untill a point was reached when there was no further increase in drain current which was 4.7 volts, so that fits in with 5 volts supply from micro, if there is a technical reason to go above that voltage I would be interested to hear about it, the 740 fet TX gate current load from the port of the micro is very low to what its claimed they can out put so I am hoping they will be robust enough , I may go back to totem pole but thats just more components on a bread board, I favour HER208 diodes over mur460, because the 208 has normal size leads

            Comment


            • #66
              Powering my UNO on the +5 and gnd pins it draws 45mA with no load on any output pin, thats with both on-board LEDS on

              Comment


              • #67
                Originally posted by 6666 View Post
                Powering my UNO on the +5 and gnd pins it draws 45mA with no load on any output pin, thats with both on-board LEDS on
                Funny! It never occurred me to measure current drain at those boards!
                So i checked now to see.
                Leonardo and UNO draws less than 10mA.
                Mega draws more, which leads me to suspect that something is wrong on the board.
                Which would be no wonder at all, that Mega was tortured hard during last couple years.
                Simplest check you can do is to check digital pins and their state.
                Are there any voltage on those or is anyone shorted to ground.
                Most frequent fault is digital pin shorted to ground due excessive load put on it.
                As i recall; 20mA is maximum per digital pin.
                Here are my measurements:

                Click image for larger version

Name:	UNO.jpg
Views:	1
Size:	280.8 KB
ID:	357364
                Click image for larger version

Name:	Leonardo.jpg
Views:	1
Size:	244.3 KB
ID:	357365
                Click image for larger version

Name:	Mega.jpg
Views:	1
Size:	227.9 KB
ID:	357366

                Comment


                • #68
                  6666, I don't think it's that simple.

                  It's not only about off state on on state of the mosfet, but transient effects.
                  When mosfetes are used as switching devices at frequency, the driving circuit and driving current, the gate charge (resistive load) is important consideration, especially when mosfet is driving an inductive load.
                  The power consumption of the drive circuit must be taken at operating conditions. All this can be calcuted of course, if you are maths braniac(not me!), there are tons of application notes available.

                  Comment


                  • #69
                    One possibility is your micro drives the mosfet and everything is hunk-dory, as soon as you up the frequency, the micro I/0 says bye bye.

                    Always better to put intermediate drive circuit between micro and mosfet for sure reliability, depending on the parameter of the switching device used.

                    Comment


                    • #70
                      Originally posted by dbanner View Post
                      ... if you are maths braniac(not me!), there are tons of application notes available.
                      Neither than me.
                      Usually it takes me less time to make it and test it "in vivo" than to simulate it and do all the maths.
                      So far i realized that Proteus is not almighty and can not simulate all possible cases.
                      For example; i replicated power supply stage from Barracuda in Proteus and it fails to simulate, reporting lot of mistakes.
                      ICL7660 works alright in separate simulation but when completed with 79L05 and 78L05; it fails.
                      CD40106 supplied with GND - minus rail also works alright.
                      Some things are working well and surprisingly some very simple things fails at once.

                      Comment


                      • #71
                        Proteus has very good looking graphical interface.

                        I am using old xp machine after my laptop died.

                        The thing is in no way able to run modern software, I dare not connect to the internet on old machine with outdated antivirus definitions, that will be the end of it. I'm not even going to bother trying to upgrade.

                        Time for a new machine and laptop.

                        Comment


                        • #72
                          I found this circuit simulator very impressive for learning. Lots if example circuits.
                          http://www.falstad.com/circuit/

                          http://www.falstad.com/circuit/e-index.html

                          Comment


                          • #73
                            Sorry Invonic, I never used Proteus so can't help.
                            Originally posted by 6666 View Post
                            Not so many active here now, not like old days.
                            I have never used proteus so cannot help you there, but glad you got it working, I like your setup, With the 740's I went old school with an amp meter and resistor on the drain, and pot and volt meter on the gate and just wound up the gate voltage untill a point was reached when there was no further increase in drain current which was 4.7 volts, so that fits in with 5 volts supply from micro, if there is a technical reason to go above that voltage I would be interested to hear about it, the 740 fet TX gate current load from the port of the micro is very low to what its claimed they can out put so I am hoping they will be robust enough , I may go back to totem pole but thats just more components on a bread board, I favour HER208 diodes over mur460, because the 208 has normal size leads
                            Originally posted by dbanner View Post
                            6666, I don't think it's that simple.

                            It's not only about off state on on state of the mosfet, but transient effects.
                            When mosfetes are used as switching devices at frequency, the driving circuit and driving current, the gate charge (resistive load) is important consideration, especially when mosfet is driving an inductive load.
                            The power consumption of the drive circuit must be taken at operating conditions. All this can be calcuted of course, if you are maths braniac(not me!), there are tons of application notes available.
                            Yes, driving a MOSFET gate is not simple DC. There are other reasons:
                            1- the Gate capacitance resists the gate drive Voltage. This can be ignored IF what the MOSFET drive can be slow. However, if FAST transition, MOSFET OFF in a PI detector, is important then the gate drive must be able to source/sink lots of current to switch the MOSFET fast.
                            2- Did you look at figure 1 & 2 in the 740's data sheet?? This shows that 4.5V on gate is ok for lower drain current and lower temperatures. If drain current is higher OR the MOSFET's junction temperature increases then a higher gate Voltage is required.

                            Then there is the possibility of killing the processors output pin. I have done this so always take extra steps and parts to ensure the processor's pins never experience over Voltage or current.

                            For a PI detector MOSFET turn on time is not important since the coil current increases by the L/R time constant and we keep the coil on long enough for a 3-5 coil tau of steady current. However, the Coil/MOSFET switch OFF time is critical and best to switch off as fast as possible.
                            Therefore, I use a pull-up resistor, 3.3k, to turn on the MOSFET and a npn transistor to pull the MOSFET's gate low fast.
                            This has the added benefit of isolating the processor pin and applying 10-12 Volt to the MSOFET gate ensuring Full on at all conditions.

                            Comment


                            • #74
                              Originally posted by 6666 View Post
                              Not that I know what I am doing but wrote some UNO R3 code with Tinkercad code blocks, passes verify, I have set the first sample delay to 35 uS, I dont know how to make it variable
                              void setup()
                              {
                              pinMode(12, OUTPUT);
                              pinMode(8, OUTPUT);
                              pinMode(7, OUTPUT);
                              }

                              void loop()
                              {
                              // Bara TX 80uS
                              digitalWrite(12, HIGH);
                              delayMicroseconds(80); // pauses for 80 microseconds
                              digitalWrite(12, LOW);
                              // wait first sample delay, make variable
                              delayMicroseconds(35); // set at 35 microseconds till first sample
                              // first sample 42 uS
                              digitalWrite(8, HIGH);
                              delayMicroseconds(42); // pauses for 42 microseconds pulse width
                              digitalWrite(8, LOW);
                              // wait till second sample 120 uS
                              delayMicroseconds(120); // pauses for 120 microseconds between samples
                              digitalWrite(7, HIGH);
                              delayMicroseconds(42); // pauses for 42 microseconds pulse width
                              digitalWrite(7, LOW);
                              // wait till next tx pulse 25 uS
                              delayMicroseconds(25); // pauses for 25 microseconds till next TX

                              }
                              I was not sure that i will manage to find these infos on my hard disk so i didn't make any promises.
                              But now, randomly. looking up for quite different thing; i stumbled across these.

                              Code:
                              // val = analogRead(analogPin); ..........................  116 uS
                              // digitalWrite(13, HIGH); ...............................    4 uS
                              // digitalWrite(13, LOW); ................................    4 uS
                              // val = 100; ............................................    4 uS
                              // delay(1); ............................................. 1004 uS
                              // delay(10); ........................................... 10012 uS
                              // delayMicroseconds(1); ................................     4 uS
                              // delayMicroseconds(2); ................................     4 uS
                              // delayMicroseconds(3); ................................     4 uS
                              // delayMicroseconds(4); ................................     4 uS
                              // delayMicroseconds(5); ................................     8 uS
                              // delayMicroseconds(6); ................................     8 uS
                              // delayMicroseconds(7); ................................     8 uS 12uS
                              // delayMicroseconds(8); ................................     8 uS 12uS
                              // delayMicroseconds(9); ................................     8 uS 12uS
                              // delayMicroseconds(100); ..............................   104 uS 
                              // delayMicroseconds(96); ..............................    104 uS
                              // Serial.print(""); .....................................    8 uS
                              // Serial.println(""); ................................... 2080 uS
                              // Serial.print("H"); .................................... 1040 uS
                              // Serial.println("H"); .................................. 3120 uS
                              // Serial.println("He"); ................................. 4160 uS

                              These are some measurements that did than, to see how much time some Cpp commands will spend.
                              So as you can see; one "digitalWrite" will eat you 4uS. Two of those to manipulate pin = 8uS.
                              "Delay(xx)" !!! Hell no!
                              Etc.

                              Comment


                              • #75
                                So i took your code and did measurements:

                                Code:
                                void setup(){
                                pinMode(12, OUTPUT); 
                                pinMode(8, OUTPUT);  
                                pinMode(7, OUTPUT);  
                                }
                                
                                
                                void loop()
                                {
                                
                                
                                digitalWrite(12, HIGH); //..................... 4uS
                                delayMicroseconds(80);  //..................... 84uS
                                digitalWrite(12, LOW);  //..................... 4uS
                                delayMicroseconds(35);  //..................... 36uS
                                digitalWrite(8, HIGH);  //..................... 4uS
                                delayMicroseconds(42);  //..................... 44uS
                                digitalWrite(8, LOW);   //..................... 4uS
                                delayMicroseconds(120); //..................... 120uS
                                digitalWrite(7, HIGH);  //..................... 4uS
                                delayMicroseconds(42);  //..................... 44uS
                                digitalWrite(7, LOW);   //..................... 4uS
                                delayMicroseconds(25);  //..................... 28uS
                                
                                
                                }
                                                                              ---------
                                                                                380uS
                                So you have 380uS eaten time by Cpp to perform one loop.
                                Comparing to ~30uS-40uS if code is done using direct pin manipulation.

                                Comment

                                Working...
                                X