I don't know where to start troubleshooting this issue, and would appreciate any thoughts. ProMini clone, motor driver board, production code has been employed in perhaps 200 units over the last 10 years without change.
Application:
Upon power-up device homes an actuator; external signal triggers a relay which brings an INPUT_PULLUP pin low; device responds by moving an actuator.
Problem I'm experiencing:
When powered up normally, device will home actuator but not subsequently respond to trigger signal.
If powered normally and connected to PC (for Serial Monitor), device works normally.
If PC is then detached, device continues to operate normally.
If powered-up and then reset via onboard button, device operates normally.
What I've tried:
Serial Monitor to see what is happening (see above... problem cannot be traced because it works fine)
Confirm relay operates normally
Replace ProMini board
Wiggle everything looking for any loose connection
Random incantation from Book of the Dead
I would sincerely appreciate any thoughts on what my problem might be, or tests that may be useful here. Thanks!
First, confirm it worked for years and many instances and now doesn't. The obvious things to make us fully aware of is anything and everything that has changed, code to power plug.
Then
realize you don't need to hook up anything but ground, TX and RX to a PC (through appropriate interface like TTL to USB dongle or TTL to RS2323 module) to be able to use serial for debugging.
Power the unit independently, hook up only those signals and use PuTTY or CoolTerm or your favorite serial terminal program.
Then you can use serial without changing the circumstances that seem to make it fail or work.
Correct, code has worked for years and in around 200 devices without change. It is possible that this specific ProMini clone is a change, given the supply chain disruptions over the last couple of years. I cannot guarantee that I have built this device on boards from this lot, although I have certainly built dozens of other things on boards from this lot without issue. This is a low-volume device for me, and I do not track board orders/shipments. No other components have changed.
Thank you for the tip on monitoring debug output via serial. I will try that this evening.
It is most unusual to me that using the reset button causes a change in operability, and I am particularly hoping that this rings a bell for someone. The reset is not user accessible.
To my knowledge I have not updated any libraries recently in this environment. I test in another environment first to avoid just the issue you speculate I think using the reset button presumably would not change this, were it the issue.
Thank you, Tom. This is a proprietary commercial product, and I cannot post the code. Unfortunately, they are built on demand and shipped, so no other unit is available.
Too late now but you really should create and maintain a reference instance of anything you sell and ship.
This would include a full backup portable version of the IDE and all libraries used to create the firmware, and obvsly schematics and other documentation at the version level being shipped.
I have multiple versions of the IDE and libraries kept as portable instances even for the many little things running code tirelessly around here just on a hobby basis.
Thank you, a7. I have dated backups of the production environment physically and in the cloud going back many years, and of course have schematics. But no room to store physical examples of everything I sell... and such a collection would cost an unreasonable amount.