The idea described in the final project was something, about control emmited signals and receibe the echo to proces it an convert in an haptic sensation, mainly in form of vibration.
To carry out a demo, I was thinking about how to find money to do that, and then apears the solutions aobut crowdfunding, so we can find about 1600€, the idea in mind was to develop a fast demo, with pc bassed data adquisition systems, but the price for that systems was to high for the main public, and usualy are not an open design systems, so we decided explore a more open and low level solution, based in an open computing boards bassed on ARM architecture (BeagleBoard, RPi, APC, etc..) and linux operating system.
The basic original idea for the demo, was to be able to control the signal by a hand movements, then emit this signal by ultrasound transducers an capture the echo produced by objects and process to generate an haptic signal.
Abstract:
The original idea has been modified during the development for many reasons. The main reason was to develop a system who can be reproduced by as much as people possible, and for using the acctual components in the market.
So we move to a pc-high level data adquisition systems to a cheap and open PC boards, also change the haptic feedback for an audible sound based system (first concept by using bone conduction technology, but this not is necessary for the development of the system who can be done by using a standard headphones. )
In the first system concept, was based on the university "work system" in wich the algorithms and systems are fast prototyped and tested in pc software platforms such as matlab (who alows fast prototyping).
The idea was to use an USB data adquisition/generation system such as elab-080 managed under matlab by using a .dll library with a c++ functions, this was tested with a good software results, but the hardware response don't fits the basic functionality... The next steep was to think in a professional data adqusition systems to achieve the objetives, then we make a budget based on this assumption and initiate the crowdfunding campaign, achieve the minumum, and the project begins.
Then we begin to consider many options, in the control of the systema and in the feddback (midi control, bone conduction technology), we focus on c++ lenguage as the language for the application and study the sound drivers for PC and how to run in this language. We study the haptic technology, and conclude that today there is not an accesible technology in this way who fits the project specifications. So we decide to use the bone conduction technology, but may be in the future, we can use the haptic technology.
As menthioned before, many computer systems were considered, to the next step solution ( embeeded computer system) chriterias were "open hardware" designs and price. Finaly we chose the raspberry pi because was the most cheapest and open solution (APC via, ofers their collaboration as a sponsor, but at this moment they were not a true option because they don't have a sutable connectivity in their board, months later, they build a better card.)
We install the Arch Linux operating system on RPi and begin to build a development system for this application, by downloading and test many IDE's for this hardware, compiling the source code for the pheriperals needed (P5 glove, sound card, etc...)
Using the embeeded solution we need to develop a "analog to digital" an viceversa, hardware interface between the transducer board and the RPi digital bus. So begin to search for chips who fit the desired specifications.
The transducers sybsystem was tested, so we optimize it by mounting on a perfboard.
We do many tests to manage the SPI bus by testing diferent available software libraries and even asking in forums about that question. The conclusion is perform the application unther RPi, bay progaramming it in "baremetal" (without operating system) like the microcontrollers or by using the DMA controller on RPi, this was the suitable choice because we need a lot of things from the operating system in our application. And this is the devolopment point in which we are.
Also comment that, the software development by functional modules, may produce a undesired result when you try to run together, and this needs to be redeveloped to achieve a suitable result.
The main chriteria to choose the components were the price, the accesibility to the system, the openess level and the easy reproductivity condition. We were searching for many possible combinations, finaly, we choose a embeeded PC, such as RaspBerry Pi. The other components were selected under similar conditions, but basically the accesibility to the hardware at the lab.
Bassed on RaspBerry Pi the main system on chip is runing by a bcm2835 chip, host a ARM architecture able to run systems such as linux and derivates. This could enable the system to run complicated applications and powered only by a battery without the necessity of other peripherals conected. The main problem is about runing real-time applications with systems managed by an operating systems, because we don't have full system control and we have to program in other ways such as DMA or bare metal.
In the first attempt we use a P5 Glove controller, using a c++ based code to write an application to control unther RPi platform, but this application were easy to simulate by keyboard inputs, because we only want to control four analog variables with values between 0 and 63.
Only left an bloc diagram to be completed
The SPI bus has been selected to SBEI application for his fulduplex capability (send and receibe data at the same time) and high data rates (about 125Mhz serial data), an this standartd become popular for the IC's manufacturesr making chips compatible with this standard. So the most serial interface IC's for AC/DC pruposes are compatible with that bus.
Short wikipedia description
The Analog to Digital converter hasen't benn proved, and the circuit hwo converts a bipolar signal to unipolar signal to feed it, also non tested. (from analog devices data sheet, application circuit)
The basic design has been considered with separated ADC/DCA lines...
The D/A line consist in a SPI bus connected to an 16 bit 500KSPS DCA chip with a reconstruction filter tuned to 100Khz connected to the analog autput of the IC, this is the tested part, and is functional for the software described here.
The other A/D line is the non tested part so far, and the basic design consist in a ADC chip connected to the SPI bus, with similar characteristics (16bit 500Ksps) and a "antialiasing" filter tuned also to 100Khz conected to his analog input. Usualy this line requires more chip stages because the ADC chips are unipolar and bupolar signals require an aditional circuit to convert this signal from bipolar to unipolar.
The Analog to Digital converter hasen't benn proved, and the circuit hwo converts a bipolar signal to unipolar signal to feed it, also non tested. (from analog devices data sheet, application circuit)
The ultrasound transductions system was defined from very early stages by using the doc: "A BIOLOGICALLY INSPIRED SONARHEAD" ( https://sites.google.com/site/sbeiprivate/tareas-demostrador-robotica/tareas-agosto/biosonar.pdf )
Actualy the system is based on the RPi soundcard, and the RtAudio and STK c++ software, and is only an audio feedback, there is not an haptic one. The software described so far has been released at the section "source code"
The system has been designed to be accesible for the most popular standards to conect devices at low level, by using a hardware platform who alows that, the RPi hwo allows the conectivity whith chips by SPI, I2C, GPIO, etc...
This platform allows to acces to this peripherals by using the SO Arch linux. But there are many other ways to program it by using "Bare Metal" techniques (in the same way who is programmed in microcontrollers)
There are many reasons for not write a price for the initial development system, becaus is developed unther PC, platform, this could be developed in a any PC based system with a c++ compiler. My recomendation is to redesign the system using the experience in this project.
The hardware have a high risk of non reproductible components due to many causes such as future unavailable parts, in this way the hardware is variable, and the design is mainly conceptual and concibed to be reproductible in the best conditions. We high recommend to redesign the system with your particular enviromental issues.
Arch Linux (under B type RaspBerry Pi ARM architecture hardware) A type may be used also, but nos tested so far.
-gcc compiler for PPi architecture (ARM)
-Text editors. (for edit the source code)
The code is in C/C++ computer language.
You may find all the source files used at the end of this page as a attached files.
From many files generated we selected one here as the most representative and functional.
The following source code has been donloaded and compiled for the RPi ARM architecture:
http://code.google.com/p/libp5glove/source/checkout
Instructions about the specific hardware:
You should download and compile the same code for your particular system and architecture.
And included to be compilated by using the folloging CMakeList.txt
From many files generated we selected one here as the most representative and functional.
The following source code has been donloaded and compiled for the RPi ARM architecture:
http://www.music.mcgill.ca/~gary/rtaudio/
https://ccrma.stanford.edu/software/stk/
You should download and compile the same code for your particular system and architecture.
And included to be compilated by using the folloging CMakeList.txt (this file is designed for the hole application, so there are many libraryes not relevant for this section)
From many files generated we selected one here as the most representative and functional.
The following source code has been donloaded and compiled for the RPi ARM architecture:
This only works under bcm2835 chip architecture. (ARM)
And included to be compilated by using the folloging CMakeList.txt (this file is designed for the hole application, so there are many libraryes not relevant for this section)
Not yet developed.
From many files generated we selected one here as the most representative and functional.
http://www.open.com.au/mikem/bcm2835/
http://code.google.com/p/libp5glove/source/checkout
http://www.music.mcgill.ca/~gary/rtaudio/
https://ccrma.stanford.edu/software/stk/
And included to be compilated by using the folloging CMakeList.txt
To manage sd card image files you may use this tool:
http://www.alexpage.de/usb-image-tool/download/
-You may find all the source files used at the end of this page as a attached files.
Many things to do yet, such as the optimization of the dma software and the ad-da hardware.
After that we will be able to perform small test to evaluate the original idea.
Here will be described one system aproach to develop the desired application.
-RPi
-Mouse, Keyboard
-AD-DA interface hardware (download description here)
-Amplification and Transducer board as described in the doc: "A BIOLOGICALLY INSPIRED SONARHEAD" ( download here )
-We omite all the non esential components to develop the application, (controllers) who can be easily simulated by other input systems such as keyboard and mouse. The price is variable, because the components are continously changing his price. There are some component providers such as:
-Farnell
-RS
-Mouser
-DigiKey
You should search for the desired components and determine the kit price in the tome you decide to buy it.
You can find technical instructiosn about the kit components at the following links:
-Raspberry Pi Type B Single Board Computer 512MB
-There is an Arch linux SO image designed to develop this application. There are compilers, some text editors, and more software tools usefull for this application. You may download at:
http://www.mediafire.com/?9bj8yp77ebcip
There are download managers to easily download the parts.
http://www.programasok.com/internet/gestor-de-descarga/
There are some parts with a sice of 200Mbytes to create a image file to record a SD card with a sice of 8Gbytes, all the parts sould be at the same directory to decompress that.
Some arch linux commands usefull to manage this operating system:
Mount and unmount an USB disk device:
--> mount /dev/sdb/pendrive
--> umount /dev/sdb/pendrive
Compile with
--> cmake -i
--> make
Update the system (not recommended)
--> pacman -Syu
Alsa Mixer:
--> alsamixer
Decompres a tar.gz file:
--> tar -zxvf file.tar.gz
Compile a C/C++ file:
--> gcc filesource.c -o filetarget
Sample commands to compile a library such as RtAudio
--> ./configure
--> make
--> make install
Binary libraries usualy are at:
/usr/lib (system space)
/usr/local/lib (user libraryes)
At *.cpp files
*.h files
contained between < > minds that libraryes are at /usr/include
contained between " " minds that libraryes are at the same directroy as the file
Compile with a CmakeList.txt file shoudl be done at "build" directory and using the command:
--> ccmake ../
then choose the "Release" option [C]onfigure [G]enerate and exit
You should configure the system for your particular IP adresses and so one, but even that you may experience some problems that can be solved by typong the command:
--> system ctl restart network
to list a commands about a issue, you should type:
--> apropos "issue"
and to veiw the manual instructions for a particular command you should type:
--> man "command"
To change the priority of a process you should type:
--> nice
You will need a SD image writer to charge the image file to the card a viceversa:
such as "USB image tool" you may download at:
http://www.alexpage.de/usb-image-tool/download/
and also at:
https://sites.google.com/site/sibiecin/descripcionsistema/usbit.zip
If you receive a message from the program who can't write the image due to some thing related to the sice you should activate the option "Truncate oversize images in device mode" It will allows to write the image even if this is bigger than the sice of your card, this will no t cause yo problems because the ext2 partition has been resiced to fit in all the 8 Giga SD card on the market.
-If you will use the P5 glove you may need the source code and instruction descrived here:
http://code.google.com/p/libp5glove/source/checkout
http://noisybox.net/computers/p5glove/
-To manage the SPI bus you may use the library:
http://www.open.com.au/mikem/bcm2835/
considering the hint commented at the following email:
http://mural.uv.es/efere/archivos/sbei/spi_email.pdf
and that:
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=71&t=19797
-For the ultrasonic stage you will need a ultrasonic transducers, such as:
http://www.avisoft.com/usg/microphones.htm
But for this prject we have considered the design descrived here:
"A BIOLOGICALLY INSPIRED SONARHEAD" https://sites.google.com/site/sbeiprivate/tareas-demostrador-robotica/tareas-agosto/biosonar.pdf
-To manage the signals unther C++ we have been using the:
http://www.music.mcgill.ca/~gary/rtaudio/
https://ccrma.stanford.edu/software/stk/
Yo may donwnload and compile the libraries, but this have already compiled at the image file descrived before.
You should consider that there are many alternative base boards such as APC via, beagleboard, PC 104, etc... and alternative low cost configurations (embeeded systems working only at audible frequencies)
For more info you may download the DVD of the project at:
http://www.mediafire.com/folder/y8wfumcnyvih3/DVDgoteo
And more technical info in spanish at:
https://sites.google.com/site/sbeiprivate
https://sites.google.com/site/sibiecin/technicaldataatgoteostage
https://sites.google.com/site/sibiecin/technicaldataatgoteostage/SelectedSourceCode.zip
https://sites.google.com/site/sibiecin/technicaldataatgoteostage/OpenHardware.zip