PDA

View Full Version : Create/design a controller for me



wheelie34
- 28th December 2013, 15:57
Hi Guys

Firstly, if this is not the correct board please move this thread mods.

I am looking for someone in the UK who has good knowledge on stepper motors and wants the work, here's what I am looking for
A strong stepper motor, must be able to push 2kg linear by means of a rack/pinion geared type setup

Script witten to set max steps in each direction CW/CCW and speed min/max

PIC programming board that connects to pc, software to write and send script to PIC, what PIC will I need

A made up standalone board to control motor powered by mains elec, what main Volts will I need

An on/off toggle switch
1 pot to increment number of steps in each direction, connected to the board via wire approx 6 inches long
1 pot to set speed of steps, connected to the board via wire approx 6 inches long
1 locating micro switch

Here's what I expect it to do, plug in at the wall, switch on with toggle switch

The first thing it must do is run in one direction up to the micro switch then return itself X steps back so it knows its in the middle of the rack, it may have previousley stopped anywhere along the track so need to know where the middle of the track is.

After that it should just run continually until switched off, any changes/adjustments will be done by the potentiometers.

I have a good understanding of BASIC programming, I use Autoit a lot, I can write php/mysql but have never fiddled in electronics so am looking for a reliable person who doesn't want to retire on my money.

Thanks for looking.

wheelie34
- 17th January 2014, 11:30
Ok, looks like everyone is busy with their own work, would anyone be able/willing to offer advice? here on the forum?

I have found a programmer board which connect to the PC via USB ay "Quality Kits" not sure about posting links so wont - QualityKits Part #: FA1120

What FREE software should I use to program/communicate with the above.

I found Oshonsoft on the web, any good?

I also found a controller kit, "Linistepper V2", will I be able to add to that board?

I will need to add, 2 potentiometers and atleast 1 micro switch, possibly 2

Any advice/wisdom will be much appreciated, thanks again for looking.

Last question for now, which stepper motor has the most power, Bipolar OR Unipolar?

HenrikOlsson
- 17th January 2014, 12:54
Hi,

Since this forum is primarily meant for discussing the PBP compiler from Melabs I'm obviously going to suggest that.

The board you link to is a device programmer which is used to get your compiled program into the PIC. You will not use that same board in your actual project.
For a device programmer, personally I'd buy a PICKit3 instead - it costs slightly more (or buy a clone on EBAY) but it is the current low cost device programmer from Microchip and it is supported, ie when new devices becomes available they add support for it in the PICKit3. It looks like the programmer you link to uses the PICKit2 interface which is no longer supported.

As for your application, all you've said is that the motor needs to push 2kg along a rack, using a pinion. That can be done with pretty much any motor, it's just a matter of gearing it properly. In order to properly design a thing a like that you need to specify how fast it needs to move, how fast it needs to accelerate and what the desired resolution is. Is the rack always level or can/will it be positioned at an angle? That makes a big difference. Step motors are not famous for being quiet, is that of concern?

The first step is selecting an appropriate motor, only when you have decided on a motor can suitable drive be selected.

Today driving the motors in bipolar mode is by far the most common way to do it.

With more details I could probably design, engineer and build a unit for you but I'm not in the UK.

/Henrik.

wheelie34
- 17th January 2014, 14:46
Hi Henrik

Many thanks for taking the time to reply so thoroughly, your input is valuable.

The rack will be on an angle, about 20 degrees which means the down stroke is ok but the back stroke will be pulling uphill slightly. The gearing of the rack and pinion has not yet been thought of as I have no idea of motor strength yet.

Speed: 30 to 100 back/forth movements per minute
Stroke: anything from 1 to 4 inches
Power: max 2kg. BUT if the rack slips and the motor loses its place I want the microswitch in place so it makes contact to tell the motor it slipped, hope that makes sense.

Speed and stroke will be independantly controlled via potentiometers, unless you know a better way.

Which PICKit3 version do I need? PG164130 or DV164131

If you need anymore answers please let me know.

Demon
- 17th January 2014, 14:52
There's also the matter of environment; is it dusty, outside, extreme temperatures, just to name a few.

Have you tried DIY CNC forums?

There's already lots of hardware available that does what you need. Reinventing the wheel might not be the cheapest solution for you.

I have had a weakness for Gecko drives ever since I started researching DIY CNC: https://www.geckodrive.com. It's been nearly 10 years since I discovered them and I remember the developper being actively in touch with his customers. The emphasis was on quality and reliability, not bells and whistles.

If I had money, I'd buy Gecko kits for commercial use. But I'm broke, so I plan on building my own, over the next 50 years. :D

Robert


EDIT: There's tons of recommended reading on that site. I'd start with this just to get an idea:
http://www.geckodrive.com/support/choosing-a-drive.html

Demon
- 17th January 2014, 15:15
This is where I learned a lot about stepper motors and drivers:
http://groups.yahoo.com/neo/groups/mach1mach2cnc/info

I can think of 2 ways to be certain where the "head" attached to the main shaft is located.

1. There are optical readers that attach to the back end of stepper motors (that's why the shaft comes out both ends on some steppers). Signals from these encoders tell you exactly how much the motor has moved.

2. For short main shafts, there are optical strips that can be run along the main shaft. An optical sensor riding along this strip tells you exactly how far the head has moved (I saw this in a inkjet printer).

For both systems, take a reading at far left and far right, center is mid-way. :) There are probably dozens of ways to do what you want.

It's all a matter of knowing your needs. I wanted to do a DIY CNC with 0.001" accuracy for work on PCBs, accuracy is everything. It you're moving Coke cans, a center switch is good enough.



Note: measuring motor movement is less precise, there can be some play in the attachment under the head. Measuring actual head movement is the ideal method, but the mechanism may be unreliable in extremely dusty environments.


Also, if you want to return to exact center every time, a center switch will not give a true reading. If the head is moving left, it will stop a fraction of an inch to the left of the switch, and vice versa moving right.

Robert

(don't you hate typing a long post at the same time as someone else) :D

Demon
- 17th January 2014, 15:55
I suggest you download this before it is no longer available:
ftp://machsupport.com/Mach/Mach2R6.11N.exe

It is demo CNC software (1000 lines of code max), current versions are now Mach 3 and 4:
http://www.machsupport.com/software/mach3/

Without a license, Mach3 will operate in Demo mode. While in Demo mode, the software has the following limitations:
•Mill & Plasma: 500 line gcode limit (10,000,000 limit after licensing)
•Turn: 50 line gcode limit (10,000,000 limit after licensing)
•Kernel Frequency locked at 25kHz (only applicable if using the parallel port driver)
•Set Next Line function disabled
•Run From Here function disabled
•Turn: Threading disabled
•Plasma: THC functions disabled

Mach software can support multiple axis, you only have to use one and ignore the others.

You will be able to move the head along your axis as you want it. You can make your own G-code scripts that will control the head.
http://en.wikipedia.org/wiki/G-code

Your requirements will be relatively simple for what the software and hardware can do. You will move along a single axis, ie: G1 500,0 moves 500 units left, G1 -500,0 moves right. Read Mach 2 help files for exact syntax.

Simply put:
- edit your G-code file.
- run Mach 2 software on PC using G-code.
- Gecko drives connect to PC using parallel cables.
- Mach 2 uses G-code file to tell the Geck drives what to do.
- the Gecko drives moves the head along the main shaft using limit switches.
- Mach 2 has manual override to move drives.

If the head has complicated movement, you can replace the Mach 2 software with your own PC interface.

Robert

wheelie34
- 17th January 2014, 16:12
Thanks for the input Robert

As you put it, I am moving coke cans, indoors at normal temperatures.

No need for accuracy, I understand about the optical sensor, all I need to know is the pinion will not try to run off the end of the track, either end, after a hiccup, if that happens it just needs to get the signal from the switch, exit the current loop, "find centre" then revert back to whatever the pots are telling it, it will never be left alone, the user/operator will always be present as the items its pushing/pulling will vary.

HenrikOlsson
- 17th January 2014, 20:14
Hi,

Which PICKit3 version do I need? PG164130 or DV164131
What you NEED is the PG164130, that is the actual programmer/debugger itself. The DV164131 also includes a little development board which may or may not be useful.

100 iterations per minute, each 2*4 inches long (max) is 800 inches per minute average velocity, the peak velocity will need to be much higher since you need account for acceleration/decceleration - This might not be THAT easy.... Using a pinion with a 2" effective circumference means the motor must turn 400rpm to reach 800ipm (again faster than that in reallity) but there's only two revolutions of travel so the acceleration must be sort of insane.... Using a smaller pinion means the motor needs to trun even faster (bad), reduces torque requirement (good), have less load carrying capabillity (bad, but can be adressed by using a wider pinion) but at one point you still need to fit to a shaft so it can't be made THAT small.
.
I have a feeling this requires some pretty serious motor/drive combination, a stepmotor may not be the best. I'd probably look at a ballscrew driven linear stage with a high pitch screw, something like 10-20mm (or 1/2" - 1") driven by a servomotor. Plenty available on EBAY.

/Henrik.

BTW, using encoders on stepmotors is very uncommon as it kind of defeats the simplicity of an open loop stepmotor. There ARE closed loop systems available but then the motor/drive behaves more like a servosystem than a stepmotor system. You read on DIY CNC lists and forums that step motors are notorious for loosing steps but that only happends when you're operating them outside of their limits - ie you're asking more from the motor than it can deliver. Properly dimensioned and used it is as reliable and rugged as a servo system but each have their benefits and drawbacks.

Geckodrive used to be great, my G210's are 14 years old and still going. However, if I'm not misinformed the founder has cashed in and left the building and it's not what it used to be - or so I hear. Still great step motor drives though!