0
\$\begingroup\$

I'm trying to build what amounts to a single-axis CNC machine running off a 12v automotive type electrical system. Here's a basic description of the build:

  • Arduino Uno
  • Just for testing, I'm using a 12v dc 30A regulated switching power supply connected to 110v ac.
  • Also just for testing, I'm using a 426 oz-in Nema 24 stepper. Actual stepper will be larger. This one is 2.8A wired in parallel.
  • 600w boost converter to increase 12v to 36v for input into motor driver.
  • 9v power supply module between 12v supply and Arduino.
  • Geckodrive G201x motor driver set at 3A.

The machine works fine when powering my Arduino with a separate source from the stepper motor. But it appears to brownout when all connected to the same power supply. Unfortunately, I only have a single source of power.

I originally thought I was getting some kind of voltage spike. The automotive system could produce this (and I was testing on that system at the time). So that's why I thought to put the 9v module there. I think I need it regardless, but it doesn't seem to have fixed this problem.

Then I was given a suggestion to opto-isolate the motor. As best I could tell, I needed to put the opto-isolator between the Arduino and the driver. I put one between the step/dir and the appropriate pins on the Arduino and powered the isolator with a 5v power supply. That's not working either.

If I disconnect the motor, but leave the 600w supply and motor driver hooked up, I don't see the brownouts. My gut is telling me that the stepper motor is pulling too much power and causing a brownout. As I understand it, I could put a diode and capacitor between the Arduino and the power supply. But isn't my power supply powerful enough to not need this? It should be using roughly 100w of power correct? As I understand it, the motor may use more than this when starting up, but would it really use that much more?

Edit:

I attempted to use the 47uF and .1uF capacitor schematic here between my 9v supply and the Arduino. Didn't seem to help. I put my multimeter on the inputs into the Arduino and played around with the system until it did some crazy stuff (It will usually garble the output to an lcd screen I have connected). I did not notice any changes in voltage, although I suppose it could be just a short spike that the meter didn't catch.

I think it would help if I drew a schematic of the system. Maybe then someone can point out something?

Edit: Here's a schematic. Sorry for the poor quality. Hopefully it's readable. I tried to include everything in my project, but I assume the buttons, toggle switch, rotary encoder, and lcd are not the cause.Schematic

\$\endgroup\$
  • 2
    \$\begingroup\$ Can you confirm that it's actually a brown-out with an oscilloscope, or even a fast multimeter? If this is a brownout situation, you should be able to observe the 9V output voltage droop. Also, what sort of supply is your 9V module - is it a linear or switching type regulator? \$\endgroup\$ – Ryan Apr 9 '14 at 15:46
  • \$\begingroup\$ I do have access to an oscilloscope, so I will try that. Here is a link to the power supply I'm using for the Arduino. \$\endgroup\$ – Dan Apr 9 '14 at 16:28
  • \$\begingroup\$ A schematic would definitely help. Note btw that the Geckodrive inputs are already optically isolated (according to the manual here: geckodrive.com/g201x-g210x-rev-6). The drive shouldn't pull more than 2.5mA from the arduino - do you have a resistor between the Arduino pin and the gecko input? Not sure how much current the gecko would pull without it. Generally the opto-isolators use an infrared led, so you should wire the Arduino just like you are driving an LED and limit the current on the output pin. \$\endgroup\$ – RJR Apr 14 '14 at 1:24
  • \$\begingroup\$ I had a feeling that it was already opto-isolated, but was working off a suggestion by someone else. No resistor. The opto-isolator I put in there doesn't seem to be working and maybe that's why? Regardless, it's still not keeping my arduino from freezing. Schematic is coming soon... \$\endgroup\$ – Dan Apr 14 '14 at 1:31
  • \$\begingroup\$ The 12V drops too much, which drops the 9V line too much, which turns off the 5V regulator on the arduino, causing a brownout. There is something called 'load and line regulation' which is the ability for a power supply to keep the output the same under large changes to the load or the input 'line'. I reckon you have a domino effect happening. Lots of capacitance and a low forward voltage drop schottky diode which someone else has already suggested will help. By lots, I mean many hundreds of microfarads, maybe even millifarads \$\endgroup\$ – KyranF Apr 14 '14 at 1:56
2
\$\begingroup\$

There is a great deal of variability when looking at high speed changes in power draw. It isn't as easy as thinking about what might happen at DC. Some of the issues can be based on the length and size of conducting wires, as well as the configuration of power routing. This applies in both wiring and PCB routing of a power system.

It is possible common to have a power demand pulse quick enough that you have to think of power bus as a transmission line, rather than a lumped circuit element. The inductance of your power supply wire will resist current flow enough to drop the voltage a significant amount at the end of the transmission line. So in this situation, a diode and capacitor may solve the problem by keeping Arduino voltage high until the current can make it down the wire to fill the need.

It is a good idea to isolate the control and high power demand variation circuits. This doesn't have to be as much as a separate power supply, but could mean just not sharing long runs of power supply wiring, before T'ing off to each other.

\$\endgroup\$
  • \$\begingroup\$ I'll give the capacitor and diode a shot. Thanks for the suggestion. \$\endgroup\$ – Dan Apr 9 '14 at 16:34
  • \$\begingroup\$ +1 for running separate wires to the power supply for the motor and arduino. \$\endgroup\$ – jwygralak67 Apr 9 '14 at 20:32
0
\$\begingroup\$

Your mitigation will depend on the actual cause, which is likely to be one of the following:

  • Supply droop on the 12 as a result of the draw from the motor, causing your arduino supply to drop below an acceptable level
  • Spikes on the 12 due to flyback making it upstream from the motor driver, causing the cheapo 12->9 regulator output to misbehave
  • Spikes on the GND net (again as a result of motor flyback) causing one of the above problems

You should confirm the actual cause of your problem using an oscilloscope before implementing a solution.

Solutions you can try:

  • More input capacitance at your 12->9 converter (this may help if it's droop on the 12)
  • More input capacitance at your arduino (this may help if it's droop on the 12, or if the regulator is becoming unstable due to disturbance on the 12V input)
  • Use a TVS diode at the input of your regulator to suppress disturbances on the 12V
  • Switching the regulator out for one that provides isolation, or a linear regulator, which should respond better to disturbances at the input, provided that it is stable and has sufficient input/output capacitance.
\$\endgroup\$
  • \$\begingroup\$ According to the manual, the Gecko Driver inputs are optically isolated. As such, I don't see how anything on the motor-side of the driver could influence the arduino in the scenario where they are not sharing the same power supply, unless there's some capacitive/inductive/RF coupling. You might want to add some RF suppression on the motor side - geckodrive.com/rf-interference \$\endgroup\$ – RJR Apr 14 '14 at 1:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.