Chip Programming robot - some servo questions!

stocky6409

Senior Member
ok - while i wait for my ebay servos to turn up i have a couple of queries regarding SERVO use.

What i'm building is an automated programmer for chips - initially a special purpose chip for which i have already written a vb.net app to program single chips with - but I'm keen to expand it later to do PICAXE chips once i get the 'bot working!.

I have a LOT of chips to program and have really got other things to do as well - so this looked a good idea...time will tell!

Platform is a hacked inkjet printer - just using the head transport bascially to which i am attaching a short throw "z" axis slide controlled by a servo arm.

A number of other servo's and motors run the rest of the feeder and programming socket locks.

My inspiration came from this:

http://www.youtube.com/watch?v=VR2xQlWpDxo&feature=PlayList&p=BF859C810D7DC4CA&playnext=1&playnext_from=PL&index=9

Anyway - my servo queries!

From reading the manual is it correct to assume once a servo is initialised (SERVO command) it STAYS in the set position until moved with SERVOPOS?

Is is correct that I can run up to 8 servos of a 28x1 - each in different positions?

Bacially i need to sequence a number of mechanical movements to get this thing to work!

Even playing with old "vibe" motors from mobile phones for my "vibratory feeder" tube.

I'll post pics as this comes together...

Cheers

Stocky
 

BeanieBots

Moderator
Yes & Yes.

Once activated by the use of "servo", the servo will hold position until either a low on that pin is issued or a power/reset cycle is initiated.

A 28X1 can control 8 servos simultaniously all at different positions either active or idle.

PLEASE make your automated programmer faster than the one in that video!
 

stocky6409

Senior Member
oh yes - speed is planned to be MUCH faster!!!!

Transit speed from supply to socket & socket to out tray is more like inkjet printehead speed. I'm using the standard belt driven head carriage and stepper drive - just count steps to move it the desired distance as fast as it can move it!

BUT - at the end of the day the idea is for it just to be automated - set it going and go do other stuff!

Stocky
 

hippy

Ex-Staff (retired)
From reading the manual is it correct to assume once a servo is initialised (SERVO command) it STAYS in the set position until moved with SERVOPOS?
Yes, it stays where it was set to until a further SERVO or SERVOPOS command.

The caveat is that the background servo timing loops continues uninterrupted. If you wait for serial input, infra-red input etc, those things may cause jitter or floppiness of the servo. Basically, whenever the PICAXE has to do anything which requires specific timing, it locks the background servo loop out until later, so time between pulses may vary, and length of pulse may occasionally vary.

For many servos it appears to be the length of pulse is more critical than the refresh rate in reducing jitter. If there are unavoidable conflicts it may be possible to code a loop which can have slightly variable timing and use PULSOUT to generate the pulses per servo.

Is is correct that I can run up to 8 servos of a 28x1 - each in different positions?
Yes.

On a 28X2 you could potentially control 20 servos by using PULSOUT if the servos can tolerate an extended timing loop.
 

stocky6409

Senior Member
Thanks Guys
Hippy - no i'm not using any serial input or anything like that - the programmer runs from the LPT port so I'll just be checking/setting pins on the port or checking opto-interruptors between functions - very "PLC" like in operation.

Sounds like it *should* work - hurry up servos!
 

BeanieBots

Moderator
Sounds like a fun project.
Look forward to seeing the finished article.
Don't forget, we're here if you get stuck and we'd also like to learn from your experiences.
 

stocky6409

Senior Member
SHHHH! Andrew - dont give away my ideas :p

my in & out trays will work differently to his - to avoid the need for the wrist

Stocky
 

stocky6409

Senior Member
Spent some time testing the carriage stepper today - with a TA8435 stepper driver module and EMC2 software I can achieve nearly 500mm/s speed before it starts to loose steps - i think that *should* be faster that the video LOL!

Got it running off 12v no probs (8ohm coils) - FYI its an Epson EM257 - and has a fixed 4 wire ribbon cable. Coils (starting from red wire) are A+ B+ A- B-

Thinking about how to drive the stepper from the PICAXE - i could cheat and use a single channel TA8435 module and just drive the step & dir pins from the picaxe - not sure how I'd go generating the fast pulse rate though - something new to try.

I'll be using 3 photointerruptors to set positions - so my plan is to use setint to monitor the NEXT photointerruptor then set the pulse stream for the stepper and stop when the beam is broken. Or i guess i could just use fixed number of pulses and count the steps that way.

Or i guess you could use a pin on picaxe to trigger a 555 and then reset when beam is triggered - lots of ideas

Just how fast a pulse stream could I generate with a for-next loop do you think (28x1)??
or is there a better way to create a repeatable number of pulses??

Stepper is 200 step per rev = approx 45mm of travel (.225mm per step). Step counting could work and would allow relatively fine positioning even at full steps.
 
Last edited:

hippy

Ex-Staff (retired)
i guess i could just use fixed number of pulses and count the steps that way.

That is the general advantage to a stepper motor over non-stepped motors :)

FOR-NEXT loop may not be the fastest way to churn out steps, DO-LOOP with a decrementing number of steps until it hist zero could be quicker ...

w0 = number of steps
Do
make a step
w0 = w0 -1
Loop Until w0 = 0

It's going to be a case of try and see, but shouldn't be too difficult to do that.

For getting precise numbers of pulse out, PWM might work as BeanieBits suggests, but I'd consider using HSEROUT. Each HSEROUT can generate between 1 and 5 pulses per byte sent, and as it's not blocking it should be possible to send longer pulse trains without to much variation in the gaps between pulse lengths. A big advantage is that it's fairly easy to adjust the pulse rate as the baud rate, from extremely slow to very fast.

An example assuming active low idle, positive going pulses, untested ...

wo = number of steps
Do While w0 >= 20
HSerOut 0, ( %01010101, %01010101, %01010101, %01010101 )
w0 = w0 - 20
Loop
Do While w0 >= 5
HSerOut 0, ( %01010101 )
w0 = w0 - 5
Loop
Select Case w0
Case 1 : HSerOut 0, ( %11111111 )
Case 2 : HSerOut 0, ( %11111101 )
Case 3 : HSerOut 0, ( %11110101 )
Case 4 : HSerOut 0, ( %11010101 )
End Select

You might not need the 'w0 >= 20', just given as an example.
 

stocky6409

Senior Member
Ordred an "Easydriver v3" module to do the stepper duties - just needs DIR & STEP commands.
Handy as u can just solder on some 0.1" header pins and plug into a breadboard. :)

Should have that in a couple of days - they will have a play with some code.
 
Last edited:

stocky6409

Senior Member
Just reading the 20x2 "toggle" thread - there is another option i could use to generate the "step" pulse stream :)

45mm per rev (roughly)
one pulse per step - 200 per rev in "full step" - 200Hz
two pulse per step - 400 per rev in "1/2 step" - 400Hz
4 pulse per step - 800 per rev - 800hz
8 pulse per step - 1600 per rev - 1.6khz - nice and smooth.....

3.2Khz for 90mm sec
6.4khz for 180mm sec
12.8khz for 360mm sec - should be more than fast enough to beat the other video LOL

Eagerly await "easydriver" now to run some realworld tests..

:)
 
Last edited:

moxhamj

New Member
That is a totally crazy project, Stocky. I love it!!

The video showed a lead screw so that is why it is slow (but very accurate if driven by a stepper). The printer mechanism should be a lot faster.

BTW I worked on a hospital board a few years back with a chap who makes this sort of stuff for a living. A food supplier might come to him and ask them to build a robot that can wrap up a block of cheese and put it in a box. Lots of servos, pneumatics etc. A cheese wrapping machine is worth about a million dollars.
 

stocky6409

Senior Member
Hi doc - crazy - yes - totally....oh you where talking about the robot sorry :p

Even with a belt and 1/8 steps i can acheive a repeatable postional accuracy of better than +/- 0.05mm so shouldnt have to much problem dropping a chip into a ZIF socket!

Just have to work out how to buy some servo linkages - need to get to a hobby shop but the closest if over 150km away :-(

Sussing out my vac pickup head now - love to know what the little "cups" where in the video and where to get them - might be a bit hard to find up here in the "sticks"

Two items i'm chasing and looking for ideas on where to buy at low cost
1) some type of vacumm source - prefer NOT a compressed air driven one as i dont have a big enough compressor
2) 3 way pneumatic solenoid with 12v coil - to switch/dump vacuum

Currently hunting ebay for phone vibe motors for feeder vibe....wish me luck!

Once this project is finished the next it to complete my HP Plotter hacked into a solder dot machine....and maybe crude Pick and Place.

All this is to go with my ultimate ebay purchase - 8' 5 zone IR Reflow Oven in full working order for under $200....anyone need some boards made? LOL
 
Last edited:

moxhamj

New Member
Yes, that would be the reflow oven that looks like it weighs over half a tonne?

Pick and place? x/y/z plotter? I guess lots of homebrew examples out there.

Vacuum pumps (eg refrigeration) are about the $100 mark. Hmm, can't you get an apprentice or student or someone and pay them to mindlessly program the chips??

3 way solenoids? Pneumatic solenoids come up on ebay from time to time. I got some nice on/off ones from the US a few years back and a couple of those will do 3 way.
 

stocky6409

Senior Member
BTW oven was 680kg.......
cheers for heads up on fridge mechanic pumps - will look for them and valves a bit more.

And wheres the challenge in paying someone to program the chips - come on Doc - I though i knew you better!!!!! :p
 
Last edited:

moxhamj

New Member
Yes, I know. I'm the guy working on a system to reprogram a wireless mesh with a custom bittorrent system in CP/M.

A search on the US ebay for "pneumatic solenoid" comes up with lots of hits, including multiple solenoids with a common manifold.

Coming from a medical background, I've sometimes pondered attaching a solenoid directly onto the 3 way taps used for IV fluids. They look like this http://www.qosina.com/catalog/part.asp?partno=99165 or http://www.sai-infusion.com/Infusion-Accessories/Stopcocks/3-Way-w/Luer-Lock/3-Way-Stopcock-with-Luer-Lock.html $1.80 each and all the plastic pipes etc are standard luer lock. (The plastic pipe is sold at hardware shops too).

Crazy musings though. How many of these chips need to be programmed?
 
Last edited:

stocky6409

Senior Member
In terms of numbers maybe 10 - 20 each time
Whilst thats NOT a lot - it does mean I can get on with other things.
I have the PC software working to do SINGLE chips - so it was just a thought that with a little extra code and bit of engineering I could automate the process :)

Whilst the programmer is initially for a specific special purpose chip - with a change of the "target" pcb and some revised code I'm hoping to be able to integrate the rev-ed compilers into the VB .Net code as well to allow me to batch program PICAXE chips too :)

Also an excellent learning expereince - i DONT learn well from tutorials - i learn much better making something useful to me!
 

Wrenow

Senior Member
Hi doc - crazy - yes - totally....oh you where talking about the robot sorry :p

Even with a belt and 1/8 steps i can acheive a repeatable postional accuracy of better than +/- 0.05mm so shouldnt have to much problem dropping a chip into a ZIF socket!

Just have to work out how to buy some servo linkages - need to get to a hobby shop but the closest if over 150km away :-(

Sussing out my vac pickup head now - love to know what the little "cups" where in the video and where to get them - might be a bit hard to find up here in the "sticks"

Two items i'm chasing and looking for ideas on where to buy at low cost
1) some type of vacumm source - prefer NOT a compressed air driven one as i dont have a big enough compressor
2) 3 way pneumatic solenoid with 12v coil - to switch/dump vacuum

Currently hunting ebay for phone vibe motors for feeder vibe....wish me luck!

Once this project is finished the next it to complete my HP Plotter hacked into a solder dot machine....and maybe crude Pick and Place.

All this is to go with my ultimate ebay purchase - 8' 5 zone IR Reflow Oven in full working order for under $200....anyone need some boards made? LOL
For the pneumatic solenoids, Clippard makes them in 12v (and 6v). If you are in Oz, the guys in the AUSBG (Australian Battle Group), which might have members relatively near you, could probably lead you to local sources for pneumatic valves, fittings, etc. as well as servo linkage bits. We use both in R/C Model Warship Combat. If you are somewhere else, just let me know, and I will see if I have a better source for you.

Cheers,

Wreno
http://ntxbg.org
 

BeanieBots

Moderator
For small vacuum pumps, consider the air pumps used to pump air in aquariums. Not all make the inlet available but the ones which do can be used to generate a vacuum.

For the seal, I've used small cable glands for a very similar application to yours.
 

moxhamj

New Member
Ah, good point BB. Thinking about aquarium pumps, all the ones I've seen don't have the input available. But if you put the entire pump in a sealed box, then put a port somewhere on that box, that port will have a vacuum.

Thinking of aquariums, there are little suckers that attach things inside aquariums - I wonder if they go small enough to be repurposed as a sucker for a DIP chip?

Thinking about Wrenow's comment, I seem to recall the model plane people use pnuematics, eg for landing gear. So those sort of valves/actuators may be available from hobby shops?
 

stocky6409

Senior Member
ok - yes they make nice little valves you can control with a servo "but you will need to come and have a look" - handy when you are 150km away! GRRRR!

/RANT
 

Wrenow

Senior Member
Again, Stocky, where be thee located? A lot easier to point you to a mail-order/online/local source that is convenient if we know yorie whereabouts. Again, if you are in OZ, the AUSBG guys have probably found the best sources there. http://www.clippard.com/ has an online catalogue, if that helps.

Cheers,

Wreno
 

stocky6409

Senior Member
ok - got some servos attached and functioning

Tried a for/next loop for stepper drive - 333hz MAX! - too slow!
Tried PWM - not enough steps so have to run multiple times in a loop - meh - possible

Then thought of SOUND command - note 127 gives me 10khz @ 4Mhz PERFECT!
Stepping through a number of "notes" could give me ramp up as well :)
Will use interrupt to stop head in correct position (photo-interruptor)

Awaiting arrival of driver board!!
 

moxhamj

New Member
SOUND? How cunning. So you have a tube of chips and the servo on the ZIF socket sings "I'm hungry, send me a chip" LOL
 
Top