Digital Taste – Building the prototype – Birce/Enrica/Fito

After the heating pad testing, we decided to start building the prototype as looking as similar in the research paper  of “Digital Taste Synthesizer”, but in a much more smaller and accurate size.

taste6

“Digital Taste Synthesizer” from the research paper

photo 2 (28)

image above: “assembling the prototype”

photo 1 (25)

image above: “assembling the prototype”

 

As you could see from the photos we designed it as a box and laser cut it.

photo (21)

image above: “laser cut box”

 

Because we decided to coorporate an lcd display and 2 potentiometers. We decided to use an Arduino Mini Pro instead of Attiny because this one didn’t have the right amount of digital and analog pins.

We need 3 analog pins:

– 2 analog pins for potentiometer

-1 analog pin for thermistor(temperature sensor)

 

For Lcd display:

-5 digital pins

photo (21)

image above:” LCD display” 

 

To program the Arduino Mini Pro we use (Usb to  FTDI Conventer):

photo (21)

image above: “Usb to  FTDI Conventer” 

 

2 more digital pins:

-1 for heating pad

-1 for electrode

photo (21)

image above: “heating pad”

 

because we need very precise voltage, we decided to use copper wire instead of normal wire which is better conductor and generates less resistance.

photo (21)

above image: “copper wire ”

 

photo (21)

above image: “connecting the  thermistor”

 

we started to print accurate  scale of the voltage and temperature on the LCD display:

photo (21)

image above: “progress on the LCD display”

 

The code for printing the accurate scale of temperature and voltage:

#include <math.h>

#include <Adafruit_GFX.h>

#include <Adafruit_PCD8544.h>
// pin 7 – Serial clock out (SCLK)
// pin 6 – Serial data out (DIN)
// pin 5 – Data/Command select (D/C)
// pin 4 – LCD chip select (CS)
// pin 3 – LCD reset (RST)
Adafruit_PCD8544 display = Adafruit_PCD8544(7, 6, 5, 3, 4);

int heatPin = 8;

double Thermister(int RawADC) {
double Temp;
Temp = log(((10240000/RawADC) – 10000));
Temp = 1 / (0.001129148 + (0.000234125 * Temp) + (0.0000000876741 * Temp * Temp * Temp));
Temp = Temp – 273.15;            // Convert Kelvin to Celcius
//uTemp = (Temp * 9.0)/ 5.0 + 32.0; // Convert Celcius to Fahrenheit
return Temp;
}

void setup() {
Serial.begin(9600);
display.begin();
pinMode(heatPin, OUTPUT);
display.setContrast(50);
}

void loop() {
int temperature = (int(Thermister(analogRead(A2))));
int pot1 = analogRead(A0);
//Serial.println(pot1);
digitalWrite(heatPin, HIGH);
delay(100);
display.clearDisplay();
display.setTextSize(1);
display.setTextColor(WHITE, BLACK);
display.setCursor(0,0);
display.println(“Digital Taste”);
display.println(“”);
display.setTextColor(BLACK);
display.print(“Volt: “);
display.print(pot1);
display.println(” v”);
display.println(“”);
display.print(“Temp: “);
display.print(temperature);
display.println(” c”);
display.display();
delay(2000);

}