Community
OpenEnergyMonitor

Community

Temperature sensing


(Robert Wall) #22

When I trace through the Dallas library, it appears I was wrong. I now think it returns -127 (Device disconnected) for a CRC error. The slightly misleading part is, it appears to return the same value for other faults too.

So it’s true to say that a CRC error is not discriminated in the emonTx sketch, but appears as an out-of-range error, and the previous reading is used.


(Robert Wall) #23

Discourse is the forum software.

In my browser, I can most certainly recognise it as HTML. The link to the post announcing the release is

<a class="" href="https://community.openenergymonitor.org/t/emonlibcm-version-2-01/9241">EmonLibCM - Version 2.01</a>

And inside that post, the download link is:

<a class="attachment" href="https://community.openenergymonitor.org/uploads/default/original/2X/6/638d9d8c37d12f623c59c6f1d1023c1f99d93f19.zip">emonLibCM.zip <span class="badge badge-notification clicks" title="4 clicks">4</span></a>

(Bill Thomson) #24

Because you have Javascript turned off.

Why one works, but not the other, I don’t know.


(Dave Howorth) #25

No, I have it turned on for this site.


(Brian Orpin) #26

Works fine for me. Discourse is a great platform for community sites. So many key players are using it. My only gripe is that it can be setup differently so, for example, using this site, node-red and HomeAssistant is different (how they link to and make available a list of latest posts). But a vast improvement of some of the older technologies.

However, you really need to use a browser in the ‘mainstream’ manner for it to work. They will never cater for the .001% and you cannot expect them to. Me, I use a load of different browsers, with different settings for different purposes and types of sites but YMMV.

Way OT…


(Dave Howorth) #27

Yeah, sorry. And apologies to all; it does look like a regular link (finger trouble late at night) BUT it still tries to create a popup. You have to middle-click on the link (to open in another tab) to see the problem. It doesn’t happen if I left click. It doesn’t happen if I right-click and select Open Link in New Tab. But it reliably occurs with middle-click. I haven’t found any other links where the problem occurs either, so this one appears to be special in some way. It’s the only one I’ve found posted in this particular way with an expandable text within it, so maybe it’s something to do with that. But I can’t be bothered chasing through all the CSS and JS. So we should get back to my original question …

I just tried plugging in a 5V USB PSU instead of the AC adapter but I’m not comfortable with the situation. Firstly the red LED stopped blinking every ten seconds, although emonCMS said it was being updated? And the log of my optical pulse sensor reset to zero, which I wasn’t expecting though isn’t a disaster. The temperature sensor gave some zero values.

The spikes seem to mainly occur at night - around or just after midnight and sometimes around 4 or 5 in the morning. Now those are times when my main power loads are switching - space & water heating - and there’s also a repeatable pattern in the mains voltage around midnight. It goes from very high before midnight (250 V plus) to low after midnight (around 244 V) - some of that may be my power draw but some is the DNO balancing its network I think.

So TL;DR I think the spikes in my temperature readings are induced by fluctuations in the power supply (insufficient filtering/isolation?)


(Paul) #28

So did the 5v psu make a difference to the spikes?

The led not flashing is due to the firmware (incorrectly) assuming you are running on batteries when the a.c. signal is missing (to extend batt life). If/when you remove the internal a.c. link the led should flash again.

The pulsecount will always reset at power up, when the reset line is gnd’d or at rollover, this is expected and emoncms whaccumulator processing is designed for such behaviour.

The 0 temp values at start up are not ideal and this is a known issue on both the emonth and emontx units.

If using a 5v psu to provide a more stable 3.3v to your temp sensors (via the 3.3v screw term) has not resolved the spikes entirely, try moving the temp sensor power wire to the 5v term (only at 5v when 5v psu used, not via AC or batt). This combats the DC voltage loss in the thin wires and long runs to the ds18b20s, I always power my ds18b20’s at 5v even when the data wire goes to a 3.3v (non 5v safe) io pin, this seems to be more reliable and has never caused any damage for me.

If I recall correctly, the pulse counter and temp sensors are powered by 5v on the emonpi via the rj45.


(Dave Howorth) #29

No idea, sadly. I tried it only briefly because of the perceived problems I mentioned. And it wasn’t at a time of day when spikes were likely.

Thanks for the explanation for the lack of flashes (pretty serious IMHO, since I’ve then got no indication the thing is working, apart from hiking back to the house and checking the screen). And for the annoying zero values. I’m sure I can patch those with my program if anybody could enlighten me on how best to reinsert patched data to a file.

I don’t want to move the temp connection to the RJ45 since that involves yet more wiring. It’s not a wire, it’s a pin on a DS18B20 but consequently there are no long wire drops to be accounted for. Don’t have an emonpi.

edit: and now I’m fairly convinced the spikes are down to power glitches because of hardware design issues, I’m not likely to try messing with the power supply again.


(Dave Howorth) #30

Here’s a couple of screenshots to illustrate what I mean, first an overview of a week and then a detailed view of last night.


(Frogmore42) #31

I would try a new/different DS18B20 sensor. I would get one that is pre-wired, unless you have excellent fabrication skills. What you are seeing looks more like a connection issue than a real power problem. I have had sensors almost work with the power pin disconnected. They are actually designed to work with parasite power, so they really are very low power and work at 3V3 or 5V without needing big/thick power wires. I have had one or two sensors go bad, but mostly it was because they got disconnected or corroded enough to be almost disconnected.


(Dave Howorth) #32

Thanks for the suggestion. I’ve been putting off any changes to that system since it involves dismantling the emonTx to make any changes. I plan to add some DS18B20 to my other emonTx and I plan to do those so its easier to make changes. But when I’ve added them, I’ll be able to see if they suffer from the same problem.

I haven’t got around to doing any of those changes yet, because I’ve been concentrating on integrating some weather data, which has proven a little tricky and has its own wrinkles to work out.

Also, I wrote a program that can clean up the data I’ve recorded from the dodgy DS18B20 so it’s not as though I’m losing anything by delaying. But I need to research the best way to update the cleaned data, as well as backfill some weather data.