Could Someone Give Me Advice on Designing a Custom PCB for a Home Automation Project?

Status
Not open for further replies.

Thread Starter

Raelynn

Joined Aug 28, 2024
1
Hello everyone:)

I am currently working on a home automation project and would appreciate some advice on the design and creation of a bespoke PCB. This project is really important to me, and while I hae been learning as much as possible; I have realised that there is still a lot I do not know. I am hoping that the more experienced members of this site can offer some insight and advice.

My project's purpose is to set up a centralised control system for a variety of home automation functions, including lighting; security; and environmental monitoring of temperature; humidity; etc. I have chose to create a bespoke PCB to function as the main controller for this system. The board will need to communicate with a variety of sensors; actuators; and wireless communication modules; including Wi Fi and zigbee. I want to make the design as efficient and dependable as possible while keeping the cost reasonable.

I have described the essential requirements for the PCB
  • I chose the ESP32 because of its versatility and Wi Fi bluetooth connectivity.
  • The board will be powered by a 5V DC adapter; with a voltage regulator stepping down to 3.3V for the ESP32 and other components.
  • The PCB will include connectors for a variety of sensors; including the DHT22 for temperature and humidity; PIR motion sensors, and some analog sensors.
  • I will use relays to control lights and other appliances. The relays will be powered by transistors that will be controlled by the ESP32.
  • In addition to the built in Wi Fi; I am considering adding a Zigbee module to ensure interoperability with other smart home devices.

I am new to PCB design, so I'm not totally confident in the layout. Are there any suggested procedures I should use to reduce noise, maintain signal integrity, and avoid common pitfalls? I am not sure how to correctly route the power and ground planes to avoid ground loops or voltage decreases.

I am thinking of utilising an LM1117-3.3 regulator to step down the voltage. I have read that linear regulators can be inefficient, when there is a large difference between the input and output voltages. Would it be preferable to use a buck converter instead, or is the LM1117 adequate for this purpose?

I have chosen the majority of the components; but I am still unsure about a few; particularly the transistors for driving the relays. Should I use NPN BJTs; such as the 2N2222; or would MOSFETs be better? If you prefer MOSFETs; which ones would you recommend for a 5V control signal?

Because the ESP32 includes Wi-Fi and Bluetooth, and I plan to add a Zigbee module, I am concerned about wireless interference. Are there any design considerations I should keep in mind to prevent signal interference across these various wireless technologies?

Also I explored some topics related to this https://forum.allaboutcircuits.com/threads/how-to-design-a-arduino but I did not get the sufficient solution of my query so I would really want to get some help from a more experienced person

Any advice; resources, or insights you could offer would be highly appreciated.
I am eager to learn and want to ensure I am on the correct track before moving forward with the final design and buying the PCB.
Thanks in advance

MOD EDIT: Spam link removed. Spammer banned.
 
Last edited by a moderator:

MrChips

Joined Oct 2, 2009
34,627
Welcome to AAC!

I had to look up the meaning of "besoke" since it is not in my everyday vocabulary. Did you mean "custom"?

This is a very complex project with lots of challenges and requires some knowledge and experience in many areas.
My suggestion would be to take it in stages. You have some concepts of the specifications and then you progress into actual solutions, components, and devices. I would suggest that you leave these decisions for a later stage.

A picture is worth a thousand words. Start with a conceptual block diagram. Show the functional parts of the entire system. Do not specify components at this stage. This is what I call "Top-down systems engineering design" as opposed to "bottom-up implementation".

Here is an example of a block diagram taken off the internet.

1725038346561.png

Your initial request calls for a PCB to be made. This is actually much farther down the R & D stage. In fact, it is almost towards the end of the project before the debugging and testing stages.

Good luck on your project!
 

ericgibbs

Joined Jan 29, 2010
21,390
Hi MrC,
English 'tailoring' terminology.
Buying a suit of clothes say.
Bespoke is a 'made to measure' suit.
Or
You could choose 'off the hook' ready-made.
E
 

MaxHeadRoom

Joined Jul 18, 2013
30,557
If designing from the ground up there is free Kicad S/W for the PCB etc.
You could also look at either smart relays, or a full PLC. All the H/W is there, just has to be programmed.
For a bespoke system, If you want to incorporate opto isolated I/O, there is Opto22 products that include already made I/O modules Of all kinds
https://documents.opto22.com/0254_G4_Digital_DC_Outputs_data_sheet.pdf
Or design your own custom I/O tailored around the same design.

sample e.g:
1725042205202.png
 

nsaspook

Joined Aug 27, 2009
16,249
Hello everyone:)

I am currently working on a home automation project and would appreciate some advice on the design and creation of a bespoke PCB. This project is really important to me, and while I hae been learning as much as possible; I have realised that there is still a lot I do not know. I am hoping that the more experienced members of this site can offer some insight and advice.

My project's purpose is to set up a centralised control system for a variety of home automation functions, including lighting; security; and environmental monitoring of temperature; humidity; etc. I have chose to create a bespoke PCB to function as the main controller for this system. The board will need to communicate with a variety of sensors; actuators; and wireless communication modules; including Wi Fi and zigbee. I want to make the design as efficient and dependable as possible while keeping the cost reasonable.

I have described the essential requirements for the PCB
  • I chose the ESP32 because of its versatility and Wi Fi bluetooth connectivity.
  • The board will be powered by a 5V DC adapter; with a voltage regulator stepping down to 3.3V for the ESP32 and other components.
  • The PCB will include connectors for a variety of sensors; including the DHT22 for temperature and humidity; PIR motion sensors, and some analog sensors.
  • I will use relays to control lights and other appliances. The relays will be powered by transistors that will be controlled by the ESP32.
  • In addition to the built in Wi Fi; I am considering adding a Zigbee module to ensure interoperability with other smart home devices.

I am new to PCB design, so I'm not totally confident in the layout. Are there any suggested procedures I should use to reduce noise, maintain signal integrity, and avoid common pitfalls? I am not sure how to correctly route the power and ground planes to avoid ground loops or voltage decreases.

I am thinking of utilising an LM1117-3.3 regulator to step down the voltage. I have read that linear regulators can be inefficient, when there is a large difference between the input and output voltages. Would it be preferable to use a buck converter instead, or is the LM1117 adequate for this purpose?

I have chosen the majority of the components; but I am still unsure about a few; particularly the transistors for driving the relays. Should I use NPN BJTs; such as the 2N2222; or would MOSFETs be better? If you prefer MOSFETs; which ones would you recommend for a 5V control signal?

Because the ESP32 includes Wi-Fi and Bluetooth, and I plan to add a Zigbee module, I am concerned about wireless interference. Are there any design considerations I should keep in mind to prevent signal interference across these various wireless technologies?

Also I explored some topics related to this https://forum.allaboutcircuits.com/threads/how-to-design-a-arduino-salesforceadmin-compatible-custom-pcb-using-atmega808-or-atmega1608.171645/ but I did not get the sufficient solution of my query so I would really want to get some help from a more experienced person

Any advice; resources, or insights you could offer would be highly appreciated.
I am eager to learn and want to ensure I am on the correct track before moving forward with the final design and buying the PCB.
Thanks in advance
Use the controller for what it was designed for, low level control and functionality. I use several 'bespoke PCB' interfaces in my Home Automation system. For the centralized control system I would recommend something with the power to handle large numbers of ESP32 type sensors and be able display and control that interface data in a easily human usable form.
https://www.home-assistant.io/installation/
https://forum.allaboutcircuits.com/...rge-controller-datalogger.194146/post-1826961
 

ronsimpson

Joined Oct 7, 2019
4,646
For my home automation project. I did not want to make something from nothing. (I do that for a living) Because I am using a small number of these the $20 is not important. I needed something that works.
This bord is a Banana Pi 2W. It is 1/2 size. My idea was to do the development on this board. When finish unplug the mentor and keyboard. I can connect to a PC by WiFi and not use the monitor & keyboard.
They have an expansion board with more USBs, network, audio, IR remote control, and switches.
I got a second expansion board with 4 relays.
I have it running with a real time operating system. I can search the www. The human interface I use is WiFi to a cell phone.
1725039806114.png
There are boards like this from $5 to $150. Where 5=cpu only and 150=power of a desktop.
I just can't spend $1000 to make my $10 board.
 

nsaspook

Joined Aug 27, 2009
16,249
For my home automation project. I did not want to make something from nothing. (I do that for a living) Because I am using a small number of these the $20 is not important. I needed something that works.
This bord is a Banana Pi 2W. It is 1/2 size. My idea was to do the development on this board. When finish unplug the mentor and keyboard. I can connect to a PC by WiFi and not use the monitor & keyboard.
They have an expansion board with more USBs, network, audio, IR remote control, and switches.
I got a second expansion board with 4 relays.
I have it running with a real time operating system. I can search the www. The human interface I use is WiFi to a cell phone.
View attachment 330524
There are boards like this from $5 to $150. Where 5=cpu only and 150=power of a desktop.
I just can't spend $1000 to make my $10 board.
Nice main controller board for the money.
https://www.amazon.com/Orange-Pi-Allwinner-Computer-Bluetooth/dp/B0C9ZZKNL4?th=1
http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/Orange-Pi-Zero-3.html
1725061208535.png
1725061228446.png
I'll get one to load HA.
 

ronsimpson

Joined Oct 7, 2019
4,646
After working with the Banana, I like the Raspberry Websight much much much better.
The Raspberry Pi has members in the forum. Most development software comes with Raspberry files. The Banana files were hard to find and are not well supported. imo

I think the ESP32 is an option. (WiFi) Anything that runs Arduino is an option. Some have WiFi.

I vote for a low-end Raspberry, Banana, or _____ where you can run an internet explorer, email, webserver, word processor, all at the same time.
 

nsaspook

Joined Aug 27, 2009
16,249
After working with the Banana, I like the Raspberry Websight much much much better.
The Raspberry Pi has members in the forum. Most development software comes with Raspberry files. The Banana files were hard to find and are not well supported. imo

I think the ESP32 is an option. (WiFi) Anything that runs Arduino is an option. Some have WiFi.

I vote for a low-end Raspberry, Banana, or _____ where you can run an internet explorer, email, webserver, word processor, all at the same time.
If it will run Debian 12 then I'm gold for running HA on the Banana. I need IPV6 for my home automation to interface with existing matter devices now being connected to x86 Linux server. The ESP IPV6 stack is marginal beyond simple point to point connections. The RPi works well too but would like to try something different for a low power host.
 

ronsimpson

Joined Oct 7, 2019
4,646
If it will run Debian 12
I am running Debian ?? on Orange Pi zero 2w 4g. That is the large memory version. It is only 2 core. It runs youtube and word processor at the same time but that is pushing it a little. It might be slow for big jobs. I am using a SD card as a hard drive. That slows things down.
I don't know how to find what version of Debian.
 

nsaspook

Joined Aug 27, 2009
16,249
I am running Debian ?? on Orange Pi zero 2w 4g. That is the large memory version. It is only 2 core. It runs youtube and word processor at the same time but that is pushing it a little. It might be slow for big jobs. I am using a SD card as a hard drive. That slows things down.
I don't know how to find what version of Debian.
I know where to find the proper release for the Zero 3.
http://www.orangepi.org/html/hardWa...ers/service-and-support/Orange-Pi-Zero-3.html
It should be fun getting it running from a backup file from the operational HA system.
 

WBahn

Joined Mar 31, 2012
32,702
MOD NOTE: Locked pending moderation.

Guys, uh.... the original post is pure spam. They only made it for the purpose of trying to hide a link to an unrelated commercial site.

So I'm locking the thread. Normally we would just spam-ban the member, but that would delete the entire thread, including nearly a dozen legitimate responses. Moderation needs to decide if the thread should remain.
 
Last edited:

WBahn

Joined Mar 31, 2012
32,702
MOD NOTE: Discussion re-opened. Keep in mind that the original post was merely a vehicle for spam and that the TS has been banned.
 

MisterBill2

Joined Jan 23, 2018
27,159
I was going to suggest an intermediate PLC from Automation Direct. (This is not advertising. I have used them and the value of the fee programming software exceeds the price of the PLC some times)
The reason is that for home automation projects, reliability and durability are very important, and an industrial strength product is much more likely to not have hardware problems.
AND, once the actions to the inputs are decided, the programming software is simpler to watch work on the screen and verify that it is doing what is wanted.
There is a time and place for struggling with a learning curve, and implementing a home automation system is neither of those.
 

nsaspook

Joined Aug 27, 2009
16,249
I was going to suggest an intermediate PLC from Automation Direct. (This is not advertising. I have used them and the value of the fee programming software exceeds the price of the PLC some times)
The reason is that for home automation projects, reliability and durability are very important, and an industrial strength product is much more likely to not have hardware problems.
AND, once the actions to the inputs are decided, the programming software is simpler to watch work on the screen and verify that it is doing what is wanted.
There is a time and place for struggling with a learning curve, and implementing a home automation system is neither of those.
That's why I recommended Home Assistant. I've found that system to be very reliable (on good hardware like HPE systems), with tons of options specifically designed for home automation systems that are integrated with common commercial home Iot and automation products.
https://www.home-assistant.io/
https://www.home-assistant.io/integrations/

It's great even for something as simple as tracking tomato plants.
1726708454157.png
1726708506129.png
Temps.
1726708568009.png
Watering.

https://shop.ecowitt.com/products/gw1100
 
Last edited:

nsaspook

Joined Aug 27, 2009
16,249
The little Orange Pi has a new kernel I compiled (add the comedi hardware support and optimize some system kernel setting for the 618 processor on the board) with some extra DAQ support using the Comedi USB modules for the old VM110N interface board.
https://www.velleman.eu/products/view/?id=404998&lang=en
https://github.com/Linux-Comedi/comedi
Your standard 'blink' LED test program that was cross-compiled from my HP server desktop to the ARM64 shared NFS drive using the Netbeans IDE.
1729908385144.png
1729908428908.png
 

MisterBill2

Joined Jan 23, 2018
27,159
That pretty computer package shown in post #18 still requires an external relay to control anything needing much power. It also requires an external power supply to operate, AND the whole collection requires mounting inside an enclosure of some kind.
A low priced PLC will be vastly more mechanically robust, probably include it's own power supply, and have the relay interface included in the package. Also, the terminals for connection to the outside world will be more durable. Aside from that, the whole package will be a "program, plug, and play" project, not demanding connection wiring other than to the outside world.
Aside from that, ladder logic programming is simple to learn and very obvious to follow once it is in operation.
 
Status
Not open for further replies.
Top