How do I simulate this waveform in LTSpice?

GopherT

Joined Nov 23, 2012
8,009
Yes. I am using a fan right now with a odd shaped blade. Plus I may not have done such a great job at paining the mark. I think that might be were the noise comes from.
Well, the good news is that a comparitor can turn that Bump into a 5v signal easily. If it is not long enough, you can connect a 555 to the comparitor as a one-shot to extend the duration of the peak, or use a flip-flop to square it up (and cut frequency in half (but that can be corrected in software). Everything is possible.

PS: or connect to a pin that has Interrupt-on-change flag.
 

Thread Starter

spinnaker

Joined Oct 29, 2009
7,830
Well, the good news is that a comparitor can turn that Bump into a 5v signal easily. If it is not long enough, you can connect a 555 to the comparitor as a one-shot to extend the duration of the peak, or use a flip-flop to square it up (and cut frequency in half (but that can be corrected in software). Everything is possible.

PS: or connect to a pin that has Interrupt-on-change flag.
Yeah someone I know that is pretty darn smart suggested I use a comparator to turn that "half sine wave" into a square wave. So I guess I get the bonus of having the noise removed too. And I had already planned to use the interrupt pin. ;)
 

Thread Starter

spinnaker

Joined Oct 29, 2009
7,830
I can get it to go to -2.4. But what I really need is the DC offset at 2.4 and have the half wave peak at 0 volts. So just like this except 0-2.4V

upload_2017-1-23_20-44-19.png
 

crutschow

Joined Mar 14, 2008
34,459
Would would you mind explaining how your model works? What part does what?

What I am trying to to is figure out how to invert the signal. I got some new sensors in, basically the same wave form as above but inverted.
V1 generates a sinewave of the desired frequency, amplitude, and offset.
V2 controls a switch to select the desired part of the sinewave to appear at the OUTput.
B1 generates the random noise, per the equation in the parentheses.
These are summed together by R2 and R3 at OUT.

upload_2017-1-23_19-23-46.png
 
Top