Buongiono a tutti,
ho acquistato un sensore 7719 termoigrosensor che volevo collegare al mio arduino uno per misurare l'umidità e la temperatura per poi trasmettere i dati attraverso lo shield ethernet a emoncms per visualizzarli poi in rete.
Per mia sfortuna in rete non ci sono molte informazioni su questo sensore (a dir il vero non ho trovato proprio nulla) e quindi non so proprio come cominciare per arrivare al mio obbiettivo...
Chiedo aiuto a voi se potete aiutarmi...
grazie
IN ENGLISH
Goodmorning to all ,
I purchased a sensor 7719 termoigrosensor I wanted to connect to my arduino to measure humidity and temperature and then transmit the data through the ethernet shield to emoncms to view them later in the network .
Unfortunately for me in the network there are a lot of information on this sensor ( to tell the truth I did not find anything ) and then I do not know how to begin to get to my goal ...
I ask for help to you if you can help ...
thanks
sorry for the english because I traslate with google translator
This one ? Temperature and Humidity Sensor Module- This module can be used to measure both temperature and rela
What is written on components ?
yes that is the component! ![]()
i buy it in this store: Servizio di incisione e taglio laser - FuturaShop
the manual tells a lot: https://www.futurashop.it/download/7719-TERMOIGROSENS.pdf
It uses some kind of SPI-interface, but I think I'd try the shiftIn() command.
Pull CS low.
Shift in 4 bytes. (tempHi,tempLo,Humi,CRC)
Pull CS high
the manual tell you how to decode the read data.
I can't understand where i connect the pin of the sensor to arduino pin and i don't know how can i find the recorder data from the sensor... ;(
ok. Read comments on top of code. Ensure pins are in the order indicated.
Upload the code. Then connect the sensor directly to pin 2..7, facing outwards.
the code isn't tested - no promisis.
Open serial window@9600 baud - output is ??
!!! check that pins match !!! change pin definition if needed (may be 7..2 instrad of 2..7)
/* 7719 temp/humi - sensor
PINOUT 7719 : Vdd Vss Res DAT CLK CS
Arduino pin : 5V GND n/c pin pin pin
or - plug unit on pins 2 through 7 - outwards
Arduino pin : 5V GND D4 D5 D6 D7
*/
#define Ucc 2
#define Gnd 3
#define Res 4
#define Dat 5
#define Clk 6
#define Cs 7
int temp, humi; // store temp and humidity
byte CRC; // read, but not checked
void setup()
{
// set pins direction
pinMode(Ucc,OUTPUT);
pinMode(Gnd,OUTPUT);
pinMode(Cs, OUTPUT);
pinMode(Res,OUTPUT);
pinMode(Clk,INPUT);
pinMode(Dat,INPUT);
// Power the module
digitalWrite(Gnd,LOW);
digitalWrite(Ucc,HIGH);
digitalWrite(Res,HIGH); // keep HIGH or not connected
digitalWrite(Cs, HIGH); // not selected yet
Serial.begin(9600); // output to serial possible..
}
void readTheSensor() // can be reduced in code size
{
byte val; //temporary storage
digitalWrite(Cs,LOW); // enable sensor
// now read 4 bytes
val=shiftIn(Dat,Clk,MSBFIRST);
temp=val<<8;
val=shiftIn(Dat,Clk,MSBFIRST);
temp |= val;
val=shiftIn(Dat,Clk,MSBFIRST);
humi=val;
CRC=shiftIn(Dat,Clk,MSBFIRST);
digitalWrite(Cs,LOW); // disable sensor
// now - according to datasheet - remove 400 from temp
temp-=400;
}
void loop()
{
readTheSensor();
Serial.print("Temp ");
Serial.println(float(temp)/10.0,1);
Serial.print("Humi ");
Serial.println(humi);
Serial.println();
delay(1000);
}
can you help me at another problem please?
http://forum.arduino.cc/index.php?topic=331848.0
i need it for comunicate with the website emoncms
I have never seen or used your sensor, nor published data to the WEB.
I cannot help you with the second part.
Start a new question.. something like "How to send data to emoncms"
I'm curious... Did you get any usable readings ??
ok ... now I will try to inform to the webcast ... when I have news you update ![]()
sorry but i don't understand how i mount the circuit....
i've see in the sketch but i don't understand ;(
Upload the code first.. then
plug the sensorcard directly into your uno (from pins 2..7)
again. please check that the +V-pin is at pin 2.
You can change the pin-numbers in the #define-part of the code if it is the other way round.

this is the output if i connect the pin as the immage

if you don't see from this^
this is the link: http://i59.tinypic.com/rcohmo.jpg
..sorry to see that. It tells me that you read zeros only..
Can you verify that the pins are the same as the picture?
#define Ucc 2 // 5V
#define Gnd 3
#define Res 4
#define Dat 5
#define Clk 6
#define Cs 7
Study the datasheet along with the code. I must have missed something.
There is som text regarding the reset-line. Check if u get same understanding as I do..


this is my circuit
Looks like connetions are OK.
Doing it that way, you can move power (blue wire-now arduino pin 2) to 5V-pin and gnd-pin from arduino pin 3 to Arduino GND-pin
also: If u got a small capacitor (100nF +/-) connect between theese two pins on your breadboard.
(some lines can be removed from the code, but its no big deal..)
I've changed the code a little. (inseret the reset procedure, allowing a short delay before reading and done the 4 readings as fast as possible)
Try..
/* 7719 temp/humi - sensor
PINOUT 7719 : Vdd Vss Res DAT CLK CS
Arduino pin : 5V GND n/c pin pin pin
or - plug unit on pins 2 through 7 - outwards
Arduino pin : 5V GND D4 D5 D6 D7
*/
#define Ucc 2 // 5Volt
#define Gnd 3
#define Res 4 //reset pin - keep high
#define Dat 5
#define Clk 6
#define Cs 7 // active low
int temp, humi; // store temp and humidity
byte CRC; // read, but not checked
void setup()
{
// set pins direction
pinMode(Ucc,OUTPUT);
pinMode(Gnd,OUTPUT);
pinMode(Cs, OUTPUT);
pinMode(Res,OUTPUT);
pinMode(Clk,INPUT);
pinMode(Dat,INPUT);
// Power the module
digitalWrite(Gnd,LOW);
digitalWrite(Ucc,HIGH);
digitalWrite(Cs, HIGH); // not selected yet
// reset the chip
digitalWrite(Res,LOW); // reset sensor
delay(1);
digitalWrite(Res,HIGH); // start the sensor
delay(25); // allow sensor bootup time
// sensor is now reset and ready
Serial.begin(9600); // output to serial possible..
}
void readTheSensor() // can be reduced in code size
{
// to reduce chance of missing out data -> read/store -> calculate
byte val[3]; //temporary storage
digitalWrite(Cs,LOW); // enable sensor
// datasheet states 10ms nominal to clock/data start
delay(5); // 1/2 the wait. just a shot..
// now read 4 bytes
val[0]=shiftIn(Dat,Clk,MSBFIRST);
val[1]=shiftIn(Dat,Clk,MSBFIRST);
val[2]=shiftIn(Dat,Clk,MSBFIRST);
CRC=shiftIn(Dat,Clk,MSBFIRST);
// done reading - stop sensor - compile results
digitalWrite(Cs,LOW); // disable sensor
temp=val[0]<<8 + val[1];
humi=val[2];
digitalWrite(Cs,LOW); // disable sensor
// now - according to datasheet - remove 400 from temp
temp-=400;
}
void loop()
{
readTheSensor();
Serial.print("Temp ");
Serial.println(float(temp)/10.0,1);
Serial.print("Humi ");
Serial.println(humi);
Serial.println();
delay(1000);
}
it has the same uotput in the seral monitor ;(
if i move the pin n#2 and #3 in the pin +5V and GND the output never change... ;( ;(