Interface software using USB rs-232 parallel port and ethernet

Hi, I'm new to Arduino this and I'm new to this forearm this is my second post I haven't purchased any Arduino products yet. I had that in another form to see what they recommend I buy. Reason why I'm here is to ask if anyone can supply me with written code to communicate over USB, rs-232, parallel port, and ethernet. Any help would be greatly appreciated. And believe me I need all the help I can get them just starting out. This isn't for some class project or anything I'm 60 years old this is just for hobby purposes. Thank you in advance for any and all help. My address Kenmcgrath661@gmail.com once again thanks in advance.
Best regards,
Ken McGrath

have a look at

for particular topics do a search, e.g. ethernet

you will find details of the boards, how to connect them, support libraries and example code

Thank you for your help. As I indicated earlier I'm brand new to Arduino and I will require to help in the beginning. Once again thank you.
Best regards,
Ken

Do you have any particular projects in mind?
In your first post you mentioned you were interested in RS232, parallel port, etc. If so you would probably find a Ardunio Mega 2560 useful in that it has three spare hardware serial ports and more IO than the Uno.

Thank you Horace. I'm going to write a control application for my computer for the stepper Motors and I want the option to use any one of those communication ports.

the Mega serial ports are TTL level

if you are connecting to RS232 you can use a RS232 shield, e.g.

or an FDTI cable
http://www.ftdichip.com/Products/Cables/USBRS232.htm

Ken121:
Thank you Horace. I'm going to write a control application for my computer for the stepper Motors and I want the option to use any one of those communication ports.

That does not seem like a reasonable aspiration. It's a bit like saying I might want to use a racehorse, a show-jump horse or a cart horse.

Just pick the communication that is easiest to implement - probably serial over USB from a PC to an Arduino. It comes as standard with Arduino boards.

...R

Just pick the communication that is easiest to implement - probably serial over USB from a PC to an Arduino. It comes as standard with Arduino boards.

...R
[/quote]
That's why I mention the four communication types. I read somewhere on the internet that USB is slow. I wanted to look at ethernet.

That's why I mention the four communication types. I read somewhere on the internet that USB is slow. I wanted to look at ethernet.

it depends on the USB protocol - I tend to use HID protocol (which 64Kbytes/second) for simple control systems
you can implement your own protocol if faster transfer is required
I have used Ethernet with Texas DSP boards when acquiring real time data in the Mbytes/second range
how much data transfer per second are you looking for?

Thank you for the feedback. I'm just getting started investigating my options. I don't know what speed I need yet. I'll look at the USB. I don't believe I need megabytes.

Ken121:
That's why I mention the four communication types. I read somewhere on the internet that USB is slow.

As you have not told us how many bytes per second you want to transfer it is not possible to make a specific response to that.

If all you want to do is control stepper motors I can't see any problem with the data rates that are available using serial over USB. I presume you are not thinking of sending individual step pulses - that would be madness no matter what communication system you use.

I have written my own program to control 3 stepper motors on a small lathe with PC communication using serial over USB and my recently acquired 3D printer uses the same system.

...R

PS.. I have just realized that you are also asking questions about the same project in your other Thread. Please don't split things up. It makes it much harder to help you.

I didn't realize I asked the same question in the other post. But I kept them separate controlling the motors in one posting end Communications in the other posting. Sorry if I created any confusion I'll have to be a little more conscious of what I say in each posting. The rate I want the information to flow is strictly the the square wave train for the motor so if I need I can maximize the speed of each motor. I'm toying with the idea of either a CNC machine or a six access articulated robot. Attached is the datasheet of the motor. I'm using part number ending in -012B but the sheet only calls out a -012. I think they might be the same motor just different vendors because I can't find a spec sheet on the -012B. Thanks for help me out. It's been a long time since I rode any code but I'm sure I'll pick it up again I used to write code for MCU's a couple of simple programs in visual C and Visual Basic. Sell not very proficient. I used to design a lodge automated custom machinery from the nut electrical control layout power layout PLC programming and senses. Just thought I'd give you a feel for old my background I don't know if you are interested or not. Anyway thanks again.

85BYGH Series.pdf (540 KB)

Ken121:
The rate I want the information to flow is strictly the the square wave train for the motor

Don't even think about sending the step pulses. Just send a number of steps (like 250) to the Arduino and let it generate the pulses for the 250 steps.

With the old style PC parallel port it was possible to produce accurately timed pulses but if you were using one of those you would not need an Arduino. None of the other communication systems allows timing with that sort of accuracy - most of them have huge latency.

I didn't realize I asked the same question in the other post.

I was not commenting on the question being repeated - simply that it is easier to help if all the questions and information about one project are in the same place. Having the complete picture makes it much easier to give useful advice.

...R

Thanks once again Robin. I do know that now, after reading more about the controller and watching some YouTube videos where they displayed and explained the code. I have a better understanding of how these controllers work. I thought I was going to have to buy some motor driver Shields. But now I know I don't have to I can control the motors directly from the output pins on the Arduino. I do have a few other stepper Motors that are much smaller 2 have lead screws. And 4 have small lead screws about an inch and a half long. So I might buy the motor shield for those.

Even though there's a separate section for communications you feel I should have been included it in this section about Motors?
Regards

Ken121:
I thought I was going to have to buy some motor driver Shields. But now I know I don't have to I can control the motors directly from the output pins on the Arduino.

This is where having your project in two separate Threads causes complication.

I said in Reply #5 in the other Thread that the Arduino will not be connected to the motor, but you still seem to be under the illusion that it will. You cannot control any motor directly from the output pins on an Arduino.

You will need to get suitable stepper motor drivers which will do for the stepper motors what a motor driver shield does for small DC motors.

...R

Sorry for the misunderstanding. I know you can't connect your Arduino directly to the motor. What I was trying to say is that I'm going to connect you at we know to the motor controller and then use the motor controller Shield for the smaller steppers.

Ken121:
What I was trying to say is that I'm going to connect you at we know to the motor controller and

Something has got mangled because that makes no sense

then use the motor controller Shield for the smaller steppers.

Use specialized stepper drivers for all the stepper motors - especially as you want to drive a large number of motors. The stepper drivers relieve the Arduino from a lot of calculation. Also they allow the motors to be driven with higher voltages for better performance.

...R

I don't know why my messages are gobbled. What I was trying to say is I'm going to use your Arduino to connect to the motor controller and then from motor controller to the stepper.

Ken121:
I don't know why my messages are gobbled. What I was trying to say is I'm going to use your Arduino to connect to the motor controller and then from motor controller to the stepper.

That makes more sense. But you won't be using any of my Arduinos :slight_smile:

...R

LOL somehow my messages not coming out correct when I read them before I send them they read okay. After I send them for some reason words change.