| Electronics > Beginners |
| Fast square wave with arduino and mosfet |
| << < (5/10) > >> |
| ManlishPotato:
Sorry for the radio silence! To answer you questions: 1. I indeed ment 1MHz and kHz500-kHz600 minimum (was writing late) 2. I don't really need help with the coding bit, but thanks for the suggestions! (Although i believe you can achieve a 16MHz squarewave locked at 50% with a normal atmega328) Unfortunately i didn't really have much time to try it out today (so the way i actually wired it might be wrong) but i'll include a picture of the dso (with a low frequency of about 490Hz) and a schematic. I think i have somewhat of an idea whats wrong, but i'd rather not say because it could extremely stupid haha. I'll try to answer some of the other questions you had individually. PS. super impressed by the amount and quality of replies! |
| ManlishPotato:
Accidentally used a 150ohm resistor, will a have to try a smaller value next time! --- Quote ---Start with a series resistor of 100 Ω. I expect 50 to 100 ohm will work best. --- End quote --- |
| ManlishPotato:
--- Quote ---What are the values of your capacitor and inductor? And what exactly do you want to accomplish? --- End quote --- Sorry! Can't check what the value of the cap was right now, and I don't know the inductance of the coil, that was the start of the project, to observe the resonant frequency, to calculate the inductance. And that other stuff you said was pretty interesting, I'll have to try that out if i can't get this to work. |
| ManlishPotato:
--- Quote from: fourfathom on September 20, 2019, 05:45:20 pm ---Assuming we are talking about a square wave in the 0.5 to 1.0 MHz region, let's look at the LC tank circuit. I suppose the purpose is to get a clean, low-spurious output (jitter, harmonics, etc), signal. This will look somewhat like a sinewave at the filter output. Will this be used directly, or will it be sent to a logic stage for squaring-up? This affects the design of the tank circuit. In fact, if the tank load impedance is relatively low, for maximum efficiency and minimal power dissipation in the MOSFET driver, a simple LC tank may not be the best approach. When using a square wave drive you usually want an inductive input impedance to allow the MOSFET to spend as little time as possible in the linear region. Look at "Class E" amplifier networks, or perhaps a simple "Tee" filter. These details will depend on the spectral purity and the power levels desired. As for the Arduino loop, how many cycles do the bit-test and manipulation operations require? Something like this should give you a 50% duty-cycle: while(1){ digitalWrite(OUTPIN, !digitalRead(OUTPIN); } --- End quote --- Wow I'll have to read through your reply a couple of times to understand it. But really, i'm not looking for efficiency and exactness, i just want to get in the ballpark of the right resonant frequency, to calculate the inductance of the coil. |
| fourfathom:
--- Quote from: ManlishPotato on September 20, 2019, 07:06:51 pm ---Wow I'll have to read through your reply a couple of times to understand it. But really, i'm not looking for efficiency and exactness, i just want to get in the ballpark of the right resonant frequency, to calculate the inductance of the coil. --- End quote --- In that case most of what I said is pretty useless. But you may still want to only lightly couple the FET to the tank circuit, otherwise the drain capacitance will effect the resonant frequency. |
| Navigation |
| Message Index |
| Next page |
| Previous page |