Skip to content

notes to self

a document of a plodding mind

Menu
Menu

ngSpice: single frequency FM modulated signal generation

Posted on May 13, 2012May 13, 2012 by abram

ever wanted to see how that 2N2222 might hold up as a linear RF amplifier? here’s a handy feature of ngSpice that i found recently. i’m rather new to ngSpice and at first was somewhat frustrated by its differences from other SPICE variants. however, i’ve earned a deep appreciation for it and its integration with the gEDA suite.

V1 n1 0 sffm(2 24 10k 5 1k)
.tran 0.01ms 2ms
.plot n1

the above code generates the waveform seen above. the corresponding values in the sffm() function run something like this.

Parameters Default value Unit
Vo (offset) Ampere or Volt
Va (amplitude) Ampere or Volt
Fc (carrier frequency) 1/Tstop Hz (Hertz)
Mi (modulation index)
Fs (modulation frequency) 1/Tstop Hz (Hertz)

Leave a Reply Cancel reply

You must be logged in to post a comment.

about

Abram Morphew is an electrical engineer, bedroom musician, composer, naturalist, and amateur scientist. I play music in the the binary marketing show. This blog is a catalog of stuff that I make or bits of information that I think could prove useful later on when memory fails me.

 

I currently hold an Extra Class Amateur Radio Operator license and transmit on the air as K2NXF.

Tags

40m amp amplifier Arduino atmega328 atmel audio bash bjt breadboard circuit code cw delay digital effect effects electrical electronics homebrew lfo linux LM386 mellotronium music no. 5 opamp oscillator pcb pedal photos php pt2399 pwm radio rf schematic stereo stompbox synth tape TDA2040 tl072 TL082 tube

Social

  • Instagram
  • LinkedIn

Space Weather


© 2026 notes to self | Powered by Minimalist Blog WordPress Theme