printer data snooper

hi

At work I've got a few different bits of equipment that print out important information with thermal receipt printers.

At the moment I take the printouts over to a computer, enter in the data from them and a little program I've written performs alsorts of magic with the data. I've been thinking for a while that it'd be nice if I could connect the machines to the computer and have the computer do all the data entry automatically. As a fail safe I'd still like the machines to be directly connected to the printers, so i guess I'm looking for a RS232 wire tap. I'm thinking of something along the lines of:

Now I am aware that there are a few comercial RS232 data tapping solutions out there (http://www.datalinkcom.net/accessories/dl9pcdt.htm, EZ-Tap Pro, etc). However I fancy having a play with my arduino, and once the basics are up and running I might expand it to include the SD card shield so I can data log onto the arduino as well (so if for example if I leave the machines on over night, I don't have to leave the PC on overnight - the PC can just get the latest log files off the arduino in the morning).

I've had a little browse around the internet and found a website detailing how to do a basic wire tap: http://www.lammertbies.nl/comm/cable/RS-232-spy-monitor.html. So I guess I can get the hardware part sorted, my next problem is programming the arduino. I've had no experience in programming serial connections before - could somebody point me in the right direction?

Also if anybody has any thoughts or suggestions for the project then I'd really appreciate it...

Dave

so i guess I'm looking for a RS232 wire tap.

is it legal (privacy et al) to sniff? Is it your own data?

That said: it is not too difficult with Arduino

INstall the NewSoftSerial Library and make a sketch with 2 softSerial ports and connect them to the MACHINE and the PRINTER.

if something comes in it is echoed to the other 2 ports. There can be fancy additions too

You probably need to add breakout boxes to change 232 level to TTL level e.g.- RS232 Converter DIP - MAX232 MAX3232 - COM-00316 - SparkFun Electronics -

Thanks for the suggestions - It's interesting to see the angle you'd recommend of having a serial input and output into the Arduino and having the Arduino mirror the data. I'd not thought about that option, I was more thinking of tapping the wire so the Arduino wasn't sat in between the machine and the printer (incase the Arduino failed). I'll have a think about it, you might be into something...

Thanks for pointing me towards the libraries (I'll go and look into them), and reminding me to change the voltage (I'd completely forgotten about the voltage difference :cold_sweat: oops)

On the legal side, the machines only print out pressure/temperature/cycle/time data, etc. I own the machines, the printers, the data, the business, etc - so I'd say it's legal.

I've got a cheap printer coming off ebay so I can have a play with none mission critical data and none mission critical kit first (kinda seemed the sensible option really)

Thanks for the advice

Dave

The nice part of being in between is that you can reformat the data and for example do statistics on them (avg temp). If you just listen on the wire this is not possible.

I was also looking to build something similar, since most serial communication is standardized can we accept the bits and bytes then convert it over to data that is usable?

Another commercial product available: Serialtest: RS-232/RS-422/RS-485 Serial Protocol Analyzer