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
Ένα θερμιδόμετρο αποτελείται από ένα μετρητή ροής του νερού και δύο θερμόμετρα. Οι θερμίδες που απορροφά ένας χώρος για να ζεσταθεί - η εργασία αφορά μόνο την θέρμανση , αλλά παρόμοια είναι και η ψύξη- είναι ανάλογος του όγκου του νερού που διέρχεται από τα θερμαντικά σώματα και της διαφοράς της θερμοκρασίας εισόδου και εξόδου του νερού. Ο επεξεργαστής που χρησιμοποιώ στην κατασκευή αυτή είναι ο MSP430FR6989 Ο επεξεργαστής έχει ενσωματωμένη την μονάδα ανίχνευσης της ροής του νερού ενώ η θερμοκρασία μπορεί να μετρηθεί με τον συγκριτή. Όλες οι μονάδες λειτουργούν αυτόνομα με βάση το ρολόι 32768Hz, προκειμένου να ελαχιστοποιηθεί η κατανάλωση ενέργειας. Οι μετρήσεις απεικονίζονται στο LCD (varitronix VIM-878) που ενσωματώνει η κατασκευή. Κατά την ανάπτυξη του κώδικα υπολογίστηκε ότι η συνολική κατανάλωση είναι 120μΑ , με μπαταρία 3ν 2000mA (Varta CRΑΑ 3v lithium) με διάρκεια λειτουργίας τα 8 χρόνια. Για 8 χρόνια συνεχής λειτουργίας πρέπει το LCD να ανάβει για 1sec και να παραμένει σβηστό το επόμενο sec πριν δείξει την επόμενη ένδειξη. Προσωπικά προτιμώ να μην σβήνει το LCD Έγιναν δύο υλοποιήσεις α) πλήρη υλοποίηση (μπλε πλακέτα) που ενσωματώνει
Η διάρκεια της μπαταρίας υπολογίζεται στα 8 έτη για την απλή υλοποίηση ενώ για την πλήρη υλοποίηση τα 4 χρόνια ανάλογα τα περιφερειακά που έχουν ενεργοποιηθεί. Την διάρκεια της μπαταρίας μειώνει η ενεργοποίηση του LCD αλλά προσωπικά μου αρέσει να μην σβήνει το LCD κατά την μετάβαση από την μια ένδειξη στην επόμενη. Οι ενδείξεις που δίχνει το 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 Δεν έχω υλοποιήσει την διαδικασία αλλαγής της μπαταρίας. Τώρα με το άναμμά, η συσκευή μπαίνει σε κατάσταση αναζήτησης του μέγιστου και ελάχιστου στο ESIScan interface Η ροή νερού θα περιστρέψει την φτερωτή του υδρόμετρου , σε 1 sec θα ολοκληρωθεί η βαθμονόμηση και η συσκευή θα μπει σε κανονική λειτουργία. Για την ανάπτυξη χρησιμοποίηση το αναπτυξιακό της Τι.com EXP430FR6989
|
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. 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.
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:
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 (, 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 |