Project with multiple serial ports and USB connection possible?

Hi all,

I am a newbie in Arduino and looking for some advise. I only have some experience with electronics and VB programming so there is going to be a lot of learning for me to do. :wink:

The project device will have the following requirements.

  1. Two RS-232 ports.
  2. Use of SD shield for data logging.
  3. Display data on a 1602 LCD shield.
  4. Enter or edit data with a external keyboard, preferably using USB interface.
  5. Enter data with a barcode scanner, preferably using USB interface.
  6. Two to three buttons to flush the buffer of SD card writing, entering setup mode.

Is it even possible for the Arduino UNO connecting with so many external components? ::slight_smile:

Thanks for all the help in advance.
Alex

You need a mini computer for that.

When a USB keyboard or USB barcode reader is connected to a computer, the computer loads or installs the driver, and that makes it work.
The Arduino can not load a driver.

There are a few options, there is a USB Host shield and the Arduino Due has a USB Host connector. The Arduino Yun is an Arduino with a wifi/linux module that runs OpenWRT. Perhaps OpenWRT can use a keyboard, I have never tried that.

Why do you need two RS-232 ports ?

What about using a Raspberry Pi ? Or an RPi plus an Arduino?

...R

alexlyf:

  1. Two RS-232 ports.
  2. Enter or edit data with a external keyboard, preferably using USB interface.
  3. Enter data with a barcode scanner, preferably using USB interface.

Hi,

It is probably easier to use a PS2-barcode scanner, you can read'm quite easily as PS2Keyboard.

You could use arduino's standard USB-connection to enter data with PC/external keyboard, but a Mega2560 is probably a better choice if you need 2 extra serial ports as well.

Thank you so much for the advise, guys!

Peter_n: RS-232 is for one to one communication and I need to connect with two different devices.

Robin2: The only experience I have with Raspberry is seeing one running as a music player for HiFi, I think it runs on Linux, right? Pardon my ignorance, will it be more expensive and difficult to develop the project with it?

Simpson_Jr: I used to have a PS/2 wedge scanner (Symbol LS2208) but I found it a bit too expensive for my project for I have a lot more choices for the USB one. I will check on the Mega2560, thanks!

I did a bit more digging and see there are people using a USB host shield for scanner.

So, can I use that shield with a scanner and the Arduino standard USB for a PC keyboard?

No, the USB Host Shield is something special.

But at least you know now that the scanner will work if you buy the USB Host Shield, that is good news.

alexlyf:
I think it runs on Linux, right?

It's alright. It is NOT a communicable disease :slight_smile:

will it be more expensive and difficult to develop the project with it?

All Linux software is free so the only cost is the Pi itself - similar to an Arduino Uno. Yes, you will have to learn a bit about Linux but you can program it with Python.

It won't be more difficult than doing it with an Arduino.

The Pi is a PC in a very small space.

...R

Hi Guys,

Thank you all for the comments. I am studying for feasibility of using Arduino.

Here is my plan for hardware design but I am little confused.

Barcode scanner: USB host shield
Keyboard: Arduino standard USB
SD card for data logging: SD card shield
LCD display: 1602 LCD shield
Push buttons x5: Arduino input pins.

The problem is I need two RS-232 serial ports, how do I achieve that?

Also when choosing Arduino board, should I go for Mega2560 or can I pull it off with UNO?

To connect a RS-232 signal to an Arduino you need a RS232-ttl-level adapter. They have often a MAX232 or MAX2323 chip. A Arduino Uno has only one hardware serial port, and that is used to communicate with the computer. Sometimes the SoftwareSerial library can be used, but only for small projects.
The Arduino Mega 2560 board has 4 hardware serial ports, one to communicate with the computer and 3 for other devices. So yes, the Mega is the one you need.

However, you can not connect a keyboard to a Arduino board. The keyboard is just like the bar-code scanner, it needs a USB Host. I don't know if a single USB Host Shield can be used for two devices.

Do you know if that bar-code scanner will work with OpenWRT or with the Raspberry Pi ?
The Arduino Yun has as USB Host connector, and it runs OpenWRT linux.

Thanks Peter_n.

Sorry, I really have no clue about barcode scanner with OpenWRT.