_

_

How about a circuit like this

and let Arduino control the potentiometer?

Other ideas
https://www.google.com/search?hl=en&source=hp&q=ac+light+dimmer+schematic&gbv=2&oq=ac+light+dim&gs_l=heirloom-hp.1.2.0l2j0i22i30l8.1650.4230.0.7440.16.11.1.0.0.1.600.2600.2-2j1j0j3.6.0....0...1ac.1.34.heirloom-hp..12.4.1720.v3BS2swBNiw

I think your idea could work! Use a full-wave bridge rectifier, and of course use only regular incandescent bulbs.

I know that I would need some optocouplers...

Right. You need an opto-isolator at the output of the Arduino to isolate it (and yourself!) from the power line voltage. You'll need to make sure the opto-isolator's output transistor can handle the voltage. Then, you'll have to figure-out how to drive the MOSFET with high-voltage. (You may need to filter the high-voltage DC and use a voltage divider to keep the gate voltage down to a reasonable level.)

if we have an big capacitor at the output of the rectifier to get a clean DC voltage.My question is what will happen to a normal AC 230v Light bulb if I hook it up to something like this 330volt DC and does someone knows a better way to do it.

No Capacitor! It should work fine if you run it from unfiltered DC and "chop" it with PWM. An incandescent lamp will happily work with rectified AC (unfiltered). It will operate dimly (half-power) with half-wave rectified DC. (You do get about a 1V drop across the diodes.)

But like I said, you might need filtered DC for the MOSFET gate. (You can isolate the rectified DC from the unrectified DC with another diode.

Dimmers tend to be (electrically) noisy and with PWM you might get more noise on your AC line than with a regular dimmer (which could interfere with radios, etc.)

As always BE CAREFUL with power line voltage, and buy some extra parts because with high voltages & potentially high currents, you are likely to fry a MOSFET, or opto-isolator or two, etc.

It would might be a good idea to get a 6 or 12V AC transformer and a 6 or 12V incandescent lamp to experiment with and to prove the concept works before going with the full line-voltage. That's what I'd do... I'd design, develop, and debug with low voltage AC first!

chrisdevic:
My question is what will happen to a normal AC 230v Light bulb if I hook it up to something like this 330volt DC and does someone knows a better way to do it.

It will burn.

Apart from the voltage, remember that DC power isn't the same as A/C power. A 230V light bulb is designed with the knowledge that it isn't always at 230V, it's a sine wave. It peaks at 230V but most of the time the voltage is less than that. Sometimes it's even at 0V!

If you give a light bulb a constant 230V DC it will burn.

If you want to use the arduino dim leds or control other things with varying voltage, you may see the following simple code. After learning this staff it should be extremely simple to take it to the level you want!

int led=9;
void setup()
{
pinMode(9,OUTPUT);
}
void setup()
{
for(int a=0;a<=255;a++)
{
analogWite(led,a);
delay(100);
}
for(int b=255;b>=0;b–)
{
analogWite(led,b);
delay(100);
}
}

This should change the brightness of the led attached at pin 9 (any pin but be careful that only some pins on the arduino UNO support The ones with ~ sign work!) .you can mess with the delay if you want it to be faster or slower!

OR :roll_eyes:
if the above method isn’t inviting to you just use a potentiometer .

I hope it helps. :slight_smile:

230V ac means 230V rms, not peak. The peak voltage is about 330V.

An incandescent bulb rated at 230Vac (rms, which is how they are all rated) will run equally fine on 230Vdc. But if you add a rectifier and a smoothing capacitor, you get about 330Vdc as the OP said, and the bulb will burn up.

As DVDdoug says, don't use a filter capacitor and it will work fine.

RMS or root mean square is the value of any given waveform that matches the heat dissipation, over time, of an equivalent DC voltage. For a sine wave, the conversion derived is the square root of 2. So for a sine wave that peaks at 325V, divide by the square root of two to get the RMS voltage of 230Vrms.

Note that this is -not- the same as an average of the voltage.

Think about safety, at least in Europe it’s not allowed to have high voltage DC light fixtures