Housings for homemade electronics systems has always been a problem for me. Despite the advent of 3D printing as an alternative solution, it can be difficult to implement when your enclosure needs to be designed from scratch. Not to mention that PLA is fragile and inflammable and therefore not very suitable for electronics in mains switchboard. ABS on its side, is somewhat resistant and safe, but also more complex to print. Unfortunately for me, 3D printing was not the simplest solution.
On the other hand, when commercial offers exist corresponding to your complete electronic systems, it is most of the time very expensive, not very flexible and / or non modifiable. I often come back to the point where it seems to me more efficient to build the system myself and ... again ... I come up against the problem of the enclosure.
The DIN rail systems for Arduino that I found were mainly brackets that attach to the rail. So I decided to look for generic DIN boxes knowing that they would require modifications to match the electronic circuits.
To limit the risk, I chose a cheap 6-module DIN box (3.50€) from JOYKK (Amazon - ASIN: B07PHYX1JH) whose size (107x87x59mm) was very close to that of a Arduino MEGA (101.6x53.3) and high enough to also host the Ethernet/SDC shield.
It fits, but...
- inside the bottom of the case there are two clips to hold the two shells together and the width is reduced to just 99.9 mm at this point! The Arduino MEGA PCB will have to be filed to make room for one of the two clips. Trimming will be done on the 32-pin connector side to create a notch for the clip and a reduction in PCB width of about 0.5 mm. Fortunately, this part of the circuit board has no tracks inside.
The emergent part of the front face of the enclosure is 47.7 mm height , but on some switchboard boxes this window height is only 46 mm.
To fix the Arduino MEGA inside the enclosure, the hole close to the RJ45 will be used using a M2.5 screw and a washer. Then you will have to drill the holes for the USB, RJ45 and power sockets. You can use the Arduino Schematic here attached to locate the positions. The RJ45 socket of the shield is located 6mm above the USB socket and it width is 15.9mm. Left sides of both sockets are aligned.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: DIN Case for Arduino Relay
Most of the time, there is also needs for relays in Home Automation systems.
Arduino relays shall be placed into DIN modules. One possibility is to buy a DIN 2M box and put the Arduino relay inside.This solution is simple and cost effective but not optimized because it uses a 2 modules width box.
Enclosure : JOYKK 88x37x59mm (Amazon ASIN: B07NP1SBT9 - 1.60€ pcs)
HINT: On the connector, have the GND on the center pin so there will be no damage if the connector is plugged in the opposite way.