Can we generate Alternating Current using arduino uno with out any extra component with an input of 9volt DC

Can we generate AC voltage using Arduino UNO?
I'm working on a project to wirelessly transfer electricity using two coils. It's a small, educational project, and I'm aiming to keep the costs minimal. Given that we can change the polarity of the output voltage using an Arduino board, I'm curious if it's possible to adjust the frequency of these polarity oscillations without altering the 5V output.

I moved your topic to an appropriate forum category @aradhyabolar.

In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.

This is an important part of responsible forum usage, as explained in the "How to get the best out of this forum" guide. The guide contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

1 Like

What do you mean? Who said that? Are you talking about things you've already accomplished?

Post a schematic and code for anything that does what you call output voltage polarity change.

Say more about what you are actually trying to do.


Without additional components you can get weak AC type activity by wiring something between two output pins. Take one pin LOW and the other HIGH, wait a bit, however, then switch the two outputs so the first is HIGH and the other LOW. Rinse and repeat at whatever frequency you want.

The current would be limited to what the pins can provide.

a7

1 Like

Absolutely possible

1 Like

what frequency range are you looking for?
e.g. using an ESP32 (which has two DACs) generating a 1kHz sine wave
image

1 Like

I am just trying to transfer electricity wirelessly using two coils. To do that first i had to figure out how can i get ac voltage using arduino. And thanks for the reply because i want to learn more things about arduino uno and mega.

What leads you to believe you need AC? You are not transferring any electricity. You are transferring magnetism changes from one coil to the other. The second coil converts the magnetism changes to electricity.
You can do ALL that with just a varying DC current. The faster you change the current value, the more magnetic changes you create and transfer.

1 Like

So what would you suggest how many times should it change the magnetic field in 1 second ?

Qi uses frequencies between around 100kHz and 200kHz

1 Like

The usual method is to use two pins that are complemented periodically.
output +5 on pin 5, GND on pin 6, then GND on 5 and +5 on 6, and an isolated device connected to pins 5&6 will see 10Vp-p AC.

Note that the Uno itself can only provide about 20mA like this; probably not enough to do any significant wireless power transfer.

To boost the current, you can use an H-bridge, as found in many motor drivers.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.