Arduino freezing issues related to motor driver

Hello. I am a beginner that discovered Arduino only last month when I was researching how to control my 12v DC water pump at various speeds depending on temperature. I have spent several hours each day learning and I have spent about $200 in components to make this happen. I have:

  • Arduino Uno Rev. 3 (Genuine)
  • 20A 10-60V motor controller (Amazon)(Modified on the 555 timer output to accept Arduino PWM)
  • 12V 1A hobby motor (just for testing)( 1A Schottky diode across the terminals)
  • 10K ohm NTC temp. sensor (-40C - 150C) -12V simple ON/OFF switch -DROK DC-DC voltage convertor stabilizer (Amazon)
  • Oled 32 x 128 I2C led screen

I have wired everything on a breadboard on the bench for testing. I have written the sketch by reading and modifying pre existing codes and adding parts through my own learning. Everything runs well for hours on end as long as the motor controller is not powered and the motor is not running. However once I power the motor controller and allow the motor to run through PWM it runs and does control the motor speed depending on temperature. However, randomly the system locks up the screen will stop reporting and just stays on. The serial monitor stops reporting. The motor will keep running regardless of temperature and the only way is to unplug the power and restart. The motor controller is powered directly from a 12v DC battery and is connected to the motor. The Arduino is powered through the Buck convertor which is powered by the same 12V DC battery and supplies a regulated 9V to the Arduino. I can post my wiring diagram and my Arduino sketch if needed. I need help making this system reliable. I would appreciate any help or directions to achieve my goal. I thank everyone who reads my post and apologize if I have made any rookie mistakes in my posting.

@intercooler

Your topic was Moved to it's current location / section as it is more suitable.

Could you also take a few moments to Learn How To Use The Forum.

Other general help and troubleshooting advice can be found here. It will help you get the best out of the forum in the future.

Please provide links to your actual components (e.g. a search on DROK DC-DC converter finds over 80 entries) and also the wiring diagram and your code. We need something to comment on.

One thing, it would be much better to use a 5V DC-DC converter direct to the Arduino 5V pin. That avoids the feeble internal regulator on the Uno.

Steve

slipstick: Please provide links to your actual components (e.g. a search on DROK DC-DC converter finds over 80 entries) and also the wiring diagram and your code. We need something to comment on.

One thing, it would be much better to use a 5V DC-DC converter direct to the Arduino 5V pin. That avoids the feeble internal regulator on the Uno.

Steve

Hi Steve, Thank you for replying to my post. I appreciate you taking time to help me. The problem is not with the DC-DC convertor or the code. The Arduino runs day and night without any trouble when not connected to the motor controller. Once the motor controller is powered and the motor is actually running, the Arduino freezes. There are only two wires that connect the Arduino to the motor controller. The PWM wire from pin 5 to the motor controller and the Ground wire next to pin 13 that goes to the motor controller. I believe there is fly back or noise coming back to the Arduino or too much voltage and current is being sucked from the Arduino by the motor controller. Could you please advise me on how to prevent fly back from the motor controller to the Arduino and/or prevent the motor controller from sucking to much voltage and current from the Arduino. (e.g. some diode or resistor etc. on the PWM and the ground wires that connect the Arduino to the motor controller. Here is the link to the motor controller that I am using. https://www.amazon.ca/gp/product/B088CXQBHR/ref=ppx_yo_dt_b_asin_title_o07_s00?ie=UTF8&psc=1 I have modified this motor controller by cutting the output of it's 555 timer chip and have injected the Arduino's PWM signal to control this motor driver. I apologize for the long response but I wanted to be accurate and specific

The only indication that the controller works on a PWM signal is the 25Khz control frequency specification. If you’ve replaced that with the 490Hz PWM frequency from the Arduino then it’s not a shock if it doesn’t work too well. But what exactly goes wrong and how is anyone’s guess.

Steve

@intercooler

A schematic at this point would be great even if hand drawn. Also if you put the pot back in circuit rather than the ARduino what voltages do you get across the pot itself ?

Could you also take a few moments to Learn How To Use The Forum.

Other general help and troubleshooting advice can be found here. It will help you get the best out of the forum in the future.