Need your help guys in generating ac sine wave

Hello guys,
I want to generate ac sine wave that changes in polarity also and i can change frequency from 45 to 65 hz.
I gathered the staff i need as follows:
Arduino uno
Dac4725
H Bridge L298N
Rotery encoder
And DSO150 oscilloscope
Can any one help me with wiring connections and the code .
I really appreciate your valuable time

What's that? Did you mean rotary encoder?

Even if you don't know in detail, what is your overall plan to combine these components?

1 Like

Yes Dear sorry encoder .
I plan to get small ac current in mili amps from the components above
And connect capacitor as a load To demonstrate changing ac frequency on capacitance impedance for students.

How did you plan to use the L298?

I think the way I might approach the problem would be to use the Uno and DAC to create a DC sine wave. To change this to AC, I would maybe use an voltage inverter to create a negative voltage, and an Op-Amp to shift the signal to AC. The op-amp must be chosen to be capable of providing the "small current in milli amps".

Dear Paul
Iam actually not familar with arduino but i use ChatGPT and it suggests me such approach and also suggest me your approach for changing ac polarity but i choosed H Bridge .
Can you help me with your method if you think is better and simplier .
Like what exta compoents I need and the code.
I would be valuable contribution.

  • Or, if you have a sine wave about 0-5v, a capacitor will remove any bias.
  • Use a filter network to get a sine wave from a square wave.

image

  • 2 simple op-amp integrators will do this too.

Dear Larry
Does this sine wave changes in Polarity ?
It would be interesting if its behave like exactly ac signal .

  • When a sine wave is feed thru a capacitor the sine wave will have a positive and negative half cycle.

  • What load will your sine wave be connected to ?

Actually i want to demonstrate when changing ac frequency of the source connected to load (capacitor) , the capactance impedance of the load ( capacitor) reduced and my miliammeter reading of current increaded .
I attened to use two frquencues 45 hz and 65 hz to obersve implement such demonstration.

  • Confirm your load will be capacitive, example a 1uF capacitor ?

  • You want to demonstrate how a capacitive load has high impedance at a low frequency and low impedance at a high frequency ?

  • Why have you picked 45 to 60Hz ?
    4500 to 6000Hz would be easier to show the reactance load behaviour.



  • Or, your oscilloscope, or DVM, or both ? :thinking:

Yes for example the load is 1 uf or 10 uf capacitor
Yes i agree with you i will choose 4500 to 6000 hz so more current to be observed.

Yes I want to demonstrate how the capacitance impedance of capacitor behaves at low and high frequency.
And meausure this with DVM bcz my oscilloscope DSO150 just show the waveshape not showing current .
These resistors values 1.5k can i use 1 k or 2k ?

If you put a small value resistor in series with the circuit and watch the voltage across the resistor, the will be an exact analog of the current through the capacitor.

1 Like

Can't do that with a DAC4725

Your suggestion dear?

First let me ask if there is a reason for using an Arduino?
Are you trying to teach Arduino programming as well?

I use it because it is cheap and I don't know another feasible options suitable for students .

  • Can you purchase the op-amp LMV321 or LMV358 ?

ESP32 microcontrollers are low cost (£6 in UK) and have a builtin DAC
can be programmed using the arduino IDE
easy to produce a 5KHz sine wave using a lookup table, e.g.
image

1 Like

For sure
Is not expensive.