Introduction: Clothing Assistant by Color Recognition for (color) Blind People - TfCD
Current environment recognition is an emerging technology, probably because as much data as possible is gained by companies to offer product commercials specifically for their intended users. However, environment recognition can also be used to improve the diminished capabilities of people with a disability.
For example, this bracelet is a device which helps visually impaired (color) blind people to still be able to match their clothes. First the user can measure the color of each clothing item. Afterwards the device speaks out aloud what color it is and if the detected colors match.
What you will learn
First you will learn to assemble the protoype from some 3D models in Solidworks and some basic tools. With the prototype and it's written software in Processing and Arduino IDE it's possible to detect the colors (R, G or B) for 2 clothing items and it will play an audio file saying the color out aloud. When two colors are detected, the device will say out aloud if the two colors are a match or not.
Step 1: Materials
Electronics & software:
- A USB 2.0 cable type A/B
- Arduino Uno
- Adafruit Flora Color Sensor
- A computer which can run Processing 1.5.1 and Arduino IDE.
- (Arduino mini, usb connector and a lithium small battery including connection wires and a on/off switch, in case you want to make the prototype portable).
- 3D filaments & an Ultimaker 3D printer
- Solidworks or any other CAD program
- A wristband, for example from an existing replaceable watch, or buy and sew a piece of fabric together at the local market.
- A small glass circular plate in the size of your 3D model
Step 2: 3D Modelling
For the 3D model we create two parts, see the files: onderplaat and bovenplaat.
You can create your own soldiworks file if you want by folllowing this nice turtorial and than adapting to two parts in order to fit the parts and wires:
Make sure there is enough room for the two parts to fit together. Some more advice since we didn't use an arduino pro mini: if you want to add an arduino pro mini to the wristband, make sure you create space for it in the 3D model.
Step 3: 3D Printing
3D printing on a ultimaker is pretty easy. Make sure you download Cura software from https://ultimaker.com/en/products/ultimaker-cura-s...
Launch it and upload your solidworks parts into Cura. Position the parts so that they are flat on the surface. Set the correct settings: choose the specific ultimaker version, put the support on if your models have round surfaces, set the filling neither too high or low (too high will result in a very long printing time, too low will give mistakes in the print). Export the model and put it on a micro USB. Before uploading your model to the printer with a micro SD, clean the base. Wait for it to be printed, but come back every once in a while to check if the print is going fine. At the end you can file the support off.
Step 4: Soldering & Wiring Up Your Arduino
Solder your wires (in the colors below to help you not mix them up) to your flora-sensor. Make sure the solder is completely through the little holes to prevent bad connections. Afterwards you can connect the wires to your arduino according to the below list:
- Connect the sensor's 3.3v with the 3v of the arduino uno (red wire)
- Connect the sensor's GND with the GND of the arduino uno (black wire)
- Connect the sensor's SDA with theSDA on A4* of the arduino uno(white wire)
- Connect the sensor's SCL with the SCL on A5* of the arduino uno (blue wire)
*On older arduino UNO’s the SDA is located at A4 and the SCL at A5.
SDA and SCL are used to make communication possible. SCL is the clock signal and SDA is the data signal. The SCL and SDA together are called the I^2C bus.
Step 5: Software - Preparations of the Arduino Sketch
Download the latest Arduino IDE from https://www.arduino.cc/en/main/software
Install the Adafruit_TCS34725 adafruit library, which is used to read the sensor. https://github.com/adafruit/Adafruit_TCS34725 Here you can see how to install the library: https://github.com/adafruit/Adafruit_TCS34725
To test if the sensor works or not run the TCS34725 test sketch in the arduino IDE (see the screenshot)
When your sensor works, run and upload the colorview sketch to your arduino. This is needed to translate the sensor data to processing. Make sure you have the right com-port and board within the Arduino IDE selected. You can find out to which port your arduino is connected by opening your device manager within windows and opening the tab com ports. You can select the port and board under the tab Tools.
Step 6: Software - Preparations of Processing
Step 7: Software - Files
We have combined a few different sketches together to trigger a sound when high color values were measured by the sensor. See the processing file: Final sketch colorview.
If you want you can download the simple sketches and write the code yourself. See files the basic processing files we used for this: Colorview & TriggerASample. Originally, the files come from the Adafruit library and the basic processing sketches.
The audio files are named: Red.mp3 Blue.mp3 Green.mp3 Match.mp3 and NoMatch.mp3 You can record your own audio files since there are many apps available on your phone for this. Just make sure you choose an app in which the files are saved as an mp3 file. Place the files in a seperate folder called data, inside the folder where your sketchfile is placed (see the screenshot). The processing library minim is used to play around with audio files.
Step 8: Software - Changing the Processing Sketch
Here you can read for each programming step how we wrote our code and why:
- Read out color from sensor and map it to a display
- Importing own audio files and playing them by a key trigger
- Playing a sound when the sensor value reaches a high value
- Playing multiple sounds when different sensor values reach a high value
- Play a sound when two specific colors are measured after each other
- Visualization the order of measured colors
Step 9: Assembly & Ready for Testing
Assemble the different parts of your prototype and now your prototype is ready for some simple user tests! (wristband, 3D model, sensors)
If you want you can create a portable wristband by using an arduino mini, usb connector and a lithium small battery including connection wires and a on/off switch, in case you want to make the prototype portable. Look on the website from sparkfun if you want to know more: https://www.sparkfun.com/products/11113)