Pages: [1] 2   Go Down
Author Topic: Several Serial Devices  (Read 1521 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I have an Arduino Duemilanove in my project and I need to comunicate serial with 3 devices:
-LCD 16x2
-Xbee
-Barcode scanner

The barcode scanner is the only not working
It has a serial cable and a RS232 interface built in, is not a handheld, its kinda OEM.

I could read it sometimes but no more.
Now it looks like a power supply issue.
I was able to feed it with another power supply so it can scan normaly.
But now when I try to read from it using software serial arduino just freezes.
I am using pin 9 and 13 for the scanner.
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 65
Posts: 6899
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Try reading some more from that scanner you will smoke your arduino. RS232 runs on +- 12V and Arduino serial runs on 0 +5V so you should have something in between to shift the voltage levels.
Logged


Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 439
Posts: 23748
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You should use an RS232/TTL adapter like this
http://www.nkcelectronics.com/rs232-to-ttl-converter-board-33v232335.html
or
http://www.nkcelectronics.com/RS232-to-TTL-converter-board-DTE-with-Male-DB9-33V-to-5V_p_369.html
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

0
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you all for quick replying!

I think will not smoke the Arduino because the specification of the scanner states the power is 5v.

I had better success reading using RX and TX pins and using the real Serial.

Will I still need the converter?

But I get weird data!
I dont know the relation to the printed barcode it reads, any clue?
Is it because I dont have that converter?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 439
Posts: 23748
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Measure the Rx & Tx lines out of the scanner when it is not sending - are they resting something besides 0 or 5V? Like + 10, +12V, maybe -10 or -12?
Then they are using RS232 levels and you will need the adapter, or make one up.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

0
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, Im gonna do this. Thanks!

And how about the strange chars I got, is it related to voltage too?
Or I may need to do some kind of conversion in the software?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 439
Posts: 23748
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Either voltage related (so 0's are seen as 1's and 1's as 0's),
or datarate speed mismatch.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 65
Posts: 6899
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Either voltage related (so 0's are seen as 1's and 1's as 0's),
or datarate speed mismatch.

Could also be inverted polarity besides all those.
Logged


0
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

After several test and trials and some discussion with the hardware supplier I could not make it work yet.

In the last email from the supplier he asked me the following:
Please let me know if your Arduino accepts only RS232 TTL level data or not?
 If that's the case, then we have to provide you the pinout/p assignment of the CD-620-R to you because our CD-620-R provides signal data as RS232 level, that may cause misread of code.

I am insecure to answer this.
Anyone knows this, please?
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 65
Posts: 6899
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

After several test and trials and some discussion with the hardware supplier I could not make it work yet.

In the last email from the supplier he asked me the following:
Please let me know if your Arduino accepts only RS232 TTL level data or not?
 If that's the case, then we have to provide you the pinout/p assignment of the CD-620-R to you because our CD-620-R provides signal data as RS232 level, that may cause misread of code.

I am insecure to answer this.
Anyone knows this, please?

You may reply arduino accepts TTL UART signals, 5V and 0V. It doesn't accept RS232 +-12V. You probably damaged either the scanner or arduino when you try to connect 0-5V arduino with +-12V scanner.
Logged


Global Moderator
Netherlands
Online Online
Shannon Member
*****
Karma: 170
Posts: 12452
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


do you have a link to the datasheet of the barcode reader?

Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

0
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

the specs for the scanner are here
https://docs.google.com/open?id=1UATrfNBpafU1nfoPEwpVw5Oky_B7SpJIgnsRFYZIqQmgxZASBI61l2Mp2M4I

I have replied the manufacturer and will wait...

Interestingly I am reading a EAN13 barcode with this number 7896672201424
but in arduino I read this values: 100,76,204,102,38,102,102,230,166,230,102,230,166,0

Looks like nothing was damaged. But is kind of a decoding problem.
Logged

Global Moderator
Netherlands
Online Online
Shannon Member
*****
Karma: 170
Posts: 12452
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The number of digits seems correct (assuming the 0 is an indicator for END OF CODE)
but the numbers do not make sense at all (at least for me), looking at them binary does not help either.

Can you post the barcode itself - image or description -
sw = small white
ww = wide white
sb = small black
wb = wide black

maybe the bitstream encodes the raw barcode before ascii conversion... (datasheet gives no clue)





Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

0
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

robtillaart, I am thinking the same way, but have no results on decrypting this thing yet.

The barcode scanned is attached here.

I have read about the EAN 13 encoding but hadnt helped.

This thing is such a puzzle.


* _MG_0517.jpg (205.35 KB, 856x564 - viewed 11 times.)
Logged

Global Moderator
Netherlands
Online Online
Shannon Member
*****
Karma: 170
Posts: 12452
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

have you read wikipedia - http://en.wikipedia.org/wiki/European_Article_Number - might help to decode it

if this is teh code there might be 3 different codes used simultaneously !
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Pages: [1] 2   Go Up
Jump to: