• Home
  • About Me
  • Awards
  • Designs
  • Microcontrollers
  • Education
  • Heat meter
  • Contact

Computer support, program development, prototypes , microcontrollers

Hire Me

I will support your computer
or I will develop a new computer program
or I will design a new microcontroler based device for your needs
info@kalarakis.gr

kalarakis' Awards & Projects

Heat meter Calori meter

 

Ένα θερμιδόμετρο αποτελείται από ένα μετρητή ροής του νερού και δύο θερμόμετρα. Οι θερμίδες που απορροφά ένας χώρος για να ζεσταθεί - η εργασία αφορά μόνο την θέρμανση , αλλά παρόμοια είναι και η ψύξη- είναι ανάλογος του όγκου του νερού που διέρχεται από τα θερμαντικά σώματα και της διαφοράς της θερμοκρασίας εισόδου και εξόδου του νερού.

Ο επεξεργαστής που χρησιμοποιώ στην κατασκευή αυτή είναι ο MSP430FR6989  Ο επεξεργαστής έχει ενσωματωμένη την μονάδα ανίχνευσης της ροής του νερού ενώ η θερμοκρασία μπορεί να μετρηθεί με τον συγκριτή. Όλες οι μονάδες λειτουργούν αυτόνομα με βάση το ρολόι 32768Hz, προκειμένου να ελαχιστοποιηθεί η κατανάλωση ενέργειας. Οι μετρήσεις απεικονίζονται στο LCD (varitronix VIM-878) που ενσωματώνει η κατασκευή. Κατά την ανάπτυξη του κώδικα υπολογίστηκε ότι  η συνολική κατανάλωση είναι 120μΑ , με μπαταρία 3ν 2000mA (Varta CRΑΑ 3v lithium) με διάρκεια λειτουργίας τα 8 χρόνια. Για 8 χρόνια συνεχής λειτουργίας πρέπει το LCD να ανάβει για 1sec  και να παραμένει σβηστό το επόμενο sec πριν δείξει την επόμενη ένδειξη. Προσωπικά προτιμώ να μην σβήνει το LCD

Έγιναν δύο υλοποιήσεις α) πλήρη υλοποίηση (μπλε πλακέτα) που ενσωματώνει

  • υπέρυθρη επικοινωνία
  • σειριακή επικοινωνία (57600bps )
  • EEprom με ενσωματωμένη MAC address (οι ρουτίνες έχουν δημοσιευτεί στο Hackster.io)
  • ένα led ενδεικτικό με βραχυκυκλωτήρα για debugging
  • ενα push button γενικού σκοπού και reset button
  • ανοικτού συλλέκτη μονάδα παλμών για ενεργοποίηση εξωτερικών συσκευών
  • Υποδοχή για LCD I2 της Haven (οι ρουτίνες έχουν δημοσιευτεί στο Hackster.io)
  • δυο εισόδους για αισθητήρια PT 1000 για την μέτρηση της θερμοκρασίας του νερού
  • Μονάδα μέτρησης του όγκου του νερού με βάση τη μονάδα Extend scan interface.
  • Β) απλή υλοποίηση (πλακέτα magenta) που περιλαμβάνει μόνο τα απαραίτητα στοιχεία για την υλοποίηση του θερμιδόμετρου. Τα στοιχεία αυτά είναι
  • Μονάδα μέτρησης του όγκου του νερού με βάση τη μονάδα Extend scan interface.
  • δυο εισόδους για αισθητήρια PT 1000 για την μέτρηση της θερμοκρασίας του νερού
  • μονάδα σειριακής επικοινωνίας.
  • ενα push button για μηδενισμό των ενδείξεων κτλ
  • reset button
  • Ο κώδικάς λειτουργίας είναι ίδιος και στις δύο υλοποιήσεις. Στην απλή υλοποίηση έχει αφαιρεθεί ο κώδικας για τις μονάδες που δεν περιλαμβάνει η υλοποίηση.

Η διάρκεια της μπαταρίας υπολογίζεται στα 8 έτη για την απλή υλοποίηση ενώ για την πλήρη υλοποίηση τα 4 χρόνια ανάλογα τα περιφερειακά που έχουν ενεργοποιηθεί. Την διάρκεια της μπαταρίας μειώνει η ενεργοποίηση του LCD αλλά προσωπικά μου αρέσει να μην σβήνει το LCD κατά την μετάβαση από την μια ένδειξη στην επόμενη.

Οι ενδείξεις που δίχνει το LCD είναι :

  • 88888888 (όλα τα ψηφία λειτουργούν κανονικά)
  • 0.123  τα gwatt που έχει μετρήσει
  • τα κυβικά νερού
  • bA 2.99  * η τάση της μπαταρίας,  το * σημαίνει ότι η συσκευή σε αυτό το sec που παραμένει η ένδειξη της μπαταρίας έχει ενεργοποιήσει το υπέρυθρο δέκτη. Το υπέρυθρο module χρειάζεται 170μΑ σε λειτουργία και 50μΑ σε κατάσταση standby. Για το λόγο αυτό το απενεργοποιώ πλήρως και το ενεργοποιώ μόνο για ένα sec κατά την ένδειξη της μπαταρίας.
  • Η 80.7 η θερμοκρασίας εισόδου  -Ζεστό νερό
  • C 70.2 η θερμοκρασία εξόδου -Κρύο νερό
  • 0,845  στροφές της φτερωτής σε χιλιάδες
  • Οι Υπολογισμοί γίνονται μόνο όταν υπάρχει ροή νερού προκειμένου να εξοικονομηθεί ενέργεια Όσο περισσότερο κοιμάται ο κεντρικός επεξεργαστής τόσο περισσότερο θα διαρκέσει η μπαταρία. Ερώτηση: πόση ενέργεια θα εξοικονομηθεί από αυτό; Έχοντας υπόψη ότι η συσκευή αυτή θα λειτουργεί στο Ηράκλειο της Κρήτης, Ελλάδα που είναι μια ζεστή χώρα με ανάγκες θέρμανσης από τα τέλη Νοεμβρίου έως τις αρχές Απριλίου – περίπου 5 μήνες ανά έτος- η ροή νερού θα είναι μηδενική για τους υπόλοιπους μήνες ΑΡΑ δεν χρειάζεται να δαπανάται ενέργεια για υπολογισμούς που δεν θα επιφέρουν αλλαγή στις ενδείξεις. H τάση της μπαταρίας μετριέται μόνο όταν η ένδειξη που θα εμφανιστεί στο LCD είναι η τάση της μπαταρίας.

Στην πλήρη υλοποίηση έχουν ενεργοποιηθεί όλα τα περιφερειακά δηλ μπορεί να προκύψουν νέες υλοποιήσεις -πλακέτες- απενεργοποιώντας τα περιφερειακά που δεν είναι απαραίτητα.

Δεν θα αναφερθώ διεξοδικά στον κώδικα γιατί

η Τι.com έχει βατά παραδείγματα τα οποία έχω ενσωματώσει στον κώδικά. Δείτε την εφαρμογή FlowESIGUI.jar της Ti.com Θα σας δώσει τον κώδικα που θα χρησιμοποιήσετε για την ανίχνευση της ροής.

Στο Hackster.io έχω δημοσιεύσει τον κώδικα που αφορά την EEprom και το LCD της Haven τα οποία μπορεί να χρησιμοποιήσετε.

Η μέτρηση της θερμοκρασίας γίνεται με comperator. Δείτε την αντίστοιχη εφαρμογή της Ti.com. Πρέπει να έχουμε υπόψη μας ότι μετράμε τους παλμούς ενός timer μέχρι να εκφορτιστεί ο πυκνωτής αναφοράς μέσω των PT1000 σε σχέση με τους παλμούς που έχουμε μετρήσει σε μια αντίσταση αναφοράς. Στην δικιά μου εφαρμογή η αντίσταση αυτή είναι 1.8Κ και ο πυκνωτής 0.1u Η μέτρηση της θερμοκρασίας δεν είναι ακριβής αλλά το παραγόμενο λάθος αφορά και τα δύο αισθητήρια. Ούτως ή άλλως για την μέτρηση των θερμίδων που καταναλώθηκαν στο διαμέρισμα χρειαζόμαστε την διαφορά της θερμοκρασίας του νερού, εισόδου – εξόδου.

Πρέπει να έχετε υπόψη σας ότι ο επεξεργαστής για να εξοικονομεί ενέργεια και να επεκτείνει την ζωή της μπαταρίας χρησιμοποιεί το κρύσταλλο των 32768Ηz άρα πρέπει να αποφύγετε τις πράξεις με δεκαδικούς. Όλα τα περιφερειακά λειτουργούν ανεξάρτητα από την κεντρική μονάδα και αν έχουν «κάτι να πουν» τότε χρησιμοποιούν τα interrupts. Αφού εξυπηρετηθεί ένα interrupt  ο επεξεργαστής πρέπει να τεθεί σε νάρκη. Θα τον ξυπνήσει με interrupt το περιφερειακό που θα χρειαστεί τις «υπηρεσίες του»
 

Ο χρόνος μέσα στο πρόγραμμα είναι το  1 sec Γιατι; Δείτε τις εξισώσεις υπολογισμού των θερμίδων Ερώτηση : πόση ενέργεια χρειάζεται για να ζεστάνω 80gr νερό από του 26ο C στους 48ο C ;

Water Quality of heat transfer =4,184j/gc

e= m qht ΔΤ  = 80gr  X 4,184 j/gc  X (48-26)C = 80 x 4,184  x  22 = 7363,84 joule

Watt=Joules/Sec  1Joule=1watt * 1sec=> 1watthour=3600Joules

1calorie=4,184 Joule  1KWh=860Kcal
1KJoule=0,239Kcal

Δεν έχω υλοποιήσει την διαδικασία αλλαγής της μπαταρίας. Τώρα με το άναμμά, η συσκευή μπαίνει σε κατάσταση αναζήτησης του μέγιστου και ελάχιστου στο ESIScan interface Η ροή νερού θα περιστρέψει την φτερωτή του υδρόμετρου , σε 1 sec θα ολοκληρωθεί η βαθμονόμηση και η συσκευή θα μπει σε κανονική λειτουργία.

Για την ανάπτυξη χρησιμοποίηση το αναπτυξιακό της Τι.com EXP430FR6989
Χρησιμοποίησα το σχηματικό του προκειμένου να δώσω στην πλακέτα τη μορφή που χρειάζεται η δικιά μου υλοποίηση. Η πλακέτα είναι 4ων στρωμάτων. Το σχηματικό είναι σε eagle.

Δείτε περισσότερα στο hackster.io ,
λήμα ΚΑΛΑΡΑΚΗΣ
hackster.io

A calorimeter consists of a water flow meter and two thermometers. The calories absorbed in a flat - this paper is for heating, but cooling is similar - are proportional to the volume of water passing through the radiators and the difference between the inlet and outlet temperatures of the water.heat meter, magenta and blue PCB

The processor I use in this project is MSP430FR6989 The processor has a built-in water flow detection unit while the temperature can be measured with the comparator. All units operate autonomously based on the 32768Hz clock, to minimize power consumption. The measurements are displayed on the LCD (varitronix VIM-878) that the project incorporates. During the development of the code, it was estimated that the total consumption is 120μA, with a 3v 2000mA battery (Varta CRAA 3v lithium) with a service life of 8 years. For 8 years of continuous operation, the LCD must be on for 1sec and remain off for the next sec before showing the next display. I prefer not to turn off the LCD.

Two implementations were made

a) complete implementation (blue PCB) that integrates

 infrared communication

 serial communication (57600bps)

 EEprom with built-in MAC address (routines published on Hackster.io)

 a led indicator with a jumper for debugging

 a general-purpose push button and reset button

 open collector pulse unit for activating external devices

Haven LCD I2 slot (routines published on Hackster.io)

 two inputs for PT 1000 sensors to measure water temperature

 Unit of measurement of water volume based on the unit Extend scan interface.

B) simple implementation (magenta PCB) that includes only the necessary elements for the implementation of the calorimeter. These data are

 Unit of measurement of water volume based on the unit Extend scan interface.

  1. two inputs for PT 1000 sensors to measure water temperature
  2. serial communication unit.
  3. a push button to reset the indicators etc
  4. reset button

The operation code is the same in both implementations. In the simple implementation, the code for the units not included in the implementation has been removed.

The battery life is estimated at 8 years for simple implementation while for full implementation 4 years depending on the peripherals that have been activated. Battery life is reduced by activating the LCD but I like that the LCD does not turn off when switching from one indicator to the next.

The indications shown by the LCD are:

  1. 88888888 (all digits work normally)
  2. 0.123 GWatt measured
  3. cubic meters of water
  4. bA 2.99 * the battery voltage, the * means that the device in this sec has activated the infrared receiver. The infrared module consumes 170μA in operation and 50μA in standby mode. For this reason, I turn it off completely and turn it on only for one sec when the battery voltage is displayed.
  5. 80.7 inlet temperature - Hot water
  6. C 70.2 the outlet temperature -Coldwater
  7. 0845 impeller rpm in thousands

Calculations are made only when there is a flow of water to save energy. The longer the CPU sleeps, the longer the battery will last. Question: how much energy will be saved from this? Considering that this device will operate in Heraklion, Crete, Greece which is a warm country with heating needs from the end of November to the beginning of April - about 5 months per year - the water flow will be zero for the remaining months. "No way" to spend energy on calculations that will not change the indications. Battery voltage is measured when the LCD indication is the battery voltage.

In the full implementation, all the peripherals have been activated, ie new implementations may occur - PCBs- deactivating the peripherals that are not necessary.

I will not go into detail in the code why

 Ti.com has fine examples which I have incorporated into the code. View Ti.com's FlowESIGUI.jar application It will give you the code you will use to detect the flow.

 On Hackster.io I have published the code for EEprom and Haven LCD which you can use.

 The temperature is measured with a comparator. See the corresponding application of Ti.com. We must keep in mind that we measure the pulses of a timer until the reference capacitor is discharged through the PT1000 in relation to the pulses we have measured in a reference resistance. In my application, this resistor is 1.8K and the capacitor 0.1u The temperature measurement is not accurate but the error produced concerns both sensors. In any case, to measure the calories consumed in the apartment, we need the difference in water temperature, inlet-outlet.

 Keep in mind that the processor uses the 32768Hz crystal to save power and extend battery life so you should avoid decimal calculations. All peripherals operate independently of the central unit and if they have "something to say" then they use the interrupts. After an interrupt is served the processor must be put to sleep. The peripheral that will need its "service" will wake him up with an interrupt

 The time base in the program is 1 sec Why? See the equation for calorie calculation. Question: how much energy does it take to heat 80gr of water from 26ο C to 48ο C?

Water Quality of heat transfer = 4,184j / gc

e = m qht ΔΤ = 80gr X 4, 184 j / gc X (48-26) C = 80 x 4, 184 x 22 = 7363, 84 joule

Watt = Joules / Sec 1Joule = 1watt * 1sec => 1watthour = 3600Joules

1calorie = 4, 184 Joule 1KWh = 860Kcal
1KJoule = 0, 239Kcal

(, means deciamal place )

I have not implemented the function of changing the battery. Now on power on, the device enters the function of maximum and minimum in the ESIScan interface. The water flow will rotate the water meter impeller for 1 sec and the calibration will be completed Then the device will be in normal operation.

For development, I use the Ti.com EXP430FR6989
I used its schematic to setup  the PCB that my application needs. The PCB is 4 layers. The schematic is in eagle.

read more at hackster.oi , search for KALARAKIS
hackster.io

Follow me on YouTube   Follow me at   hackster.io