Hacking experiment control computer hardware

I am a physicist, and a few weeks ago I had a revelation about how I can use my personal computer to gain finer control over laboratory experiments than is usually the case. Before I ran away to try to do this, I wanted to check the opportunity with people who have more experience than I do in such matters.

The idea is to use I / O ports --- VGA, ethernet, speaker connectors, etc. - on a computer to talk directly with sensors and actuators in an experimental setup. For instance. cut one side of the network cable (with the other end connected to the computer) and send each line to another device. I knew a postdoc that did something very similar with BeagleBone. He wrote assembly code that allows him to synchronize everything with the internal clock and use the GPIO pins to effectively give him a hybrid signal generator / area that was fully programmable. It seems the same thing should be possible with a laptop, and this will have the added benefit that you can perform data analysis from the same device.

The main potential difficulty that I foresee is that the hardware on the BeagleBone is designed with this type of I / O in mind, while I expect that the hardware on the laptop will probably be harder to control directly. I know, for example (from some preliminary investigation, http://ask.metafilter.com/125812/Simple-USB-control-how-to-blink-an-LED-via-code ) that for USB ports it will be difficult to access this way, and VGA (according to VGA 15-pin data port to read and write using Matlab ) is impossible. However, I did not find anything about using other ports, such as Ethernet or speakers.

So, the main question is whether this idea will be feasible (without investing many months for each new hardware option), and if so, what type of input / output (ethernet, speaker connectors, etc.) is likely to be the best a choice?

Supporting questions:

  • Where can I find material to find out how I can fulfill this plan? I'm not even sure which keywords will be included on Google.

  • Will the ease with which I can do this greatly depend on the operating system or hardware brand?

+5
source share
2 answers

The only cable I can come up with for a PC that can come close to this is the parallel cable for the printer, which pretty much went away. This is a 25-wire cable that transmits data so that it can send more data at the same time. I'm just not sure if you can target a specific row or if it fills more from left to right when sending data.

Using one on a laptop today will definitely be difficult. You will not find any laptops with parallel ports. There is usb for parallel cables and serial to parallel cables, but I would suggest that the only control you have will have a USB interface or a serial interface, not a parallel one.

As for Ethernet, you have 4 twisted pairs that use only 2 pairs, and 2 pairs that are optional.

There is some hardware available called Zwave that you might want to learn. Zwave allows you to create a network of devices that exchange data in a grid. I'm not sure what kind of response time you need.

I just thought of something that might be a good solution. Check safety equipment. There are a lot of PC equipment that controls doors, windows, sensors, etc. This industry can find what you are looking for.

0
source

I think the easiest way is to use the USB port as a device for the user interface (HID) and use the specially created PIC and PIC program, which includes USB functions for encoding the data that will be sent to the computer, and thus , you can program it independently of the OS due to the fact that all mayors of the OS have HID USB functionality.

In any case, if you used your MIC / VGA / HDMI on any other port, you still need a device to encode data or transfer it, and another program inside the computer to decode the data being sent.

And remember, other equipment has other software (drivers) that can decode raw data in other odd ways, making your equipment dependent on IO.

Hope this helps, but that is why USB was invented in the first place to make it hardware and independent.

0
source

Source: https://habr.com/ru/post/1205573/


All Articles