myWerkzeug.de › CNC.myWerkzeug.de › Templates › Circuit boards
CNC template · Circuit boards
24 V optocoupler input
Brings 12 to 24 V signals from limit switches, sensors or PLCs safely to a microcontroller: the PC817 isolates both sides galvanically, LED1 shows the signal, D1 protects against reverse polarity.
- Size
- 55 × 40 mm, 1.6 mm thick
- Material
- Circuit board (FR4)
- Difficulty
- Intermediate
- Milling time
- approx. 10 min
- Bits
- Engraving bit 30°, PCB drill Ø 0.8 mm, PCB drill Ø 1.3 mm, Corn cob router bit Ø 2 mm
- Customise
- Fixed template, freely editable once opened
Free with an account · carve with Chrome or Edge · no installation
Build instructions
Parts
| Qty | Part | Value | In layout |
|---|---|---|---|
| 1 | Resistor 0.25 W | 2,2 kΩ Colour bands: red, red, red, gold | R1 |
| 1 | Resistor 0.25 W | 10 kΩ Colour bands: brown, black, orange, gold | R2 |
| 1 | Signal diode The band on the case is the cathode and sits on the side of the line in the layout. | 1N4148 | D1 |
| 1 | LED 5 mm The long lead is the anode; the flat side (cathode) points to the mark in the layout. | yellow | LED1 |
| 1 | Optocoupler Notch towards the mark in the layout; solder the socket first and insert the IC last. | PC817 | IC1 |
| 1 | Screw terminal 2-pin, 5.08 mm pitch | X1 | |
| 1 | Screw terminal 3-pin, 5.08 mm pitch | X2 | |
| 1 | IC socket DIP-4 |
You also need: soldering iron (about 30 W, fine tip), 0.5 to 1 mm solder with flux, side cutters and a multimeter.
Assembly
- Mill the board: isolate the copper first, then drill, and finally mill out the holes and the outline. The order is shown in the Milling panel.
- Cut through the holding tabs, deburr the edges and rub the copper bright with a scouring pad. After that, do not touch the copper side with your fingers.
- Use a magnifier and a continuity tester to look for leftover copper between neighbouring traces; cut any bridges with a craft knife.
- Insert the parts from the side without copper and solder them on the copper side. Fit low parts first: resistors and diodes, then sockets and transistors, and finally capacitors, terminals and large parts.
- Before soldering, compare the polarity with the component layout: band of the diodes, flat side of the LEDs, minus stripe of the electrolytic capacitors, notch of the ICs.
- Solder each lead for about two seconds at around 330 °C: tip on pad and lead, feed solder until it flows all round. Then clip the leads just above the joint.
- Solder the IC socket with the notch towards the mark, then D1 (band towards the mark) and LED1.
- Never connect the two sides: the input ground (−IN) and the microcontroller ground (GND) stay separate, otherwise the isolation is lost.
- Visual check: no solder bridges, no dull, balled-up joints. Remove flux residue with isopropyl alcohol and an old toothbrush.
Test and power up
- Before switching on for the first time, check with the meter that there is no short between plus and minus of the supply. Power up the first time on a bench supply with current limiting if possible.
- Insert the PC817 with the dot (pin 1) towards the mark.
- Connect the microcontroller's VCC (3.3 or 5 V) and GND to X2, and OUT to an input: with no signal, OUT is pulled to VCC through R2.
- Apply 12 to 24 V to X1: LED1 lights up and OUT goes to 0 V (active LOW).
- Finally protect the copper side against oxidation with solder lacquer or plastic spray.
How to carve this template
- OpenOpen the template in the app and adjust size and text if you like.
- CheckLook at it in 3D, check run time and warnings.
- Set upThe carve wizard guides you through material, clamping, bit and zero point.
- CarvePress start; the app drives your Grbl router directly over USB.