Shop OBEX P1 Docs P2 Docs Learn Events
New To The Forum — Parallax Forums

New To The Forum

kelvin jameskelvin james Posts: 531
edited 2004-11-02 07:31 in BASIC Stamp
Hello This is my first post here and i want want to commend all the pros and knowledgable posters here for helping us wannabies. My history is robotics schooling, mostly old stuff like PLC programming, CNC programming, old machine language and actual hands-on operation of industrial robots/cnc. My project i am working on is quite vast, considering i have never worked with a stamp or pbasic before. What i'm trying to do here is emulate a cnc/robotic style control of a stepper motor with the stamp. This is my hardware setup:
Bs24p
Memkey and 16 button keypad
SE serial lcd
12v 1.8 degree motor
Little step-u controller
128 quadrature optical encoder

Operation:
Basically setup to work as the same as "teach-mode" for robotics
The encoder is the manual control of the motor.
All positions, speeds and time of movement are saved to memory.
All data is used to run the motor in manual modes or auto modes.
Of course the lcd is to display the numerical status of the motor and keypad functions.

Well, i guess you can say this is fun, but i'm sure my hair is a few shades grayer now.
But it is pretty cool when you hit that "victory", that you thought would never come.
For anyone starting out here " READ THE MANUAL !!!" It will save you a ton of GRIEF.
Anyway, for the most part, it is pretty well complete, just about got all the slots maxed out on the 24p, and by the way, it can take a load of reprogramming. thousands +
I do find that sometimes it freezes part way uploading to the stamp, anyone else experience this?
I'm using 2.1 and xp, if i shut done 2.1 and open again, it is fine.

I am going through my testing now, and i find in manual mode, where the encoder is pulsing out to motor in remote through the step-u, it is too slow.
I have the numerical step position being output to the lcd as it is being moved, and i think it is the delay of the output to the lcd that is causing the slow movement.
I have tried using the network baudrate for the lcd, and it seems to help, but not enough.
Basically the stamp has to wait for lcd to do its thing before another pulsout can happen.
Anyone have any ideas on how to get around this?

And if i can help anyone here that is involved in the same type of hardware i am dealing with, ask away, i will be glad to help.

p.s. and a thankyou to tracey allen for encoder code example and to steve at TLA for mega help.

Comments

  • Ken GraceyKen Gracey Posts: 7,386
    edited 2004-11-01 04:31
    Kelvin,

    Greetings from a rookie CNC user. I've accumulated several ideas for using BASIC Stamps with CNC machines.

    About the BS2p seizing up during downloads, are you using a USB to serial adapter? If so, I've experienced this problem and know a fix. If you go into Control Panel / Ports / USB and select "advanced" there is a latency timer. Set it as low as it will go - to 1 - and you will have no more lockups during download. This happened to me in front of a presentation with 70 people. What an embarrassment.

    About the LCD, every try a parallel display in 8-bit mode? Sounds like you are out of I/O pins anyway. What about using something like a dual-segment seven-segment display? Those don't take much time to update at all and they look neato.

    Also, ever think of driving the steppers directly from the Stamp and use the Gecko drives? If you haven't used them they're the best bet going for stepper drives. Reliable, small, capable. Of course, you'd be making a bad situation worse because the Stamp would only be able to generate signals for steppers, but depending on the frequency of LCD updates (is it when you change stepper direction, or rates?) maybe this would work. It's something I would like to try in the future.

    I'm very interested in what you're doing. This is real robotics for certain.

    Ken Gracey
    Parallax, Inc.
  • kelvin jameskelvin james Posts: 531
    edited 2004-11-02 07:31
    Hi Ken Thanks for the reply
    I just use the serial com port for downloading to the stamp, i think it is the actual software on the pc that is freezing, as the download does happen. The download status monitor freezes, and i have to close and resart pbasic again, maybe there is something that is causing the stamp not to reset properly? Anyway, not a major headache, only happens once in maybe every 20-30 times.
    I considered the parallel lcd at first, but as you say the pin usage was a problem and more code , i figured i had enough to deal with already, but still might be a future option. Maybe a move to the bsp40.
    And as far as the stepper control, i decided on the stepu because it is an actual controller with software commands already programmed into it, that suited my needs perfectly at the time.I haven't seen the Gecko, but will give it a look.The stepu has the control of marking positions, speed, direction, ramp and and so on. and it has a seperate power input for the motor, which was good too. Just wish it had microstep.
    Besides, i am in no way a electronics wiz, so the interfacable units was the best way for me.
    I was trying to display the actual step position of the motor when the operator is moving it towards the programmed position, where there is a software stop initiated at that point.
    Just would be remote postion display for them to go by. Maybe i'll try just doing the update at a specific speed(slow), which will free up the stamp to run the motor at a higher rate.
    I still have a couple of random glitches ( man, i hate those) where the stamp won't take a command from the memkey until the motor is pulsed again. Probably a pin reset thing, but it's been frustrating to say the least.
    thanks again kelvin
Sign In or Register to comment.