Optical PC interface

I would like to build an optical link from a computer monitor to an Arduino. Maybe you know the method to transfer data via blinking patterns on the screen. This is used e.g. by banks to generate TANs. Has anyone ever built something like this with an Arduino? I just want to drag short text files to a program icon, this text is converted to blinking binary code, this code is received by photodiodes of an Arduino, and written to a textbox on another computer.

Is there such an application, and under which keywords could I find it?

Is it? What's a "TAN" here?

What is the purpose behind this? Why can't you just use conventional file transfer methods?

Does the blinking happen on a specific part of the screen, and the photodiode(s) is placed over that place?
That shouldn't be hard to do - it's just reading a photo diode.

Getting something to look at an entire screen, and work out where this signalling is occurring would be a lot harder!

I am not concerned with TAN generation, but only with data transmission. And yes, it is rather a simple matter. But I didn't want to reinvent the wheel.
Yes, there should only be a form at a special position on the screen to take over the flashing.
It is meant for a unidirectional transmission. It is an analyzer PC, which must not be connected to the company's network. That is why the data are loaded on USB sticks so far, and processed in the other PC. Since I consider this to be rather tedious and cumbersome, and also not compliant with the security regulations in the company, I am looking for a simple solution that could be automated.

Why not just use a serial link?

Just use a single wire, and you'd achieve the "output only; no input possible" thing?

Having to mess about with an arduino still sounds rather cumbersome.

I guess it's all contingent on finding this TXT-to-blinks app.
Would installing that be in keeping with 'security regulations'?
I suppose it won't look suspicious holding a photodiode assembly to the monitor?

1 Like

Sometimes you have to resort to psychological tricks to give people an illusion of security.

As soon as I make a galvanic connection between two devices using wires, people with a certain lack of technical understanding are more inclined to think it's an illegal insecure connection that some computer virus could jump across. If it is an optical connection, they are more likely to be convinced of its security. :stuck_out_tongue_winking_eye:

But actually I don't want to discuss here the reasons why I want to use this or that method. Because I have already thought about that before.
I actually just want to know if someone else has already used this method, and might provide me with the appropriate code.
Or that someone has some ideas how to improve my method. I want to say, the method is already fixed, but I am willing to optimize it.

Many years ago I had been involved with self-programmed serial data transfers.
Here in this case I might even use several parallel photodiodes to make the data transfer safer and faster. But since I don't want to spend months on optimization and programming, I just wanted to ask if someone had already done something like this.
For example, I don't know yet which program I would use to create the actual blinking, because I don't have all the possibilities at my workplace, and I might have to program with VB.Net.

IrDA is non-galvanic

But they'd be OK with you installing a piece of homebrewed software on the machine?

You're going to have a painfully slow data rate this way. How much data are you trying to send.

Let's say you've got a monitor with a 240Hz refresh rate. You can send one bit every 4ms max. So a byte takes 32ms. If you've got even a small 1K file then that's going to take 30 seconds to transfer. And that's being optimistic. Since this will be affected by external things like room lights and flicker on the monitor you probably want some error correction in there.

1 Like

You also realize how crazy this is? :wink:

It is a measurement data series of maximum 10 values.
These have 2 decimal places. So we have with CRLF
together 7 bytes * 10 = 70 bytes. If I have more
diodes in parallel I can also save time.

In the time it takes the user to get from the sending PC to the
receiving PC, the data will be there too. :turtle:

I guess sometimes you have to resort to crazy stuff.

The problem with crazy stuff is that it is crazy. Functionally, this project is pretty useless to anyone who isn't in the crazy situation you are in. So it's really doubtful that there's a solution readily available.

It shouldn't be hard to find code to draw a square on the screen and make it change colors. That sounds like some "hello world" level stuff for whatever display code you choose. I use tkinter a lot for guis in python, you could create a canvas with a rectangle and just change the color of the rectangle and redraw. That's example code level. I'm sure it's the same with anything else.

Reading a photodiode is simple. There are plenty of examples of that.

Assembling the bits back into a message is simple. There are examples for that.

I don't think there's going to be a ready made solution for you. But it doesn't sound hard to put something together. Work on it one piece at a time. Ask for help when you get stuck.

I'll be honest. For 10 numbers with 2 decimal places I'd likely go with the obvious no tech solution before I'd put a bunch of work into something like this.

I know what you mean, but you also have no idea how often people can't copy simple numbers off the screen correctly. The same goes for typing them in again on another PC. Moreover, in a world of computers, you think it's very strange that you still have to copy data somewhere by hand at all.
I myself find it stupid, of course, when a company wants the analysis results, but puts harassment in the way of the workers with some safety regulations, so that you have unnecessary work.
Today, it is already like in a locksmith's shop, where the locksmith has to ask his boss for a hammer in the morning, so that he can actually do the work that the boss has already given him.

You don't think a flashing screen and a photodiode might be error prone?

We will see when it is ready

I don’t want to drive this thread off-topic but there was something way back at the dawn of PCs that transferred information via a flashing spot on a TV screen. I haven’t found the right words to get Google to cough it up yet.

Why use Arduino when bar codes exist? Bar codes = 1 way optical data
transmssion using off-the-shelf hardware and software. Find software that
convert ASCII text to bar code image then display the image on the sending PC.
On the receiving PC use a USB bar code reader to read the bar code.

1 Like

Many years ago we used to embed a bunch of white boxes into the video steams from the camera on our trials aircraft. The boxes appeared across the top of the video picture to indicate a time code in binary. We stuck a bunch of photo diodes (I think...) mounted on a piece of veroboard to the screen and decoded the time stamp.

Similarly to the QR codes used on TV these days to direct the viewer to a web page.

1 Like

Sparkfun sell a 2D barcode scanner:

EDIT: Maybe there's a library you could use with an ESP32-CAM board to decode barcodes instead.