Schematic Review

Hi all,

Well, after several weeks of reading, looking at others' schematics, troubleshooting and talking to the folks at my local electronics place, I believe I've finished the circuit I've been trying to develop.

It's designed to detect the zero crossing of an AC line and control the dimming of several incandescent bulbs, as well flash the bulbs in various patterns. (My schematic shows only one load control, but there are others identical to it connected to different digital pins on the ATMEGA.)

Pots control the dimming level and the speed at which the lamps chase. A momentary switch cycles through various patterns. I've also moved off of the Arduino and made the circuit standalone.

Everything appears to work, but if the more experienced folks here wouldn't mind looking at my schematic for potential problems, I'd certainly appreciate it!

Schematic 01a

I cannot access the link you specify. Is your server current down?

Firefox can't establish a connection to the server at www.wesleytreat.com.

Probably just a fluke. Should be working now.

I'm not confident that it's the only problem, but you have the reset pin pulled low. It should be pulled high.

Oh, and you should really have some .1uF caps on your power and aref pins.

And the AREF pin 21 should be left floating unconnected, and no .1mfd cap as suggested above on pin 21..

Curious about your reasons for using the zero crossing detector and other components for the AC switching. There are zero crossing solid state relays that combine those functions into a simple four terminal 'brick'.

Lefty

OK, I fixed the reset pin error. That was just a late-night mistake on the schematic. I've also changed one of the 10uF caps on the voltage regulator to 100uF on the advice of SparkFun.

I had connected pin 21 as indicated on this page, but you're saying it isn't necessary?

And I assume the 0.1uF caps on pins 7 and 20 are for extra peace of mind, yes?

As for my going with this setup as opposed to using SSRs, it was partially a learning experience, but also a cost-saving measure. I plan to make several circuit boards based on this design for various light-controlling projects and will potentially be incorporating as many as 10 channels, switching several amps each. Using the appropriate SSRs would be prohibitively expensive.

Here's an updated schematic:

Schematic 01b

No, the .1uF caps should connect to ground. So one should be parallel with the 10uF cap and one should run from aref to ground. This last one can be omitted if you won't be connecting anything else to the aref pin, which you do not need to do if you are using the 0-5V scale for analog readings.

Ah, I misread. OK, please tell me I've got it right this time. I'm sure converting this to a PCB is going to take me a while, so I'm anxious to get started.

Thanks!

Schematic 01c

Looks good to me.

One additional thing you might consider adding depends on if the AVR processor chip is going to have the bootloader program still resident on the chip or not. If it is, then it's a good idea to add a 10k pull up resistor to pin 2 (rec) so as to not activate the bootloader on power up due to start-up noise and having pin 2 floating. If you are burning the program with a hardware programmer and not burning in the bootloader code then you don't need the pull-up.

Lefty

I had intended not to include the bootloader, actually, to eliminate the startup delay. In fact, I've got another thread going to try to pick an inexpensive, yet easy-to-use programmer:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1252821624

Yea, that looks like a handy programmer and I've liked everything I've bought from sparkfun folks.

Also avalible are:

http://cgi.ebay.com/USBtinyISP-Programmer-For-ARDUINO-Duemilanove-Mega-Nano_W0QQitemZ130327340764QQcmdZViewItemQQptZLH_DefaultDomain_0?hash=item1e581d66dc&_trksid=p3286.c0.m14

and the orginal from ladyada:

http://www.adafruit.com/index.php?main_page=product_info&cPath=16&products_id=46

The biggest advantage of these models are that the Arduino IDE has support for them built in.

They can all be used standalone with AVRDUDE using command line controls.

Lefty

From the point of view of making it into a PCB you have not got a +5V symbol going from pin 2 of IC2. You need this to make it common with the other +5V lines.

You need a resistor in series with the OK5 opto LED otherwise you will blow it up.

If the controls are any distance from the processor then a series resistor of 470R and a 0.1uF to ground will help prevent interference.

Hey, that pre-assembled USBtinyISP look like it might just be the thing, thanks.

From the point of view of making it into a PCB you have not got a +5V symbol going from pin 2 of IC2. You need this to make it common with the other +5V lines.

Yeah, I noticed that when I first started converting it into a PCB. Rookie mistake.

You need a resistor in series with the OK5 opto LED otherwise you will blow it up.

Ah! Dumb oversight on my part. I’ve stuck a 470 ohm in there like with the MOC3022s.

If the controls are any distance from the processor then a series resistor of 470R and a 0.1uF to ground will help prevent interference.

They should be within 6 inches of the circuit. Do you think this is enough distance to necessitate the extra components?

By the way, with there being high voltage on the circuit, I think I’d like to coat the PCB with some kind of protective layer. Is there something relatively easy that I could maybe dip the board into or paint on after the soldering is done? (Not coating the components, of course; I realize that.) A nice, green solder mask would be nice, but I don’t think I’d like to attempt something so exact on my first go-round.

Thanks, everyone, for the help so far!

They should be within 6 inches of the circuit.

I would have thought that would be OK in that case.

I didn't see the two 47Ks in parallel that will limit the current to about 11 mA, mind you with a voltage of over 350V another 470R is not going to make any difference. In the past I have used a 1K and 0.1uF capacitor to limit mains current without dissipating too much heat.

I could maybe dip the board into or paint on after the soldering is done? (Not coating the components, of course; I realize that.)

That sort of thing is called a conformal coating and yes you can cote the components with it as well. They come in brush on or spray on. The best ones you can "solder through" but they are the most expensive. Here is a selection:- http://uk.farnell.com/jsp/search/browse.jsp?N=500006+1000416&Ntk=gensearch_001&Ntt=conformal+coating&Ntx=

OK, I apologize for leaving this hanging the way I did. Personal circumstances required that I put aside this project for a while. I believe, however, that I'm ready to get back to it.

Attached below is my latest revision, which I don't believe is much different from the last, except that I added the +5V and GND symbols to pins 7 and 22 of IC1 to make them common with the rest.

I think I've decided against a conformal coating to avoid any extra heat buildup. Besides, I'll be mounting the PCB in its own project box, anyway, so it should be safe.

I've reviewed the thread above to see if there's anything I've forgotten in the last couple of months, but it doesn't look like it. If there's something I've overlooked, please let me know.

Thanks for all the help!

Schematic 07