Electronics > Beginners
Fast square wave with arduino and mosfet
radiolistener:
--- Quote from: T3sl4co1l on September 20, 2019, 07:30:24 am ---Millihertz or megahertz? It matters, rather a lot.
You can still connect an Arduino to something that can make 600MHz
--- End quote ---
He talking about 500-600 milliHertz (0.5 - 0.6 Hz)
MarkF:
I believe you have all missed the boat here.
If you read the words around his frequency numbers
"To power it i need a really frequent square wave. 1 mhz would be nice but maybe about a 500-600 mhz minimum.",
I believe he miss typed and would like to drive his circuit with a 1 MHz square wave and would settle for a 500-600 KHz frequency.
Really frequent does not indicate milliHertz.
And 500-600 mhz is not less than 1 mhz.
Mechatrommer:
frequent is a subjective term, almost useless in engineering term. one can say he bought a DSO every day (11uHz), but damn thats "frequent"
MarkF:
--- Quote from: Mechatrommer on September 20, 2019, 05:13:26 pm ---frequent is a subjective term, almost useless in engineering term. one can say he bought a DSO every day (11uHz), but damn thats "frequent"
--- End quote ---
A little "common sense" goes a long way!
fourfathom:
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);
}
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version