How it works
Fibergrid hardware consists of two parts: a lightsource and a camera with an enclosure. They are connected to 3D printed sensors by inexpensive plastic fibers. The light source shines light on a grid with exposed fiber ends. Fibers transmit light to your light blocking sensors. What light remains is picked up by another fiber that transmits it to the camera enclosure. Camera software running on your PC, laptop, tablet, phone, Raspberry PI or anything that has or can interface with a camera converts each incoming fiber's light to a number.
You design the sensors based on the principle of blocking light. Alternatively LEDs can be placed within individual sensors. In either case, FiberGrid is able to sense how much light a mechanical sensor blocks and give you a value in software.
How the software works
There are two parts to FiberGrid software. FiberCal is a calibration program that finds centers and bounds of the fibers in the camera's visual field and saves this information in a file. Second is the FiberGrid "driver". It uses the config file and provides a simple API for reading your sensors.
The location of the fibers should never change if you have made the hardware device properly. This allows me to separate the driver and calibration software for two reasons. Detecting fibers can be done more accurately with human interaction. The second reason is portability. The driver could probably be written in 50 lines of python or java or C# code or re-written in C++ without using OpenCV. Meanwhile the calibration utility does not need to change.
How the sensors work
All FiberGrid sensors block or capture light. For example, an optical encoder is one type of sensors that block the light. I am currently working on a rotary optical encoder for FiberGrid. (see project logs) Fibers can also be used as a compound eye to capture ambient light.
Try placing one fiber from the light module and another fiber from the camera into each side of a thin drinking straw or fiber cladding. While watching the cam on the screen, push the fibers in and out or bend the straw. Notice how the brightness of one dot on the screen changes. You've just made your first sensor.
fibergrid_sensor1 in the 3D model pack uses a piece of flat polarized plastic (film) from disposable 3D movie theater glasses to make rotation sensors. It has two small pieces that spin relative to each other. When polarization of the pieces is at 90 degrees they will block a lot of light coming from the emitter fiber. (see build instructions)
As you can see, It is easy to make linear/rotary position sensors. Measuring force is harder. It requires as little displacement as possible and stability over a wide temperature range. Making intrinsic fiber optic strain sensors is difficult! In addition, currently FiberGrid does not perform spectral analysis of the light. It measures the total amount of light received. Here are the alternatives for creating force sensors that come to mind:
* Very stiff position sensors.
* Stiff compliant semi-transparent material / 3D printer filament.
* Stiff reflective material that changes...