PCBs available

Oct 12, 2023 Last reply: 2 years ago 19 Replies

The dear chinese sent me 10 PCBs instead of one, so if anyone UK want a PCB to build a mains powered power supply with 4 x 250VAC capable relays buffered to suit raspberry PI GPIO current levels....



Let me know. Correct power supply choice would make it OK for 110V



formatting link


That's a nice board - clear markings, easy to access components, neat power supply. What tool did you use to design it, out of interest?

I made my own similar board last year - 7 relays, in a much tighter space, mains coils and contacts (but still trying to keep the best isolation I could).

I now need to trigger one mains coil from a Pi without exporting mains or putting any DC wiring in the all-mains enclosure (where I can't get good isolation). Current plan is to make a photo-triac triggered by light from an LED on the Pi carried on some optical fibre...

Theo

I assumed it was a standard board. A 5v/240v relay is a common requirement. I used a very similar board, before I switched to using Shelly/Sonoff type devices. It even had 4 relays, when I only wanted one.

Chinese relay boards aren't uncommon, eg:

formatting link

- on that one there are optocouplers between the inputs and the relay coils, for some reason (maybe they were cheaper than transistors, or they really don't trust the relays' isolation?)

The nice thing about TNP's board is there's a mains to 5V converter on board, which means you can power the board from the mains that you're switching. Otherwise you need to arrange for a separate DC power supply, and that gets annoying in a tight space - with this board you don't need a separate power supply for the Pi.

Theo

Since when I did this professionally it was black tape on clear film, I ended up using Corel Draw! I started with a 3D modelling program to make sure the physical bits fitted, then exported the copper to Corel, because I am very fluent in it

I found a CDR to Gerber conversion utility online. That made all the difference and it even worked for the legend. The drill file was harder but again I found a utility to create that.

3D printed case is on its way from a good friend. STL files available for that as well

If a discrete optical coupler is a nono that might work.

Yes. I was going to cobble it all together from hats, but then it all seemed messy. If I had thought a bit more I could have made a bigger board and put the zero actually ON the main PCB, and eliminated the 6 way plug...

I am considering just that for the next part of all this - the oil tank ultrasonic level sensor which needs a battery holder, a micropower timer to fire the PI Pico up every hour and then shut it down, and the ultrasonic transducers. Plus two resistors to drop the supply voltage to something the PICO ADC can handle.

It seems that the place that does the board just does a whole big sheet of copper pcb at one price, so ordering just one doesn't happen. I think this was $40 for ten boards.

Now I don't want a million oil tank sensors, but frankly $40 for a single proto board is OK so if I get another 20 thrown in, they will be up for grabs too.

I am not claiming that I can get my discrete parts count down to a mass produced surface mounted HAT, because I cant. But the heating controller has to 'see me out' and this looks to be a reasonably professional way to use my skills and what eyesight and manual dexterity I have left to make a solution that exactly fits what I want.

And the odd thing is, that 4 transistors of such ancient vintage is

*cheaper* than a pack of 6 in a DIP or SMD package...

Anyway, can't wait to put it in its 3D printed case and install it. It been hard work but lots of fun too.

Nice. An ex-colleague of mine has a startup which does 'PCB art', ie using the PCB medium for artistic design that happens to be a functional circuit:

formatting link
He has a flow that uses Inkscape for the 'artistry' and then turns it into Gerbers:
formatting link
but if you don't need any of the schematic/netlist/ERC/DRC/etc support that a PCB tool gives you, just hand drawing it in the drawing package works well enough. It's quite a nice idea for making attractive and not-complicated boards.

It's a bit annoying... with no DC in the box and not wanting to risk exporting mains to the Pi, or making another box with a relay, the obvious option is an optocoupler, but you can't really ensure good isolation unless you put it in a good enclosure, which is tricky here because I'm shoving it in an existing mains box dangling on flying leads.

Aha, I thought, you can get optotriacs to switch AC, so what about if I just get a phototriac and shine a light at it to trigger the triac instead of having the LED in the optotriac. Trouble is, phototriacs don't exist as a discrete component. So the next plan is to use an LDR (photoresistor) to trigger the gate of a regular triac (street lights use this for the dawn-to-dusk circuit). Only finding an LDR rated for 339Vpeak is tricky, so I probably need to voltage divide first...

I suppose I should just bite the bullet with an optotriac, put it in a little case with wire tail connections, and pot it all with some HV safe resin. Although the idea of a mains box with just an optical fibre input does have its appeal...

Theo

yes, you have thought it through all right., I didnt think LDRs had a 'maximum voltage' rating TBH.

The other possible coupler is RF. Or magnetism outside the box triggering something inside. Like a reed relay

Can't you "snap" one of these in half?

formatting link

That's a photodetector (photodiode, amplifier) which has a DC output and needs a DC power supply. It can neither switch nor be powered by mains, without extra components. You'd need an AC to DC power supply (either a SMPSU module, or DIY a non-isolated PSU with associated risks) and then a circuit to switch an AC mains output (a zero-crossing triac, possibly).

Makes it much more complicated than it needs to be.

Theo

LDRs are funny because most of them are CdS and cadmium is restricted under RoHS, so the market is a bit limited. Most of the popular (Chinese) ones go up to 100-150V. I found a 250V one, but that'll be 250V dc so not rated to handle 240Vac peaks (=339Vdc). Don't want to connect something directly to the mains that I'm running out of spec.

It's a steel box, so magnetism through it is awkward. I thought about RF, but the receiver needs a DC power supply - I don't have space for one of those 433MHz 'remote control plugs' you find on Amazon, and the steel box won't help with the RF.

I thought about reed relays, but all of the ones available are PCB mount and I don't have a PCB.

I suppose if I'm potting something I could equally as well pot a PCB reed relay as an optotriac, and bring out the coil connections to the Pi. Although the opto's LED I can connect directly to the Pi, while the coil will need a booster transistor.

Theo

I am surprised the old glass envelope things don't still exist.

Mmm. if you google 400V opto-isolator you find many option. Phototransistors and phototriacs instead of LDR's

There are some that will do batches of five. They do arrange multiple designs onto the same board for etching, so it's not a matter of minimum copper area, but they usually make extras in case of flaws and 10 + 1 extra would be more cost-efficient for them than 1 + 1 extra. I once got a (very) flawed board thrown in amongst the others with a big X drawn on it with permanent marker - not sure what to think of that.

Of course sometimes the pricing is just wacky. The first time I ordered from one Chinese PCB manufacturer, the price for 105 boards was _lower_ than for 100.

That had been fixed by my second order, and they started slugging me with an extra postage charge at the end of check-out then too (probably because I'm not in a major city like most customers).

I still prefer to etch boards myself sometimes, but then I prefer doing most things myself if given half a chance.

I tried, but in the end the cost of what it took me to utterly fail to get a board exposed correctly was well in excess of $40.

The key breakthrough was finding a Corel to Gerber converter: things like EagleCAD and friends are just too damned complex with a very steep learning curve. Fine for a 10 layer board perhaps, but not for a very simple beast like this

Would a solid state relay do what you want? They are available for low power applications as well as high power.

The one thing they are not good for is controlling transformer-coupled loads.

David

Yes, they're basically the optotriac idea but in a Darlington configuration and with the snubber network integrated. I agree that does make life easier than building the circuit.

I have a few lying around but they're large bricks, roughly the size of a cased Pi. However there appear to be slim 2A SSRs around:

formatting link
will likely do the job (minus PCB).

Theo

Oh right, yeah those photo-resist kits are expensive. I use the toner transfer method, but you need to pick a printer with a straight-through paper feed path for that. I tried to turn an ink-jet printer into a direct-PCB printer once, but got defeated by all the microswitch sensors from the removed paper feeder that needed to be triggered at the right moment or else the controler would throw an error.

Those programs do make it easier to keep within the manufacturing specs of the PCB manufacturer though, by checking all the gaps between tracks. Things like that are one other reason I prefer to just make boards myself rather than deal with Chinglish emails about how the silkscreen goes slightly over the edge of the board or there's an extra charge because a via was in the wrong place. Too much for a one-off DIY project. Although I'll admit that I haven't found a good way to line up the pattern on double-sided boards when etching them myself, so that's usually frustrating too.

Probably, but I was doing that years ago, by hand

1/. Its easy to register the sides. You just drill some registration holes before exposing 2/. You wont have a silkscreen or vias on a hand etched board. 3/. Whoever was at the other end of this transaction spoke perfect English and seemed to be based in the USA. I suspect he has a chum in a pcb plant in china, and gets s slender commission

I have to say this is the second time I have these these people and it has always gone smoothly, if slowly in terms of postage.

The minimum they require is four Gerber files - the board outline, the copper, the silkscreen and the solder mask. And a drill file in the CNC format. Since i designed the board in Corel using layers for each of the above, alignment was guaranteed.

Recommended.

formatting link

That doesn't apply for toner transfer where I pre-heat the board and then apply the grease paper with the layout printed on it. I have tried anchoring corners of the paper but it tends to all go wrong (I succeed eventually though).

Can do. The silkscreen is just the same toner transfer process done again after etching, and vias can just be wires soldered on either side of the board if the holes and tracks are big enough.

Sounds good. I just like doing things myself at heart.

So do I, but there are limits to what one can do *well*.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required