Pages: [1] 2   Go Down
Author Topic: Servo control from software  (Read 1212 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 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.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 551
Posts: 46204
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 551
Posts: 46204
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: January 22, 2013, 01:50:07 pm by Bruceb » Logged

UK
Offline Offline
Shannon Member
****
Karma: 184
Posts: 11195
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

UK
Offline Offline
Shannon Member
****
Karma: 184
Posts: 11195
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 551
Posts: 46204
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

UK
Offline Offline
Shannon Member
****
Karma: 184
Posts: 11195
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

UK
Offline Offline
Shannon Member
****
Karma: 184
Posts: 11195
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I can read the commands as I send them with the serial monitor. just don't know how to tie it all together.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Pages: [1] 2   Go Up
Jump to: