This project is a very good project to learn how to deal with voltages and currents from a wall outlet. We had several problems which we had to overcome during the course of this project.
One issue we had was finding a way to isolate all of our systems and keep the high-voltage side from overloading the low-voltage side. While we were unable to determine a good, economical way to avoid this issue we were able simply be very careful and insure everything was well insulated.
We also ran into the problem of having to work with the AC power and control the full sine wave. Because AC power alternates across the zero axis, and because many semi conductors, including IGBT's can only operate on the positive side of the axis, we had to be creative in how we did our dimming. We originally thought of trying to use two IGBTs, one to control the positive half of the wave, and the other to control the negative half of the wave, however this did not work because it required connecting an IGBT to the power backwards which made us unable to connect the emitter to ground, a necessary step in order for us to have full control of our system. When that didn't work, we began experimenting and discussing ideas with our classmates and were finally able to settle on a solution which involved using a solid state relay and a high-power diode. We were able to use the relay to switch the diode in and out of our circuit in a way that allowed us to either keep the bottom half of the sine wave, or cut it off. When this half was there we were able to output a voltage that was equal to our modulated upper half plus 60 volts, and when this half was removed we were able to output a voltage equal to just the modulated top half of the wave. Using this method we were able to control the voltage and having a range of 0 to 120 volts. This solution, however, posed another issue. Because of the IGBT and SSR switching at slightly different times when switching from 'low' to 'high' modes (or vice versa) there was a slight flicker in the light bulb being controlled. While we were unable to fully solve this problem, we did reduce the amount of flicker by implementing the zero-cross detection circuit to trigger the IGBT and SSR to switch only at the zero-cross point. We picked the zero-cross because the type of SSR we were using could only switch at this point in the sine wave. We then found that the SSR was slightly faster to respond to switching than our IGBT. To compensate for this we introduced a slight delay in our code thus allowing both the IGBT and SSR to switch at the same moment in time.
The final issue we had was more of a technical malfunction. When it came time to demo our project to the university our light sensor, for an unknown reason, ceased to function. While quickly brainstorming, experimenting, and researching for solutions we decided to try to use the photovoltaic cell from a low-cost calculator. With only minor modifications to our circuit we were able to incorporate this PV cell and allow our dimmer to continue to function.