Understanding Signals - Try to match example
Jim McCorison
Posts: 359
I'm working on the Understanding Signals class. I'm trying to match the example that the book shows in figure 3-12 of the 8kHz sine wave superimposed on the 800Hz sine wave. The closest I can come is the attached image. If I try and expand the signal by selecting 500mv/div instead of 1v/div it clips the signal at 2.0v as that is the top of the graph if the base line isn't shifted. Shifting the baseline down does no good, the signal is still clipped. The clipped waveform is the second image.
The actual waveform being generated is correct and I have confirmed it using the FFT display.
Am I missing something? Any suggestions?
Thanks,
Jim
The actual waveform being generated is correct and I have confirmed it using the FFT display.
Am I missing something? Any suggestions?
Thanks,
Jim
Comments
FREQOUT pin, dur, 800, 8000
so I would expect they are the same amplitude. There was no other circuitry other that a resistor on the stamp pin, a piezo speaker, and a 1microf cap across the speaker.
The sample in the book shows a very clear 8,000 Hz signal riding on the wave of the 800 Hz signal. I copied the image out of the pdf file and have attached it.
Jim
Your signal seems to be riding on top of a positive voltage rather than gound.
It seems unlikly because the ground connection on your Optascope would short out the +5 and possible damage your BOE.
I had no problems getting the right waveform on this experiment.
I recomend that you double check your wiring first
tma
Thanks for the thought. I just set it up again and double/triple checked everything. It is "per the book". And I still get the same results.
Jim
Have you tried it without the piezo speaker connected? Those speakers have a complex impedance that might effect your result, by some electro-mechanical resonance effect. You still need an RC circuit to filter the PWM, an RC value around 20 microseconds. I don't have the circuit diagram here. Why is there a 1uF capacitor across the piezo? What is the resistor value?
Also, look on your oscilloscope for the two frequencies separately:
FREQOUT pin, dur, 800
FREQOUT pin, dur, 8000
Do those show up okay, or are they clipped or otherwise distorted?
The clipping is puzzling. Do you think it is something in the circuit, or an artifact in the optascope?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Feel free to email me if you still have questions.·
dpientak@parallax.com
I took the speaker out and the only difference it made was that my ears were happier.
The 800 Hz waveform looks fine, but the 8 kHz is no thing of beauty. See attached image.
Doug,
I tried a different cap , same value, and it didn't change the results.
Jim
You said "The actual waveform being generated is correct and I have confirmed it using the FFT display."
Does this mean that the FFT display shows the same shape with both O-scope settings (1V/div and 500mV/div)?
If it does, this would suggest that·something is corrupted·in the data display portion of the O-scope software (If the FFT portion of the O-scope software can plot the correct plot, the Stamp is producing the correct output, the O-scope is getting the correct data in its data buffer, and the FFT algorithm and plotter is working - The only thing left is the data plot algorithm.)· I would reload the O-scope software, if possible from different source.· The issue could be a bad sector on your HD, or the software source.
If the FFT is not the same for the different O-scope settings, this is probably·not the problem.
DISCLAIMMER: You get what you pay for.
nate
The FFT does not display the data in the same form as the Oscope. But picking out the major and minor wave shapes from the FFT shows that the frequencies are correct, or at least match what I'm asking the stamp to send.
Are you referring to your advice, or what you perceive to be the usefulness of the scope? If it is the former, I never turn down suggestions and advice, although I may reserve the right to follow them. If it is the later, I'm not expecting the USB Oscope to match high-end test equipment. It is an economical learning tool, and will probably be more than adequate for the intended development projects I have in mind.
Jim
I am aware the Display of the FFT is different than the raw signal display - Thus if the FFT display is the same (going from the main·display with differnt V/div settings), I will maintain that there is something wrong with the main display driver.
DISCLAIMER: I am often wrong.
nate
·
Ok. I gotcha. I'll reassemble that project and test it again.
My too. But it never stops me from trying. And thankfully those that are more knowlegable don't hesitate to correct me when I'm off in left field.
Jim