| Electronics > Beginners |
| Fast square wave with arduino and mosfet |
| << < (8/10) > >> |
| fourfathom:
--- Quote from: ManlishPotato on September 21, 2019, 02:23:42 pm ---I guess what basically i'm suggesting is to replace the button operated switch with a mosfet, and turn it off and on at just the right time to achieve stable oscillation. --- End quote --- That "stable oscillation" part is going to be quite tricky. Driving the LC tank with a mosfet, 50% duty-cycle, at anywhere the natural resonant frequency of the tank will just show you the frequency of the driving squarewave. Even lightly-coupled to the tank as I have mentioned, the frequency will be forced by the driving signal. Your best bet may be to set the driving frequency to be much lower than the tank resonant frequency (say 10x or 100x lower), and with your scope observe the ringing that follows the "off" portion of the driving waveform. You should initially see a high voltage transient ringing at the tank resonant frequency that decays over time. The amplitude and duration depends on mainly the "Q" of the inductor and the speed of the mosfet cutoff. You will still want to compensate for the mosfet drain capacitance and scope probe capacitance. You will want a current-limiting resistor in the drain circuit, and do be careful that the transient voltage doesn't exceed the mosfet specs. |
| ledtester:
--- Quote from: ManlishPotato on September 21, 2019, 02:23:42 pm ---I guess what basically i'm suggesting is to replace the button operated switch with a mosfet, and turn it off and on at just the right time to achieve stable oscillation. --- End quote --- If your goal is just to get a stable trace on your DSO so that you can measure the period, as fourfathom said, you only need to pulse the tank once in a while -- like once a second or perhaps once every 1/10th of a second. If your goal is to produce a continuous signal at the resonant frequency of the tank then I would recommend the LM311 circuit I referred to above. It naturally finds the right time to inject a new impulse. This is important as to not affect the frequency of the oscillation. You have the same situation when pushing someone on a swing set... if you push them at the bottom of the swing trajectory you will make them go higher without affecting the period and frequency of their motion. If you push them at any other point you will change the amount of time it takes to complete the next swing. |
| alsetalokin4017:
Screenshots below show a tank circuit ringing in response to a square pulse from a mosfet, and a tank circuit excited by "scratching" the terminals of a 9v battery to produce a spiky pulse. The frequency of the inductive ringdown is easily measured in each case, and it's a good exercise in scoposcopy, especially using the single shot mode to capture the "scratch" ringdown. This frequency, along with the known capacitance or inductance, can then be used in your favourite tank circuit calculator to determine the unknown value. http://www.1728.org/resfreq.htm This video may also be of interest to the OP: |
| JustMeHere:
--- Quote from: ManlishPotato on September 19, 2019, 08:32:50 pm ---BTW, why do you use i resistor in series to the gate of the mosfet, isn't mosfets voltage driven unlike bjt's? --- End quote --- This is to stop the mosfet pin from drawing/sinking too much current when it changes state. It looks like a small cap when it does this. So it behaves as a straight short for a (very) brief time. There should also be a high value pull down between this resistor (100k to 1M) and the pin. This will stop the pin from floating during programming and chip start up. |
| ManlishPotato:
Update! 25-09-2019 Hey! I have finally had som time to work on the project! I was able to excite the tank by using a push button like in the schematic suggested by ledtester :) That gave me a stable ish frequency that when converted comes reasonably close to the actual value. The values were 0.15 mH and 10mH and the cap was a 2.2nF ceramic capacitor. I have tried to use a mosfet in place of the P Button, but that gave me an inaccurate frequency. I tried to "lightly" couple the fet like fourfathom suggested, but i had no luck with this, could you suggest which values of coupling capacitor and resistor from drain to V+ should be used? I included a schematic with the mosfet and the produced waveform after the push button is released. Would it be possible to get close to the actual resonant frequency, or should i use something like a bjt or igbt instead? Lots of thanks! //Benji |
| Navigation |
| Message Index |
| Next page |
| Previous page |