Connect with us

Help: Interfacing Shift Registers w/ PC?

Discussion in 'Electronic Design' started by +Q__, Sep 7, 2003.

Scroll to continue with content
  1. +Q__

    +Q__ Guest

    Hey everyone,

    a little while back I posted about a project I've been working on that
    requires several solenoids to be switched on and back off again at a
    high rate of speed.
    I was told to look into 8-bit parallel-in/serial-out Shift Registers,
    and I found a page that seemed rather informative:

    First, a little catch-up:
    I have 30 push-type solenoids, all in a row. (Part No. Sol-52 at
    I need to switch them on and off from one end to the other in no more
    than 1/4 sec total elapsed time. The next unit in the sequence can't
    be turned on until the last connection has been broken. Return time of
    the pistons is irrelevant.
    The power source is 24 VDC, Jameco AC-to-DC convertor, Part No.

    Now that we're all up to speed, I have three major questions (keep in
    mind I'm no expert at this stuff so in-depth replies are appreciated):

    1) I need to be able to customize the sequence in terms of the precise
    amount of total elapsed time, the order in which the units are
    triggered, and the total number of units triggered.
    Preferrably, I want to be able to hand code a programmed solution to
    this requirement, using BASIC syntax. Although the Basic Stamp was
    used in the article indicated above, is it possible to use an OOPic 2
    to achieve custom control of this kind? Would it be easier to use a
    Stamp instead?

    2) As I stated earlier, I need to have a hi-speed arrangement. Is
    there a way to interface either an OOPic 2 or a Basic Stamp with a
    1MHz timer so that its output frequency is used to control the cycle
    of the PWM in the registers, thereby increasing the speed at which all
    the switching occurs?

    3) If interfacing with a hi-speed timer isn't necessary, does anybody
    know what the processing speeds of these Integrated Circuits are?

    Finally, if someone would be kind enough to make an example diagram of
    how a couple iterations within this circuit would be accomplished
    along with descriptions of the function and purpose of each vital
    element, I'd greatly appreciate the leg up.

    Also, if anyone is not so inclined, please indicate good sources of
    info where I could ascertain where/how to start building this.

    Thanks in advance,
  2. For this application, have you thought about using a computers
    parallel port to control the switching? I don't remember off-hand the
    pin-out but you can control, I believe, 16 outputs simultaneously. You
    could use one of the outputs as a mux control so you could control all
    30 with two writes out of the port. You'd also most likely have to buffer
    the outputs - for a solenoid is a fairly heafty load. This is also easily
    controllable using BASIC or C or assembly code.
  3. Oops, just checked, one can only control 8 outputs via the parallel
    port (makes sense - a byte at a time). It's been too many years.
    Could still work for your application.
  4. The parralel port of your PC would be usable, in terms of electronics,
    solenoids are low-speed, so don't worry about speed.

    A drawback of the parralel port is that the timing is not exact if you have
    other programs running, you need a PC connected to it, and it slows down
    the PC enormously.

    Since you want to be able to program on/off in random orders, it's not
    really a shift register.

    This is how I would do it:

    There are 8052AH-basic microcontrollers (or even complete boards) which
    understand a simple form of basic, and can connect to the serial port of
    your computer. The dutch magazin "electuur" has published various circuits
    with it over the past few years.

    That way, the circuit will keep running if you turn off the PC, or you can
    make some presets if you connect battery powered CMOS ram to it.

    Use a d-flip-flop driving a mosfet to turn a solenoid on or of, don't
    forget to put heavy diodes reversed over the solenoids to avoid a turn-off
    peak voltage destroying your FET.

    If you take four bytes of the IO range of your 8052, use the \WR and \IO
    pins from your 8082 to control the clk of your d-flipflop you only need to
    decode 4 IO addresses. (e.g. all-exept 2 LSB=0).

    That's about it I think,
    Good luck.
  5. John Smith

    John Smith Guest

    If I'm understanding this right, you will pulse each solenoid for about
    ..0083 seconds (.25 seconds/30 = .0083 seconds per solenoid). If so, you will
    probably not get the solenoid to do anything at all. Solenoids have
    inductance which will slow the rise of current probably not allowing the
    current to rise sufficiently to get a push.

    But, then again, I may not understand what you're doing. Good luck.

Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day