I want to include some latching DTDP relays... but oh dear

I am exploring the possibility of producing some PCBs with each board having some IO a 74HC595 shift register connecting to a ULN2803A from which each pair of outputs connecting separately to one of 4 latching DTDP relays.
I have run into a bit of a problem in that I can only find single pole/throw non latching relays in the component lists. Am I missing something, is it really this hard to get this kind of relay into my project?

I have done some searches and found similar questions but not much in the way of solutions, one person produced a useful DTDP (non-latching) relay https://github.com/Eunanibus/Fritzing-Parts that I might be able to modify, but how to get their design into my Fritzing project?


Download the zip form git, unzip the zip and you should see the file “941H-2C-5D.fzpz”. Open Fritzing, in the top menu click “File” click “Open”, go to the folder where “941H-2C-5D.fzpz” is located and double click on that file (or select and click Open). Then go to My Parts in the Parts menu and you should see the part at the end of the list. Make sure you save your My Parts bin by clicking on the menu icon in the top right corner of My Parts and click “Save Bin” or it will not be there the next time you open Fritzing.

Thanks for the help steelgoose, I now have it saved in my parts.
Now… How to change it to a two coil configeration.
Thanks again for the help.


How handy are you at drawing in a graphics editor like Inkscape?

"How handy are you at drawing in a graphics editor like Inkscape?"
Alas, not at all, but I am happy to have a go…

I don’t actually need to insert a relay “part” in my schematic, all I need is the through hole footprint with the correct number of holes/connections at the correct spacing.

What is the relay part number so I can look up the datasheet?

Hi Steelgoose
At the moment there are 3 types of latching relays;

  1. Zettler AZ832P2-2C-5DE, this is a 2 coil DTDP 10 pin relay with a traditional 2.54 and 5.08 pin spacing. http://www.zettlercn.com/uploadfile/attachment/eaf2f966a55e051935121736a0771683.pdf

  2. Schrack RT314F05, this is a 2 coil DTSP 9 pin relay, the NC, NO and CO pins have a 5.08 spacing but the coils are connected via a 3 pin arrangement with a 3.5mm spacing. http://datasheet.octopart.com/RT314F05-TE-Connectivity-datasheet-41527841.pdf

  3. Schrack RT424F05, this is a 2 coil DTDP 9 pin relay, the NC, NO and CO pins have a 5.08 spacing but the coils are connected via a 3 pin arrangement with a 3.5mm spacing. (sorry there isnt a link, I’m new here so 2 URLs is my limit)

It was the odd pin spacing on the Schrack relays that made me think about designing some pcbs.

I have downloaded Inkscape and am still playing with it. I opened the DTDP relay from earlier and have altered it to reflect the relay #1 (the 10 pin one), I’m not sure if I did it properly but the schematic and pin layout look correct.

I am having some problems modifying the PCB image (see https://github.com/Eunanibus/Fritzing-Parts specifically the file 941-2H-5C_PCB.svg )
Each pad/pin out position appears to have a top and bottom image/circle, when I try to resize the overall image size or reposition the pin positions the second hole/image doesn’t move… I am working with Inkscape to figure out how to solve this issue.
However, I am unsure about how an Inkscape design should be constructed to enable its transfer into Fritzing, I originally thought a 2 dimensional pin/PCB layout would work… but now (after giving it some thought) I am thinking a PCB design needs a 3d image.
Is this correct, is this why the 941-2H-5C_PCB.svg image has 2 holes/pads in each pin position?


It sounds like you have a part from the old Fz format, Where copper0 and copper1 were separate layers and two set circles, The new Fz format, copper0 and copper1 are embedded with only one set of circles. Follow the link below…

Its actually a fair bit worse than that. I had a quick look at the files, there are no copperr0 layer at all in the pcb svg (there is a copper2 which is possibly meant to be 0 and 1). The fpz has an odd mixture of terminal types such as this

 <p layer="copper0" terminalId="connector0terminal" svgId="connector0pad"/>
 <p layer="copper1" svgId="connector0pad"/>

that I expect need to be corrected (an old Fritzing format could be the culprit here though so this may be valid and work) so it may work). I expect one of us is going to need to give him a hand or suggest he start with a generic IC from core to start from. I’ll have a look at the parts data sheets he referenced as I don’t think the current files have enough pins as well.

Try this and see if it does what you want.

AZ832P2-2C-5DE_Latching_relay.fzpz (8.4 KB)

Of note, the hole sizes in PCB are set to 0.39 as their datasheet suggests as well I put in all the pins so you can use a 16 pin socket if you wish. If you don’t want the extra holes just delete them, as they are set noconn and thus Fritzing won’t notice their absence. All three views are present and appear to work as far as Fritzing is concerned (in the real world who knows yet :slight_smile: ).

(Edit:) And here are the other 2 as well:

RT314F05_Latching_relay.fzpz (10.4 KB)

RT424F05_Latching_relay.fzpz (9.7 KB)

Do you know what words FZ understands.

If I use connector0pad it doesn’t auto assign pins when you load the svg into a FZ edit, but if you use connector0pin the pins auto assign.

The CORE TO-220 uses nonconn0

No. I’m just copying what I’ve seen :slight_smile: I think (but don’t know for sure) that Fritzing only cares if it says connector something, pretty much anything else will be ignored I think. I didn’t know what the difference between connector0pin and connector0pad was before now for instance (I usually use pin but have seen pad).

Near the end of my last Chapter 5.5 show the phenomena.

Who knows what FZ has built in.

Thank you for all of the replies and thanks Vanepp for the relay fzpz files, they really helped.

I have been experimenting with Fritzing and am making progress. I have found that unless I have a large PCB, the “auto route” function has some problems with the number of connections between the 74HC595 - ULN2803A chips and the 4 relays on each board.

I have had a go at rearranging the components and manually routing the connections in the PCB view; so far it looks ok.
However, because this is my first attempt at designing a PCB I am a little unsure, it would be helpful to hear some views from more experienced people, is it possible to post the file and get some feedback on my design - layout?

Thanks again for the help.


Sure post your sketch and we will have a look. Off the top you should run DRC (design rule check under routing in pcb view) and likely use a gerber viewer such as gerbv to check the actual gerber files that you send to the production house (assuming you are going for commercial boards) but we are likely to do those things anyway.

Here is the file (I hope).

I have run DRC it looks good. Of course that is once we ignore the obvious issue that I have routed trace over some of the unused pads under the relays. The pads are left over from the original 16 pin chip that formed the base of the relay layout, hopefully this isn’t a problem.

I don’t consider this to be a “finished” design but it would be good to know if I have made any blunders before I have another go. Also, I still need to change the Molex connectors to something 2.54mm through hole and to give the board a more universal application I may move/remove the 5.08 screw connector (labelled Left - Right) in favour of a traditional 6 pin IO for each relay.

relay boards 02.fzz (47.6 KB)


With the warning that I rarely make boards (and therefore you should wait and see if someone more qualified comments :slight_smile: ) the layout looks OK to me. However there is something very wrong with the silkscreen output in the gerbers. The board outline is wrong and a bunch of the outlines are missing and all are in the wrong place. I’m not sure why because they display OK in Fritzing just not in gerbv (which means they are likely wrong, as the gerbers are what the board will be made from and gerbv is independent of Fritzing.) As well the connectors look odd, the pins are offset both in Fritzing and in the gerbers, looking at the Sparkfun part I believe the Fritzing part is wrong. This looks like an eagle to Fritzing bug where it offsets the connectors, they should be in a single row like a standard header not this offset vertical pattern. In addition an electrical issue: you need bypass capacitors, one .1uf ceramic and a 1uf to 10uf tantalum across the 5V power rails, as close to the power pins of the ICs as possible (I’d use a .1 ceramic on each ICs and the 10 uf tantalum near the 74hc595). The relays will cause inductive spikes when the coils energize / deenergize. The suppressor diodes in the 2803 will help but the bypass caps are still needed to make sure the spikes don’t cause the 595 to clock when you don’t want it to (and are always best practice anyway). There look to be some errors (non routed rats nest lines) in the breadboard view which may have a bearing on the missing silkscreen data or may not. In general it is best to start in one view (I usually use schematic) and make it complete and then follow the rats nest lines for the other two views. Trying to do connections in different views sometimes causes corruption in the parts database which may be what is happening here. (edit:) Cancel the comments above about the silkscreen, I obviously screwed something up as a reload gets correct silkscreen. So if you replace the connectors with the updated part below and add bypass caps you should be good to go for the pcb view unless someone else sees a problem. As noted you have some wiring errors in breadboard view.

(Edit to update):

Here is how I would route your board:

relay_boards_03.fzz (56.1 KB)

and the what and why to get from your original to this:

  1. Load new parts Header_4_fixed.fzpz and AZ832P2-2C5DE_Latching_relay_only_active_pins.fzpz

Header_4_fixed.fzpz (5.4 KB)
AZ832P2-2C-5DE_Latching_relay_only_active_pins.fzpz (8.8 KB)

  1. Select the relays one at a time and in inspector change varient from “varient 2” to “only active pins”. This deletes the unused pins in pcb and makes drc happy and routing easier.

  2. Select the connectors one at a time and change varient from “polar lock” to “fixed PCB footprint” to correct the connector spacing.

  3. Add bypass capacitors (2 .1 uf ceramics and a 10uf tantalum) to the power supply.

  4. Separate logic power and ground from relay power and ground. The relays are likely to cause current spikes and induce noise in to the digital ground if not separated.

  5. move everything possible to the bottom layer (makes trouble shooting easier in case of error!).

  6. Increase the trace width on power and relay connections (both likely to be high current) to maximum size. The 74HC595 probably doesn’t matter, but it is easy to do and won’t hurt anything.

Hi Vanepp,
Sorry for the delay in responding and thanks for the thorough replies, your work on my board and the inclusion of the bypass caps.

R.e. the connector pin offset issue; I was wondering about that. When I was looking for connectors I noted the associated text for some through hole 2.54mm connectors stated the pins are offset to assist placement (by a tiny 0.005 inch). I made the foolish assumption that the images I saw in the PCB view were a representation of the offset.

R.e. starting in one view; for the relay board I posted, I started in the breadboard view which for some reason completely exploded (and created the wiring errors) while I was working on the PCB view. Am I correct in thinking that as long as the PCB view is ok, then I don’t need to redo the breadboard?
Following your advice to build the circuit in one (schematic) view, I have been making up some “practice” boards in the schematic view (a 12 relay board and a LM3886 amp). I have to say (to any Fritzing novices reading this) that this is a much better approach.

I have had a look at my boards in a few online (free) gerbv viewers and they appear to be ok. However, there are lots of them and because the manner in which each one operates can be quite different I am wondering if there is a/are “preferred” gerbv viewer(s)?