588,484 active members*
5,045 visitors online*
Register for free
Login
Results 1 to 8 of 8
  1. #1
    Join Date
    Feb 2004
    Posts
    157

    simple serial interface

    Anyone know where I can find a sample schematic for a serial interface? I just want to grab some data that I send out the serial port and manipulate it. I basically need a test rig to better understand how to interface with the serial port. I am writting a cnc driver that will work off a serial port (usb or serial). I would like to make or find a cheap way of taking serial position/step data and convert it to step direction pulses to drive a gecko or xylotex board. I have found some ready made boards like the simplestep, but they are around $200-$250. I am trying to see if I can make a cheaper interface. Anyone know of one, or interested in this type of thing?

    thanks,

    mw

    www.bigbearcnc.com

  2. #2
    Join Date
    Dec 2003
    Posts
    24221
    Have you looked at going the PIC Micro route? There should be alot of application sheets on the site.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  3. #3
    Join Date
    Feb 2004
    Posts
    157
    Microcontroller, I never thought of that. They are probobly a good, cheap way to go about this.

    Question,

    I always thought a microcontroller was programed with the pc, then disconnected and run on its own. What I want to do is have constant communication with it. Is this possible?

    Basically I would want to send step information for x,y,z axis to the microcontroller. Then it would read my data and generate a step pulse and a direction pulse for each axis. I would also want to be able to control the speed of the steps so that the motors arrive at their destination at the same time. ie, if I want to go from 0,0 (x,y) to 1,2 (x,y) it would move y twice as fast as x. I would then have data outputs coming from the microcontroller that I would feed to my motor driver board (step x, direction x and the same for y and z). I have never done any work with pics, but does this sound like a reasonable app?

  4. #4
    Join Date
    Dec 2003
    Posts
    24221
    Pic micro's have built in RS232 & USB interfaces to communicate to the PC.
    http://www.microchip.com/stellent/id...PAGE&nodeId=64
    Also, another method could be with an industry Standard machine control network like Canopen that is also supported by PICmicro.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  5. #5
    Join Date
    Mar 2005
    Posts
    1498
    060324-1300 EST USA

    mwalach:

    Your question is not very clear in terms of the device that you are going to control. For example does it include a microprocessor or PC or whatever? Probably not from your description so far.

    If you want some broad information on a UART go to www.national.com
    put in PC16550D in the search box. Next click on download under PDF, and you will get the data sheet.

    I have not read the data sheet lately. But years ago, in the early days of UARTs, very good descriptions of the operation were given. More recently the assumption is made that you have considerable a priori knowledge.

    Generally serial transmission means that one bit of information ( 0 or 1) is transmitted in one time interval. To be useful this serial data needs to be assembled in some grouping. This occurs at various levels. Typically in an RS232 communication channel data is sent asynchronously in batches of about 10 bits. Some of these bits do not contain information. Typically in a 10 bit asynchronous word the construction is as follows:
    1 Start bit --- required
    7 Data bits --- the individual values will fluctuate from one word to the next
    1 Even parity bit --- this is an option that is suggested --- varies from word to word to make parity even
    1 Stop bit --- required

    Asynchronous means that automatic resynchronization occurs every transmitted 10 bit word (or whatever the length is).

    The the amount of information contained within this one word is up to 128 combinations, 2 to the 7th power. Adequate for all the characters in the basic ASCII alphabet.

    Inherently there has to be a precision clocking signal at each end and it has to be agreed upon before transmission of data. Any arbitrary amount of time is allowed after one word is transmitted before another is sent.

    To work form RS232 levels to the 16550 you need RS232 interface chips or other devices. The 16550 parallel side is compatible with 5 V logic circuits. The serial input is also 5 V compatible and that is why interfacing is required to the RS232 levels.

    .

  6. #6
    Join Date
    Feb 2004
    Posts
    157
    Your question is not very clear in terms of the device that you are going to control. For example does it include a microprocessor or PC or whatever? Probably not from your description so far.
    I am writing a software application that will run on both macs and pcs. It takes a dxf file and converts it to gcode. Then, it takes the gcode file and generates step and direction pulses to drive a stepper motor controller (such as a xylotex or gecko). These stepper drivers need a step direction bit (0,1) and a stream of pulses for stepping movement. Most people design controllers to run off the pc parralel port because you can drive the stepper controller directly by toggling the bits of the parallel port. In the past I wrote a cnc control to do just that. However, I want to control my stepper driver through a USB port (or serial) as most apples, and even pc now do not have a parallel port. I am also hoping to have smoother motor control because some external electronics can hold the drive bits in a buffer. Operating systems get in the way of the bit stream when using the parallel port, and make the stepper motors run choppy.

    So, basically I want an inexspensive device that can be plugged into a computers USB port on one end, and then connected to a stepper motor driver. Then, people could use my software and this "go-between" board to control any of the great stepper drivers already on the market. No one seems to make a good, cheap serail controller for the hobby cnc enthusist.

    Anyone interested in what I am doing can visit my website at www.bigbearcnc.com

    I will release an alpha version of my software soon which will contain the dxf to g-code converter (this will be shareware).

    once the driver portion is complete I will likely charge a small amount for it, but not much. I want this to be available to the hobbiest.

  7. #7
    Join Date
    Mar 2005
    Posts
    1498
    060324-1538 EST USA

    mwalach:

    I believe you will need a microprocessor at the end of whatever your serial connection is for the following reason:

    In a Windows system you have multiple processes sharing the main processor time. Thus, it is hard to get precise timing control in some random programmed function at high rates. You want a dedicated system to generate these multiple pulses that require precise time correlation with each other.

    I would suggest you use Ethernet from your PC to this remote processor. This will provide electrical isolation, high speed, and up to 328 ft of copper wire cable. Or fiber can be used.

    Obviously the remote processor will have sufficient buffer memory to never be starved for data from the main PC.

    Your timing information would be generated at the local processor.

    .

  8. #8
    Join Date
    Dec 2003
    Posts
    24221
    I would consider looking into the available open architecture bus systems that are out there, of which there are many.
    Canopen, MODbuss and Sercos etc (or at least model it on same)..
    For example Sercos (SErial Real time COmunication System), offers practically real time closed loop of Axis controllers with the ability to close the loop back to the controller, due to the intelligent digital drives reporting position status back to the controller.
    There are application sheets around for integrating a PIC micro onto some of these standards.
    I guess we've overstepped the original premise, the operative word was 'Simple' Interface.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •