Hey everybody, I'm fairly new to this so please be patient with me. I have a Cnc hotwire machine (foamcutter) running on tj zoide software. I use it to make rc airplanes. I have a hobby Cnc 4 axis controller. I need help with electronically controlling the voltage for the wire heat. My software has a step/ direction signal for the heat circuit of some older Cnc controller boards with auto heat. My board does not have this feature. I have a seeed studio(v1) motor controller and a stepper motor and an audrino UNO, but have no idea how to make it work with only a step and direction signal. I need to be able to read the signal with the audrino and have it control a stepper or servo that will control a pot and a Lm317 regulator to regulate heat. I am currently using 12-18 v for the heat. I have a 24v power supply. Another option if anyone knows how would be a circuit to use the step/direction signal to control a pwm output of 12-20 v. Any guidance or help is greatly appreciated.
I have a seeed studio(v1) motor controller and a stepper motor and an audrino UNO, but have no idea how to make it work with only a step and direction signal.
The motor controller does.
I need to be able to read the signal with the audrino
Quote I have a seeed studio(v1) motor controller and a stepper motor and an audrino UNO, but have no idea how to make it work with only a step and direction signal. The motor controller does.
Quote I need to be able to read the signal with the audrino What signal?
The step/ direction signal from the Cnc software. It regulates heat(voltage) based on speed of stepper motors on the 4 axis machine. Faster it's cutting, the higher the heat( Vout) Where/how do I hook up the step/ direction signal wires from my Cnc software to the motor shield? I have a pad on my cnc controller for attaching wires for the signals from the software for heat control.I have 1 step and 1 direction signal. How do I make that work? What about the enable pins? The motor shield has two enable pins and two bridge a and two bridge b inputs. Can I split the two signal wires to make the four inputs needed? Would it be easier to control a servo with the step/dir signals from the software? Again, I'm very new to this and while a fast learner, I'm pretty dumb in the ways of programming and such . Ive tried the analog read function and i can use the serial monitor and see the analog signal that the software is creating. Just don't know what to do with it now. Thanks again
A link to the motor controller would be useful. It is not clear that it is a stepper motor controller. If it is, there should be step and dir pins.
http://www.seeedstudio.com/wiki/Motor_Shield_V1.0 http://www.tjzoide.com/wp-content/uploads/2010/12/TJZOIDE-Users-Manual-D15.pdf Link to motor shield and software users guide. Heat control settings are on page -78
Given that you no longer have 'auto' heat control you'll need to find some way to control it yourself.Presumably you'll need to keep the wire temperature within bounds under a variety of conditions such as cut depth and wire speed. Do you have a scheme in mind to achieve this?
What I am wanting to do is make my own auto heat control. The software gives step/dir signals for the heat control based on the speed of the stepper motors driving the machine. I am wanting to use these signals to control a servo or stepper motor that will turn a pot hooked to an adjustable voltage regulator to control the heat. I have a 24v 10a power supply going in and i am using 12-18v at 1.5-2.2a output from the regulator for the wire heat. I am using that setup now but I am the controller of the pot as the machine runs and I am not very accurate. Looking for a way to use a servo or stepper to control the pot. Or if anyone has a circuit that will do that electronically( electronic control of Vout vs using a pot) using the inputs I have that would be great too.
Bruceb: The software gives step/dir signals for the heat control based on the speed of the stepper motors driving the machine.
Do you mean the software has already worked out the heater power requirements and you just need a way to put those into effect? Or do you need to derive the heater power requirements somehow from the step/dir signals - and if so, how?
Software figures the requirements and will send step/ sir signal accordingly. Default settings are to turn a servo 180 degrees or a stepper 360 degrees. This is then coupled mechanically to the pot for adjustment. I can manually set the high and low settings and it plots the midpoints in a 7 point curve. I need to know how to use these signals to control a motor be it servo or stepper.
The wiki in the link shows how to connect the stepper, and how to drive it. You would connect the step and dir pins two unused digital pins, and poll them to see when to tell the stepper to step, and in which direction. Or, use an interrupt pin (2 or 3) for the step pin, if the steps happen quickly (unlikely) and you can’t afford to miss one.
Bruceb: Software figures the requirements and will send step/ sir signal accordingly. Default settings are to turn a servo 180 degrees or a stepper 360 degrees. This is then coupled mechanically to the pot for adjustment. I can manually set the high and low settings and it plots the midpoints in a 7 point curve. I need to know how to use these signals to control a motor be it servo or stepper.
I must admit I don't see how that would work - how does the software know the initial position of the control? What is the nature of the step/dir signal? If it has the option to output a position directly, that would seem to me a much better approach to take.
Once you have figured out how to get the step/dir or absolute position command to the Arduino, then controlling a stepper motor or servo to implement that command is very straight forward. The hardest part would be constructing and connecting the drive mechanism, and providing a suitable power supply for the stepper motor/servo.
It will be in the off position when machine is first turned on. when software is booted the default setting is wire heat off. Should be able to turn it on/ off with software. It returns to off at end of a cut for next cycle. Wire heat will be in off position when machine is turned off. It will always start/stop in the off position. I want the software to handle turning it on/off and the variable control. The drive mechanism is a piece of rubber hose as a coupling over shaft of motor and over shaft of pot. Power supply is not a problem. Using 5v from a hacked pc power supply
Sounds to me as if the only remaining question is whether you have got a way to get the step/dir commands in to the Arduino. Everything else seems feasible.
I can read the commands as I send them with the serial monitor. just don't know how to tie it all together.
How do I hook up inputs( what pins) to the motor shield I have? The motor shield has 6 inputs ( enable A,B, A,a B,b)for control and I have two outputs(step/dir) what am I missing?
If you're going to use that motor shield to control a stepper then you would need to program the Arduino to read the step/dir inputs and then translate to energizing the A/B coils in the proper order (probably using the Stepper library).
You'd be better off buying a stepper controller that takes step/dir inputs. Pololu.com sells a $10 driver that is good for up to 2A steppers or you can find drivers on eBay based on the TB6560 chip (up to 3.5A) for ~$15.
Awesome. Ordering a new board today. Thanks chagrin.
Of course you could just replace your current pot with a digital pot and control that from the arduino saving on the motor shield the stepper motor and all the rest.
PS digital pots are very cheap!.
Bruceb: How do I hook up inputs( what pins) to the motor shield I have? The motor shield has 6 inputs ( enable A,B, A,a B,b)for control and I have two outputs(step/dir) what am I missing?
Read the documentation for your motor drive shield and stepper motor, they will explain how to use them. You will probably find example sketches that demonstrate this too. This is the easy part. I'm not going to do it for you because you can read a data sheet just as easily as I can, and you're the one who wants to get it working.
I didn't ask you to do it for me, I asked for help explaining it so I can understand it. I've tried reading it, and tried many ways to make it work before I got on here and asked. even smoked my first arduino trying. I never asked can anyone do this for me. If you didn't want to help, then why even waste the time to post?