PWM From 12Vac Input

I have never used an Arduino board before. I need to create a phone charger via 120Vac input, Full Bridge Rectifier, and Buck-Boost Converter. Since I am stepping down the 120Vac to 12Vac, I then need to regulate the AC signal and set a duty-cycle before my buck-boost converter. Can I use an Arduino board to take in 12Vac and output an AC signal with a specific duty-cycle (say 40%)? Also, can the Arduino board even output more than 5Vac? My professor recommended an Arduino board for this.

You need to use a 120 to 12 volt transformer first. Then a diode bridge and caps can be used.¨

True. Max 5 vot signals from Arduinos. Use a transistor stage to control larger outputs.

  1. Be careful with 120v
  2. But what is your assigned task ? To design and build a buck converter for a specific input and output voltage (and max. current) ?

Why? Why do you need to regulate the AC signal? Why do you need to set a duty cycle before your buck-boost converter?

If you need to build a phone charger, you don't need an Arduino anywhere near it. The buck/boost converter itself will do the regulating. Rectify and smooth your 12VAC, then feed that to the converter. It will then generate the required output voltage (I assume 5V DC in your case).

Hi, @anon84900529
Welcome to the forum.

As this appears to be an assignment, can you please post the assignment sheet you have been given so we can understand what your professor requires.

You do not set the duty cycle of the 12Vac , you have to convert it to smoothed DC before PWM application.

Thanks.. Tom... :smiley: :+1: :coffee: :australia:

I guess I am currently trying to determine my approach. This is a final design project, no set criteria other than create a charger via a 120Vac input and use what has been learned in class (power electronics). I need to design and assemble the rectifier and buck-boost converter, not purchase a fabricated one. Essentially, I need to charge at 5Vdc from a 120Vac source. I just spoke with my group and we have a more clear approach now.

We now want to step down 120Vac to 9Vac (we have acquired a transformer). Then we will take 9Vac to roughly 9Vdc via a full-bridge rectifier. Next step is to regulate our voltage for charging at 5Vdc. So we would like to input 9Vdc to the Arduino board so we can create a PWM. This will be used with a buck-boost converter to regulate 5Vdc for charging. The PWM is needed because we have to design the buck-boost converter ourselves. That means we need to know the duty-cycle of our input (hence the Arduino board). For a buck-boost, Vo=-Vs(D/(D-1)). I just don't know if the Arduino board can take 9Vdc and output 9V pulses.

Do you recall the class where the difference between an RMS ac voltage like 120 volts RMS. And a peak to-peak voltage? The voltage you get after a bridge rectifier will be a peak voltage, not 9 volts DC.
Paul

The role of the arduino will, I guess, be to switch the gate of a mosfet at a calculated duty cycle. That does not expose it to voltages it cannot handle.
The arduino will also have a feedback loop to measure the voltage at the output of the buck converter. Use a resistor divider and possibly a zener diode) to protect the arduino pin.

Yea, that is our general approach. However, if I am only able to output 5V pulses with the Arduino (my understanding is that is the output limit of this device), then that makes my buck-boost irrelevant? Since I am using the buck-boost to go from 9Vdc to 5Vdc in the first place.

Not clear at all. Are you creating a 5 volt power supply or are you creating a battery charger for a 5 volt battery? Or are you creating a 5 volt supply that will power a battery charger in another device?
Paul

I'm guessing that you'll be designing something like this from: Buck Converter: Basics, Working, Design and Operation

The Arduino would then switch the gate (2) and measure the voltage at the load (via a voltage divider). The voltage source is your 9 or so volts DC. The Arduino (Uno) can be powered by up to 12 volts or so ) if the load is small as it is in this case.

I am creating a charger for a power bank. The specific power bank is rated to charge at 5Vdc and 1.5A.

Yup, this is basically what we are doing. My main concern though is can the board output the same magnitude as the input (9V)? If it cannot, then my buck-boost is not needed. The point of the buck-boost application here is to take the 9Vdc to 5Vdc, where the input comes from the arduino. From what I have read, it sounds like I can input 9Vdc to the board, but it will only be able to output 5V pulses (which is not what I need)...

Let's go back here.

You are designing a power bank.
Is this like a standard USB type power bank with batteries of say 3.7 volts which have to be stepped up to 5 volts ? Is this why you keep talking about a boost converter as well ?

I am designing just a charger for the power bank. We have a purchased power bank to work with. I think I have figured out the whole buck-boost and pwm situation. I did not not realize the switching device will receive the pulses, while the voltage source is the dc input. So I can operate the switch at 5V pulses from the Arduino board, while my 9Vdc from the rectifier comes in at the source. I simply just did not understand how the buck-boost worked in application.

image

Your diagram shows a boost convertor. A boost converter increases voltage. A buck converter reduces voltage.

Yes, I am aware of these. It just had it nice illustration of the 2 inputs for the system (DC input and driving input).

Yes, correct. So, you have the basic idea. By the way, you don't need a buck-boost converter, you just need a buck converter. A buck-boost is more complicated, and unnecessary.

Now, about the Arduino. Have you been told you must use one? I ask because you would never normally use a microcontroller in this application. There are specific ICs available to do the job.

In principle yes but, now we are getting into the detail, there is a complication. A buck converter is usually switched on the high side. This generally means a P channel mosfet for which the gate has to be switched at 9 volts which the Arduino cannot do directly. There are solutions. Google for “mosfet high side switch”. Depending on the frequency of the PWM, not all solutions are appropriate, possibly resulting in a hot mosfet.

See also this current thread: Do I need a mosfet driver?. Even a 555 timer IC or comparator (with push pull output) could be used to drive a mosfet gate.

The apparent confusion here is that you are for whatever reason trying to involve an Arduino in this project.

So far, there is absolutely nothing in the project for which an Arduino is in any way appropriate. You cannot include an Arduino in a feedback control loop for a power supply.

1 Like