Help with PCB Design for Shop-Vac Auto Switch Project

Hi all,

I’m new to the forum and currently teaching myself PCB designs through a project I found here at (How To Make A Simple Switch To Automatically Turn On Shop Vac — Byte Sized Engineering) --I’ve managed to get all the physical components working, but now I want to create a PCB version of my project.

Project Details:

The original design uses two separate power supplies: one for 120V mains and another 5V supply for the Arduino and relay modules. In my version, I’ve added:

  • Two types of fuses (a slow fuse for the AC side and a fast fuse for the DC side).
  • Extra connections and terminal blocks to improve safety and modularity.

Where I’m Stuck:

I’ve tried approaching this project in two ways:

  1. Schematic to PCB approach: I created the schematic and moved it to the PCB layout, but I kept getting errors during the design rule check (DRC). The trace routing has been quite challenging, especially for the AC lines.
  2. Breadboard to PCB approach: I also tried laying out the project on the breadboard view and then moving to the PCB. However, once I started organizing and tracing, Fritzing began rearranging my components, which was frustrating, and I felt like I was back to square one.

What I Need Help With:

-Guidance on routing and tracing: I’m struggling with properly routing the traces, especially regarding high-voltage AC connections versus low-voltage DC signals.

  • Best practices for organizing components and avoiding DRC errors.
    Examples or insights on how someone with more experience would route these components, especially with the added complexity of multiple power supplies and fuses.

I’ve attached my .fzz project file and can include more information if needed. Any advice or examples would be hugely appreciated!

Thank you for your help, and I am excited to have found this program and community!

breadboard_autovac Switch.fzz (82.4 KB)

You have a couple of problems. First in pcb view you can’t overlap traces in different nets. They will short (and then reflect in to the other two views.) Here I loaded your sketch then ran DRC. Now I left clicked on the first line of the DRC report which selects the net with a problem. The red dot in the green circle indicates two different nets connecting to each other.

That is easy to correct (at least in pcb) by just moving one trace to the top layer so it no longer shorts. left click on the trace to select it then right click which brings up this menu and select “move to top layer” which moves the trace to the top layer and removes the short.

running DRC again, many less errors and most importantly no short between the two traces.

However you have other problems indicated by the rats nest lines (which indicate connections in one of the other views that are not yet routed in pcb. ) So I switched to breadboard and right clicked on a pin (marked by the green arrow) on the Nano which is showing as entirely shorted in pcb. That causes all pins connected to this net to light up yellow. As you see there are a lot of yellow conenctions which should not be there. That is correct because you have used strip board rather than perf board (or the breadboard) and have not broken any of the connections. That shorts the entire Nano because all the pins are connected to each other.

here the green circle indicates the copper trace on the strip board. By default all the pins in a vertical column are connected to each other.

What you need to do if you want to separate them is click on the strip between the pins like this (in the green circle) which will disconnect the strip between the pins like this

now the green circle indicates the two sides of the vertical strip no longer connect to each other. For what you are doing here you would be better to use pref board (which is a field of isolated pads that have no interconnections) or a breadboard (which has a row of 5 connections each of which will accept a connection) and wire your circuit that way. You will need to fix breadboard (and I would suggest then routing schematic as an easy check of the connections) before redoing the routing in pcb. Hope this helps, if not feel free to ask questions.

Peter

If you route schematic first, and get it right, then any problems like the shorting from the strip board (or on PCB) will show up in the schematic view as those dashed rats nest lines, and the Fritzing (bottom) status will show a nets not routed message (in Schematic view).

Be extra EXTRA careful putting mains voltages on a pcb. It is way too easy to get power where not intended, including into you just by touching the board. The general recommendation is to just not do that. Keep mains power away from the PCB.

Peter, thank you so much for your feedback! It’s been beneficial, primarily pointing out that I was using a stripboard by mistake. I didn’t realize the difference; your explanation has clarified things. I used a prototype board in my physical mock-up, so knowing the correct approach in Fritzing really helps.

Based on your advice, I’ve restarted my design, but I’ve run into a bit of a challenge. Specifically:

  1. Component Ratlines Issue: As I was working on routing traces, I started in breadboard view and then switched to PCB view, going back and forth to keep track of my progress. However, I noticed that when I tried to wire up the ACS712 sensor and my one-channel relay, placing wires in the breadboard view doesn’t seem to translate properly to the PCB view.

  2. Understanding Terminal Connections: I’m also having trouble identifying which terminals are which on the PCB side for my custom components (like the relay and ACS712). My idea was to place placeholder wires in the breadboard view to help translate those connections to the PCB view, but some components appear grayed out, and the ratlines don’t seem to update correctly.

Could you or anyone else advise on routing in this situation? How do you typically handle keeping track of connections between views, especially when dealing with custom components?

Thanks again for your support! Any additional tips would be greatly appreciated.
Autovac_switch_v5.fzz (68.1 KB)

Thank you so much for your feedback; it’s appreciated. I just wanted to clarify your suggestion to make sure I understand it correctly:

Would you recommend approaching this project by having the AC mains connections on terminal blocks mounted on a separate prototype board and then using a PCB for the low-voltage components like the Arduino, relay, and ACS712? If I understand correctly, this would create a physical separation between the high-voltage AC section and the low-voltage DC control components.

I’d like to hear your thoughts on this approach and whether it would simplify the design while improving safety.

Thanks again for your guidance!

Isolating the AC should improve safety. Simplifying, yes or no. That depends on other things. In this case it should at least make the pcb smaller. Oh, and that terminal block needs to be enclosed so that there is no live AC to be touched. Just insulated AC in and dc out.

Thanks for the feedback! As I’m working through this and thinking about ways to simplify the design, I’ve been considering an alternative approach. Instead of routing everything through the PCB, I’m wondering if I could create a PCB that only handles the connections for the terminal blocks.

My thought is that since the ACS712 and 1-channel relay both have screw terminals, I wouldn’t necessarily need to route all their connections directly through the PCB. Instead, I could just use their existing screw terminals to connect them to the AC or DC terminal blocks on the PCB.

Does that sound like a reasonable approach to this design? This would potentially reduce the complexity of the PCB while still allowing for proper connections and safety.

Thanks again for your guidance!

There are several possible problems here. A .fzz file with a connection in breadboard that isn’t showing up as a rats nest line in pcb would be the place to start. With that I can identify the issue. With custom parts one possibility is the part wasn’t created correctly. Part creation is complex and easy to get wrong. With the .fzz file (which contains copies of your custom parts) it is possible for me to fix broken parts. Another issue is what Fritzing version are you using? The current Fritzing 1.0.4 has many bug fixes some of which cause routing database corruption (not fixed until version 1.0.2 or so I think) or as noted broken parts. Looking closer I see there are connections to the ACS712 part that are not appearing in pcb, so the part is likely broken. Indeed FritzingCheckPart.py has a number of complaints about the part (I don’t know yet which one is the error though.) Ignoring all the warnings (which are non fatal) there are a fair number of errors reported which will cause problems.

Error 69: File
‘svg.breadboard.ACS712 Current Sensor 5A 20A 30A_a274c3142aed8df0b85d1b70e79020d9_1_breadboard.svg.bak’
At line 28

Found a drawing element before a layerId (or no layerId)

Error 18: File
‘part.ACS712 Current Sensor 5A 20A 30A_ee2f0feeaa9a341f18d471f9decff494_4.fzp.bak’

Connector connector0terminal is in the fzp file but not the svg file. (typo?)

svg svg.breadboard.ACS712 Current Sensor 5A 20A 30A_a274c3142aed8df0b85d1b70e79020d9_1_breadboard.svg.bak

Error 18: File
‘part.ACS712 Current Sensor 5A 20A 30A_ee2f0feeaa9a341f18d471f9decff494_4.fzp.bak’

Connector connector1terminal is in the fzp file but not the svg file. (typo?)

svg svg.breadboard.ACS712 Current Sensor 5A 20A 30A_a274c3142aed8df0b85d1b70e79020d9_1_breadboard.svg.bak

Error 18: File
‘part.ACS712 Current Sensor 5A 20A 30A_ee2f0feeaa9a341f18d471f9decff494_4.fzp.bak’

Connector connector2terminal is in the fzp file but not the svg file. (typo?)

svg svg.breadboard.ACS712 Current Sensor 5A 20A 30A_a274c3142aed8df0b85d1b70e79020d9_1_breadboard.svg.bak

Error 18: File
‘part.ACS712 Current Sensor 5A 20A 30A_ee2f0feeaa9a341f18d471f9decff494_4.fzp.bak’

Connector connector3terminal is in the fzp file but not the svg file. (typo?)

svg svg.breadboard.ACS712 Current Sensor 5A 20A 30A_a274c3142aed8df0b85d1b70e79020d9_1_breadboard.svg.bak

Error 69: File
‘svg.schematic.ACS712 Current Sensor 5A 20A 30A_a274c3142aed8df0b85d1b70e79020d9_1_schematic.svg.bak’
At line 8

Found a drawing element before a layerId (or no layerId)

Error 18: File
‘part.ACS712 Current Sensor 5A 20A 30A_ee2f0feeaa9a341f18d471f9decff494_4.fzp.bak’

Connector connector0terminal is in the fzp file but not the svg file. (typo?)

svg svg.schematic.ACS712 Current Sensor 5A 20A 30A_a274c3142aed8df0b85d1b70e79020d9_1_schematic.svg.bak

Error 18: File
‘part.ACS712 Current Sensor 5A 20A 30A_ee2f0feeaa9a341f18d471f9decff494_4.fzp.bak’

Connector connector1terminal is in the fzp file but not the svg file. (typo?)

svg svg.schematic.ACS712 Current Sensor 5A 20A 30A_a274c3142aed8df0b85d1b70e79020d9_1_schematic.svg.bak

Error 18: File
‘part.ACS712 Current Sensor 5A 20A 30A_ee2f0feeaa9a341f18d471f9decff494_4.fzp.bak’

Connector connector2terminal is in the fzp file but not the svg file. (typo?)

svg svg.schematic.ACS712 Current Sensor 5A 20A 30A_a274c3142aed8df0b85d1b70e79020d9_1_schematic.svg.bak

Error 18: File
‘part.ACS712 Current Sensor 5A 20A 30A_ee2f0feeaa9a341f18d471f9decff494_4.fzp.bak’

Connector connector3terminal is in the fzp file but not the svg file. (typo?)

svg svg.schematic.ACS712 Current Sensor 5A 20A 30A_a274c3142aed8df0b85d1b70e79020d9_1_schematic.svg.bak

Error 69: File
‘svg.pcb.ACS712 Current Sensor 5A 20A 30A_a274c3142aed8df0b85d1b70e79020d9_1_pcb.svg.bak’
At line 13

Found a drawing element before a layerId (or no layerId)

I’ll have a look and fix the part up. OK the main problem is that the pcb svg is wrong. It is missing copper1 (called copper in the svg) which will break pcb view. There are a variety of other errors that I fixed but the copper is the thing breaking it. Here is the corrected part:

ACS712 Current Sensor 5A 20A 30A-fixed.fzpz (24.5 KB)

To load this part (because I left the moduleIds the same) you will need to do a delete minus (which deletes the part but leaves the traces), the right click on the part in your mine parts bin and select delete part. Then you need to shut Fritzing down answering yes to all three prompts (save the part save the sketch and save the parts bin) to really delete the part. Then restart Fritzing and load the fixed part and install it in the sketch. If you do the delete minus you then need to drag each wire in each view on to the new pin on the part. As well it would be a good idea to print the pcb footprint out at 1:1 scale and compare it to a real part to make sure the pads are in the correct place. That done, the new part still doesn’t work in the sketch. I think the sketch is corrupted and you need to start again because the new part works correctly in a test sketch. Here is the sequence that I used to install the new part. In breadboard the wires appear to connect correctly

the rats nest lines appear in schematic

but not in pcb (likely due to the error in the part.) As well there is an answer to this question here as well

You can tell the pin number by right clicking on the pin in any view. That will tell you the pin number and description of the pin from the part.

the problem is in the pcb svg (here displayed in Inkscape) where the group copper should be copper1.

so in the sketch select the ACS part and right click and select delete minus to delete the part but leave the traces.

which deletes the part but leaves the wires.

in pcb it removes the part (there were no wires to keep!). As well I changed your AC layout somewhat. You want a lot more space between the traces and in this case (assuming you don’t want to replace the hilink with a 5V wall wart to a barrel jack which would remove the AC from the box completely which is much safer!) moved the AC hot to the top of the board so it is less exposed to stray fingers (but is still dangerous just slightly less so!)

selecting the part in the temp parts bin does not provide the remove part option (it is greyed out.) So to delete the part you need to save the sketch. As the part is no longer in use it will be deleted.

so save the sketch to a new file

then reload the new sketch

here we see there is no ACS part so now load the new part then drag the wires to the pins in breadboard

In schematic all is well the connections show up as rats nest lines.

but in pcb there are no rats nest lines which I think means the sketch is corrupted (as the new part works correctly in a new test case.) So I think you need to start the sketch again from scratch and see if that helps using the supplied new part for the ACS part.

Peter