Hello all,
Yes, I checked the datasheet of the sofa motor, tested the signals with a voltmeter and managed to control it with the Pico. The only issue I had was that the Pico reseted when I was turning off the relay. With the 12V DC motor, it was the contrary, the Pico were reseted when I was turning on the relay.
Yes, I thought that disconnecting the RESET pin from the ground by removing the button would be sufficient, but the issue was the wire connected this pin that was acting like an antenna.
As @ghp suggested, the 10K pull-up and the twisted wires seems to fix the issue. I did a test on the sofa yesterday and it worked without any problems. Compared to my last post, I twisted the RESET and GND wires like in the figure below:
The next step of this project is to design a PCB of this prototype. I'm a novice in this particular topic; Do you know what could I do to limit interference from the motor on the RESET pin?
The 29V comes from the AC-DC power adapter of the sofa and the buck converter already has a 220uF 35V capacitor. Is that not enough to protect it from motor surges or drops?
Regarding the relay configuration, indeed the up and down buttons are never supposed to be operated at the same times. It is handled at the software level, but not at the hardware one. For the first version, I will keep the Pi Hat with one relay per command, but it is an interesting suggestion for the next releases.
Thanks,
Do you know for sure how the signals on the 4-pin connector work?
For example, are you sure you have to provide 29V to the Up and Down command pins? Or should they just be shorted to GND?
Yes, I checked the datasheet of the sofa motor, tested the signals with a voltmeter and managed to control it with the Pico. The only issue I had was that the Pico reseted when I was turning off the relay. With the 12V DC motor, it was the contrary, the Pico were reseted when I was turning on the relay.
You seem to be having similar issues as the ones reported here: viewtopic.php?t=361862.
The pullup on the RUN line is pretty weak, so anything getting to it can probably cause what you were seeing as you figured it out. If at some point you do end up using that pin you can add a much stiffer pullup (e.g. 10k or even 3.3k) so it only pulls down when something really drives it down.
Yes, I thought that disconnecting the RESET pin from the ground by removing the button would be sufficient, but the issue was the wire connected this pin that was acting like an antenna.
As @ghp suggested, the 10K pull-up and the twisted wires seems to fix the issue. I did a test on the sofa yesterday and it worked without any problems. Compared to my last post, I twisted the RESET and GND wires like in the figure below:
The next step of this project is to design a PCB of this prototype. I'm a novice in this particular topic; Do you know what could I do to limit interference from the motor on the RESET pin?
I would consider a diode and large capacitor to feed the 29V to the buck converter, so that if the motor surge drops the 29V significantly it will have minimal effect on the buck converter.
If the up and down buttons are never supposed to be operated at the same time, I would change the relay configuration to an on/off relay (defaulting to the off position) feeding a direction relay. This will make it impossible for both up and down to be operated together even if the Pico decides to have a mad spree.
The 29V comes from the AC-DC power adapter of the sofa and the buck converter already has a 220uF 35V capacitor. Is that not enough to protect it from motor surges or drops?
Regarding the relay configuration, indeed the up and down buttons are never supposed to be operated at the same times. It is handled at the software level, but not at the hardware one. For the first version, I will keep the Pi Hat with one relay per command, but it is an interesting suggestion for the next releases.
Thanks,
Statistics: Posted by lg74 — Tue Dec 26, 2023 11:32 pm