# Low Voltage AC Source (Part 1)

Normally we power our circuits with DC. For experimenting with rectifiers, however, we need an AC source. So, let's build one!

## Building a Low Voltage AC Source

The goal of this new project is to build a safe AC source which allows us to experiment with different rectifier circuits. How can we achieve this goal? Well, this is exactly what we are going to discover in this project series. Today, we start with some basic thoughts.

What do we need for AC? Well, there are two things that are interesting here: The waveform of the generated signal and the constant alternation of the current direction.

The most important aspect of AC is that there is no fixed polarity. The current direction alternates constantly. This property is what gives AC its name. If we want to generate a true AC signal, we will thus need to deal with the question of how we can change the polarity and generate negative voltages.

If we achieve this, we can already call our signal an AC signal. Other aspects like the waveform and frequency don't matter in the first place. However, to get a realistic impression of how rectifier circuits would work with mains voltage, we should generate a 50 Hz sine wave. A nice extra feature would be to be able to reduce the frequency. This would allow experiments with rectifiers without the need for an oscilloscope. A DMM would be enough to analyze what happens during the rectification. Last but not least, our AC source should be easy to build and not require any exotic components.

### Generating a Sine Wave

Now that we discussed the requirements for the AC signal we want to produce, we should ask ourselves how we can generate such a signal.

Let's start by looking at our options for creating the sine wave. For this we should first take one step back and talk about signal generation on the Arduino in general.
We have three options available to us:

• digitalWrite: For toggling a pin on and off
• tone: For producing audio signals of a given frequency (square wave)
• analogWrite: For producing a PWM signal

Sadly none of these options will allow us to directly generate a sine wave. For this we would need a function that produces a real analog signal. This would be possible with a digital-to-analog converter, or short a DAC. Unfortunately, the Arduino Uno does not have a DAC. We can, however, either use an external DAC module or use a PWM output and a filter circuit to reproduce the functionality of a DAC with the Arduino. Speaking of filters, we could also try to transform a square wave signal generated by toggling a pin or using PWM into a sine wave by using them.

If you don't know anything about filters yet, that's not an issue. The details of the signal generation, will be discussed in the next parts of this project series. There we will also examine which of these options is suited best for our use case.

### Negative Voltages

Once we are able to generate a sine wave signal, we need to ask ourselves is, how we can generate a true AC signal with negative voltages.

Well, one option is to use a specialized IC for this. This would, however, make it unnecessary difficult to recreate the AC source. Creating a negative voltage generation circuit ourselves is far beyond the scope of this project, as well. We need a much simpler solution.

In fact there is such a simple solution. To understand it, we need to remember how voltage is defined. I explained this in the electricity fundamentals tutorial. A voltage is the difference between to electrical potentials. It is always measured in comparison to a reference point which is also called ground. In most cases, this is the negative terminal of a battery or power supply. A negative voltage means that the measured potential is below the one of the reference point. If we want to create negative voltages for the AC part of our circuit, we can easily achieve this by moving this reference point. We just use a voltage divider to split the supply voltage in half. The output of this voltage divider will the function as the ground reference for the AC part of our circuit.

In case of the 5 V supply voltage of an Arduino our new ground reference has a voltage of 2.5 V in reference to the Arduino's ground. However, if we declare this 2.5 V as our new ground reference, the voltages that we can generate with the Arduino are now in the range of - 2.5 V to + 2.5 V. This means that our generated sine wave signal is then a real AC signal.

The image below summarizes this idea in an abstract circuit diagram.

### Possible Issues

The ideas above are great for the start, but there are some issues, we will have to deal with sooner or later. The key question is whether we get enough current and voltage for the experiments with the rectifier circuits.

Using a voltage divider is a very simple option for solving the issue with the negative voltage, but this limits the peak voltage of our AC signal to half the supply voltage. There is no easy way to work around this limitation.

The voltage divider, as well, as possible filter circuits we might use for generating the sine wave signal will additionally limit the current our circuit can supply. This is a problem we should be able to solve by amplifying the generated signal. But, let's discuss this once we get there.