Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Using 230-12V transformer as sine wave source

Status
Not open for further replies.

savvej

Member
I am using atmega 32 adc for data capturing. And sending the captured data via serial port to PC for plotting.I am using sine wave source as the transformer secondary 12V output with clamping circuit and resistor didvider followed to get output in range of 0-5V(with an additional offset of 1.5 dry cell connected in series with the output).The circuit diagram is attached with the post.

Baud rate for serial communication =38400
No. of reading taken=1024

Now with above said when I do data capturing,what I get is a highly noisy output of the sine wave which is kind of amplitude modulated where in you can see another sine wave(photo of graph attached).Now why is it so?(its not noise because amplitude of sine wave(like carrier amplitude in AM) is quite big and the amplitude of sine wave inside it(you will understand when you see the graph) too is same.

What should I do so as to get a nice Sine wave?

PS. the data plotted in graph(plotted using xmgrace in ubuntu) is for first 100 points
PS. also attached is "data.txt" file incase if you have other plotting software
 

Attachments

  • SPM_A1062.jpg
    SPM_A1062.jpg
    103.8 KB · Views: 179
  • sine_graph.png
    sine_graph.png
    20.2 KB · Views: 176
  • data.txt
    8.9 KB · Views: 156
How fast are you capturing the data? Most likely you are not capturing it fast enough and are seeing a composite waveform being created from the data you have. Increase your sampling speed and see what happens.
 
hi,
I would agree with 'smanches' your sampling rate is too slow.
 
Thanks @ smanches and @ericgibbs :)
Actually sampling and plotting simultaneously (using python was taking most of the time).So now I am not doing realtime plotting instead with data being stored in uC itself and then transferring it to PC after capturing has been completed.
P.S. Attached is the waveform I have got :p

PS.Actually sampling interval was too big and plotiing was happening as said by above
 

Attachments

  • sine_final.png
    sine_final.png
    18.6 KB · Views: 165
Last edited:
hi,
That looks a lot better.
I find its better to store samples in real time then after the sampling buffer is full, plot the results.

Whats the purpose of the diode.??
 
hi,
Using LTS shows this results , with and without diode.
 

Attachments

  • AAesp03.gif
    AAesp03.gif
    40.9 KB · Views: 158
  • AAesp04.gif
    AAesp04.gif
    41 KB · Views: 146
Status
Not open for further replies.

Latest threads

Back
Top