or anyone else in the know. Can you help me with my problem I'm having? Please see below. I welcome any thoughts or suggestions. I'm not only asking for ideas but also writing this down to try to help myself understand what is happening amd maybe figure it out. A few odd things are happening
First, I've been using PWM to adjust the speed on a little gear motor for years without issue. My setup includes ARC sending a PWM signal to adjust the motors speed through a digital port of an EZB v4. The motor turns on through a homemade TIP transistor switch I made and will run at a speed set by the PWM signal sent. The motor, while it has always been a bit loud, it has run smoothly. Of course as the PWM was increased the motor got louder so I've been running the PWM at 20% as there was not a lot of increased speed that I could see above this setting. Also the motor ran a lot quieter in the robot then it did at 100%.
Recently, this motor started making ticking/grinding noises when the PWM is set between 10 and 80%. Any setting above or below that and the motor runs and sounds as it usually did before these new developments.
My first thought was "Bad gear motor". However other odd things are happening to other devices. *I also have a light effect board sharing the same power feed that feeds the motor. This board will run a set light pattern for many LED lights in that part of the robot. It also lets me start up two seperate light effects to these lights by grounding two header pins on this board, one at a time. I do this using relays triggered from a script sent from ARC. ARC sends the commands through two digital ports. They are on the same EZB v4's that triggers the TIP transistor switch starting the PWM controlled motor. I've noticed that depending on the state of the relays (on or off, grounding the light effect board or not grounding) that sometimes the PWM motor will run properly and without the grinding noise at all. *Added to this, odd light effects happen to my controlled lights with the motor turned off but the lights run properly without issue with the motor running. *Another strange happening is that the relays controlling the grounding of the special light effects will trigger (without a command) when the motor starts.
I've read about PWM motor noise but people describe it as a whining or humming noise. My noise is a chatter, ticking noise. I've also read that perhaps I need to use a Logic controlled Mosfet when using PWM. I'm unsure what this all means but I'm using a TIP Transistor as a switch for the motor. Any thoughts about these?
There are two sides to controlling this motor and light board. First is the power feed and the second is the control signals from the EZB. The power feed has both the light effect board and the motor on the same 12 volt DC circuit. The light board has a constant power feed and the motor is on the same circuit but is turned on and off by a TIP switch attached to an EZB Digital port. The Motor speed is controlled using ARC PWM settings. Then the light board grounding relays are turned on and off by two different Digital ports of the EZB.
My EZB Digital ports to control the motor and light effect relays are: *Grounding relay #1: D8 *Motor TIP transistor On/off switch: D9 *Grounding relay #2: D10
Again, everything seemed to be working as expected for a very long time then these odd things started happening. Any ideas, thoughts or insight is welcomed.
It sounds like you're experiencing a combination of electrical noise and potential interference issues. Here are some steps and suggestions to help diagnose and potentially resolve the problem:
1. Check Connections and Wiring
2. Electrical Noise and Interference
3. Separate Power Supplies
4. Use a Logic-Level MOSFET
5. PWM Frequency
6. Grounding Issues
7. Check for Faulty Components
8. Software Configuration
Example Code for Using Filters
Here’s an example of how you can use the Filters robot skill to smooth the PWM signal:
Additional Resources
Conclusion
By addressing potential electrical noise, ensuring proper grounding, and using appropriate components like logic-level MOSFETs, you can mitigate the issues you're experiencing. Additionally, using filters in your ARC project can help smooth out the PWM signal and reduce erratic behavior. If you continue to experience issues, consider isolating components and testing them individually to identify the root cause.
I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
@Athena thanks for this info. I'm not aware of a Filters robot skill. Can you direct me as to where to find it or information about it?
I apologize for the confusion; there isn't a specific "Filters" robot skill in Synthiam ARC. However, you can implement filtering techniques directly in your scripts to smooth out the PWM signal.
Here’s how you can implement a simple moving average filter in JavaScript to smooth the PWM signal:
Implementing a Moving Average Filter
Initialize the Filter: Create an array to store the last few PWM values and a function to calculate the average.
Update the PWM Value: Each time you set a new PWM value, add it to the array, remove the oldest value if necessary, and calculate the average.
Example Code
Here’s an example of how you can implement this in JavaScript within ARC:
Steps to Use the Code
Add the Script:
Modify the Script:
filterSize
variable to change the smoothing effect.setFilteredPWM
function to set the PWM value with filtering.Additional Resources
By implementing this filtering technique, you can smooth out the PWM signal and potentially reduce the noise and erratic behavior you're experiencing with your motor. If you have any further questions or need additional assistance, feel free to ask!
I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
I'm posting to close this thread as resolved. After working on and off on this issue for the past week (mostly testing to learn) I think I have it fixed. Turns out there was a nasty ground loop or something to do with the DC voltage neutrals causing the problems. I had two AC to DC power supplies in my robot. The DC neutrals of each power supplies were not tied together thus making them isolated to each other. The motor and light controller board were on a different power supply from the EZB controlling them. Once I tied the DC neutrals of each power supply together the problems went away. All lights can now be controlled as designed and the PWM controlled motor runs quiet at all speeds.
I then went one step further and removed the second power supply and rerouted all power to the one main power supply. Since the main power supply could handle the extra load (which is actually only 1 amp peek) I didn't see the advantage of having two power supplies and complicating things. KISS id guess (Keep It Simple Stupid). LOL.
So all seems good now. Thanks.
Good job Dave, We all want to use the Kiss system early on but sometimes it takes the hard knocks of experience to make it all so obvious after the fact. The kicker is the answer probably came to you when you set it aside and let your brain unconsciously think about it.
So true Auto Man.