Page 1 of 1

USB to RS485

Posted: Sun Feb 04, 2007 9:22 pm
by alpha
Hello,

first I want to say hello to everybody! I'm new and I don't know a lot about electronic. Just enough to be dangerous :wink:

I bought an old bar code scanner and the interface is IBM PORT 5B, I looked at the IBM web page and port 5b is RS485. I found a MAX485 and a MAX232... my first idea was to just connect both together and us my com port. But than I found this web page and USB would be much better. I did an download of Eagle and change the reference project a little bit. I'm not sure if this will work. May some of you could have a quick look over the jpg or sch file. And tell me if this will not damage anything and if it will work... thank you in advance.

http://www.alpharesearch.de/pcb/circuit.jpg
http://www.alpharesearch.de/pcb/circuit.sch

Markus

PS: thanks to Grendel, as a ISP I would like to use http://www.mindaugas.com/projects/MJoy/Programmer.php
so i guess I don't need vcc on ISP port and I can use the USB to power everything...
PPS: I was not able to find the MAX485 in Eagle... so I use this other IC that looked the same to me, but may this is not true.
PPPS: does the AT90S2313-10PC have enough flash for usb+usbbootloader and the user program (as keyboard) send rs485 to pc

Posted: Fri Feb 09, 2007 7:47 pm
by christian
I did not find anything dangerous in the circruit diagram at first glance. However, the 2313 is too small for the application. I'd recommend the ATMega8. You can get them for ~ 3 EUR and it's not worth saving here.

Are you aware that you also need a driver software on the host side, unless you implement the CDC class which is highly discouraged? I'm asking because most of the working time goes into software and you mentioned that you are not too experienced.

Posted: Sat Feb 10, 2007 2:39 am
by alpha
Thank You for your reply.

My idea was just to look at the Rx (the scanner has its Rx pins not connected to its circuit) and send all the bytes I receive using the keyboard HID / CDC class to the PC. So I don't need a driver and the barcode scanner will work with all devices that support a USB keyboard.

I received the scanner and it looks like it is a RS422 IC from Motorola... as far as I understand is RS422 and RS485 almost the same.

Right now I'm trying to figure out what all the 28 pins on the connector of the barcode scanner do. I found the GND pins (~8) and I found a +12V and a +5V The 2 +Data and the 2 -Data (but only one set is connected on the other side of the IC to the circuit), a LED and a button (not important for the barcode function). Two pins go to two different SMD three leg parts (may transistors???) and I'm not sure what they do.
If I power the +12 the motor start, but this is all I can do so far. The +5 go to the RS422 IC. If i put 5V on the two transistors the motor slows down, I thing this is ok because the motor stops being so loud and it sounds now more like a normal barcode scanner and not like a vacuum cleaner anymore :) I don't see laser yet. I hope I'm close to get this to work, but may I don't.

Markus Schulz

PS: May I skip the whole RS422 and put my circuit in the barcode scanner and connect directly to the 5V TTL Tx pin.

Posted: Wed Aug 27, 2008 4:05 pm
by Guest