Hello. I have a brushless dc motor running from a driver and 24v battery that is controlled by pwm from my arduino. From the same battery i have a push pull solenoid, activated by a limit switch but not wired into arduino. The limit switch is on the ground side.
The problem I'm having is when the limit switch is pressed the motor speeds up. How do I stop this from happening.
Hello. I have a brushless dc motor running from a driver and 24v battery that is controlled by pwm from my arduino. From the same battery i have a push pull solenoid, activated by a limit switch but not wired into arduino. The limit switch is on the ground side.
The problem I'm having is when the limit switch is pressed the motor speeds up. How do I stop this from happening.
Without providing complete details of your hardware and how everything is wired up its not really
possible to say. Also you should measure the battery voltage with the solenoid on and off and see if
its changing. Normally it would be expected if the solenoid was taking too much current for the battery
the voltage would drop and the motor would slow down, not speed up, so please give a lot more detail
of the setup.
Here is the diagram of the motor and driver. I don't have alarm, break or speed connected. The AVI is connected to arduino pwm pin. Arduino is powered by 9v battery. Motor is powered by a 6Ah 25.8v lithium iron battery. The positive terminal is connected to the positive on solenoid. The negative from the battery is connected to the common on limit switch, the N/O is connected to the negative on the solenoid.
How much current is the solenoid drawing? I'd bet it's pulling the driver supply voltage down and making the PWM look relatively higher, so the motor speeds up.
EDIT: You DO have the driver ground connected to Arduino GND?
I would guess the collapsing magnetic field on the solenoid is reeking havoc, but that would be a fairly short pulse. Yes, it might spin a motor a little faster for a blip, but the more important thing is what that pulse is doing to the chips.
Yes, a flyback diode would mitigate those spikes. You never said how big this solenoid is. The bigger, the bigger the spike.