I never worked with electronics or with programming, but few months ago I accepted the challenge, from my 8 years old son, to study and after teach him.
I already did some minor projects that worked very fine and we are enjoying each step.
My last project, perhaps, is becoming the greater challenge until then. Design a Smart Fan, with a button for switching between speeds, motorized oscillating system, IR control and, after all the previous items are done, voice control by alexa.
I was able to gain success on all the items (voice control is a bonus that I will pursue after the prime design is done), and the Breadboard version was fully functional. So I decided for a new step, PCB design, and everything worked like a charm (at least that is what I believe). Had minor tweaks to be done on the PCB, but mainly it was fine.
I was powering all the system using the USB port of the Wemos, in all the versions of the project, from the breadboard version up to the PCB version, and everything was fine. On the PCB version I included a 5V Hilink power source for the system, but all the primary tests were being done by the Wemos USB port.
But, when I finally powered the system with the Hilink... weird stuff happened.
It turned on. The controls worked, the leds lighted up as it should. The buzzer sounded the correct "beeps". But the relays weren't switching.
The design uses three relays where one is for each speed of the fan. It works, and I did several tests with the breadboard version, and everything was fine. The PCB version works also, and all the relays switch according to the design... but only when powered by the USB port of the Wemos. When it's powered by the HILINK, the remain silent.
double checked all the PCB tracks. The diagram also. Used a external spare hilink to power the system, inserting the 5v directly to the "Vin" of the wemos D1, and the problem persists.
Now I am out of options. How I am a Noob, I am sure that something simple has not been seen by me, but more experienced eyes may detect.
So here I am begging for help.
Below is the diagram of the design. If you need more material to analyse, let me know. Diagram
What is a hilink? Can you post a link to it please.
I notice on the schematic there is an AC power input going to something, what is that something?
I also notice that you have no power supply decoupling at all on the board.
There are some special regulations regarding safety when mains is on a PCB. It has to do with what is known as cheapage and clearance. And are the distances that must be maintained between the AC side and the rest of the circuit. There is a minimum distance any part of the AC circuit must be from any other part, and a keep out region separating any AC part from the rest of the circuit. This normally involves cutting a long slot in the PCB to aid the isolation.
So there is a lot more to putting AC on a PCB than you might think.
Sorry, I thought that a Hilink was something "mainstream".
The Hilink is a AC/DC converter. In my design I used a HLK-PM01.
I did some of the observation that you written. I placed a mask of 2.5 mm around all the AC tracks, avoiding any DC or data tracks to pass near the AC tracks. I reduced the size and grouped all the AC tracks on a specific location on the PCB, far from the DC and data tracks. I also made some cutouts on the AC tracks that I wasn't able to avoid to keep distant from the data/DC tracks. Oh, I also placed a GND mask covering most of the board.
But I will check them all again.
Hi,
this supply Hilin supports up to 600 mA.
From what I saw in your schematic you are using 2 relays that each consume 75 mA, totaling 150 mA, you are using a servo that can consume up to more than 650 mA, apart from the consumption of the D1.
That is, this supply is not recommended for your project.
Maybe it works fine with a 5V supply of approximately 2A.
Thanks for your reply.
I maintained the servo connector, but I removed him from the design. I placed a relay that will switch on/off a AC motor of 5 rpm, that will use the same connector.