I have built an Emontx shield to transmit data to my RFM12Pi
I am successfully receiving data but I am having trouble understanding it. I believe I need to remove the extra burden sensor I have fitted to my CT clamp ( I was incorrectly following the Effergy setup). this will give me the wrong values for power and KWH.
The clamp is plugged in to CT1 on the shield.
I am using a BT answer phone power supply marked as 9v~ 400mA, for a power reference. This is plugged into the socket on the shield and the Arduino uno r3 is powered from a 5vdc 1a power adaptor via USB.
I have connected a DS18B20 sensor via a 10m cable to the sensor point on the board. I want to use more sensors but was hoping to prove it worked.
Can I attach more DS18B20 sensors and can I use one of the 3.5mm ct sockets for this?
I have hopefully attached an image of the input received at emoncms.org
I don't understand the results I can only guess.
id 7352 node 1_1 shows 0 without change
id 7353 node 1_2 shows data in the region of 13 - 23 (could be temp but it is too high)
id 7354 node 1_3 shows 0 without change
and Id 7355 node 1_4 shows data in the region 60-70
I was expecting to see temp in the region of 5-13c (garage temp) and power about 220v, kwh I'm not sure
Could I have some help interpreting this data please.
Re: Asking for help understanding inputs and temp sensor question
Odd?? that posted twice please could one be deleted. I only clicked once honest
Re: Asking for help understanding inputs and temp sensor question
Hello carlvk, is your BT power supply AC voltage output?
Re: Asking for help understanding inputs and temp sensor question
I believe so normally the the ac to ac adaptor are usually marked as such or this "~" symbol
it is this one
http://www.tabletchargersandcases.co.uk/bt-item-code-871538-9v-400ma-ac-...
Re: Asking for help understanding inputs and temp sensor question
Regarding your DS18B20 question, check my last 2 posts of this thread: http://openenergymonitor.org/emon/node/1380
I attached a example to measure multiple DS18B20's
You use the input for the DS18B20 for all of your sensors (the one with the 4k7 resistor). You can hook them up in parallel. Only read out the device address first so you are able to identify them.
Re: Asking for help understanding inputs and temp sensor question
Just chiming in here, but if you measure the output of the power supply with your multimeter set to DC, then AC, you'll know for sure if it's AC or DC.
The AC signal is needed at the emontx to work out the power factor; I believe the emontx firmware outputs power readings by default, so if its expecting an AC voltage signal, but getting a DC one, all the power readings will be close to zero.
I was just working though all this a few nights ago; I had an issue with multiple Arduino library directories loading conflicting pin definitions for my current sensors, and wasn't reading the pins I thought I was. A careful look through the firmware helped a lot.
I'm pretty new to this stuff, so your mileage may vary, but I hope this helps.
Wade
Re: Asking for help understanding inputs and temp sensor question
I will check the power supply and try fluppie's example. I am not sure how to check the firmware for conflicts but I will give it a try.
Thanks all I am sure I will be back with more questions soon like ;
if all was working correctly what would I likely see on the node? is node 1_1 always linked to power and 1_2 to kwh and so on or am I missing the point.
Re: Asking for help understanding inputs and temp sensor question
Your inputs should look like this. All 4 values are DS18B20's.
Re: Asking for help understanding inputs and temp sensor question
Aha and you then process those inputs and they are converted to temp in c?
Re: Asking for help understanding inputs and temp sensor question
Yes indeed, this is a example how I process/log my temperatures. Don't know if this is "right". I'm new to emonCMS myself.
Re: Asking for help understanding inputs and temp sensor question
edited to hide traces of gross stupidity
Emontx and txshield scripts are not interchangeable.
Re: Asking for help understanding inputs and temp sensor question
Great stuff !
I am now seeing regular current and power data coming into the Pi, I am not convinced it is accurate but that may well be down to my dodgy clamp (new one ordered from the shop).
I want to try and get the temp data added to the txshield scripts, my efforts so far wont compile.
Does anyone have an idea where to start. I am a total Arduino noob, but want to learn.
Can I add (paste) the temp sensor code into the Txshield code and add the required libraries?
I do realise that teaching me to code is beyond asking too much but I think I can make a fair job if I am given a few tips here and there.
Also
I have noticed that the data was being pushed to emoncms.org this morning but the one of the feeds wasn't working
now nothing has updated for 6hrs is there a problem with the site?
Thanks
Carl
Re: Asking for help understanding inputs and temp sensor question
"I am not convinced it is accurate"
Have you calibrated it? The c.t., v.t. and resistors all have manufacturing tolerances that contribute to inaccuracy. You need to check voltage and current displayed against those measured with a known accurate meter, and adjust the calibration coefficients to get the correct result.
"Can I add (paste) the temp sensor code into the Txshield code and add the required libraries?"
That should work, but you will probably (I've not checked and I'm not yet familiar with the shield) need to change the I/O pin numbers to suit. Note you need to run a second sketch (which might also need to patch similarly) once only to get the sensor addresses to plug in to your 'production' sketch.
Re: Asking for help understanding inputs and temp sensor question
This is is what I have so far.
I haven't had enough time to try it out yet any notes welcome
Retried
https://www.dropbox.com/s/zhzytotmkc0ipyf/emonshieldtemp%20tx1.txt
Re: Asking for help understanding inputs and temp sensor question
You appear to have posted a link to the file rather than the file itself
Re: Asking for help understanding inputs and temp sensor question
OK I am seeing some progress
The script uploads
and I can upload the address script .
Both scripts show the temp data as
#define ONE_WIRE_BUS 4 // Data wire is plugged into port 2 on the Arduino
but the the wiki shows the temp data for the TXShield on dig4
what should the correct line read please.
Re: Asking for help understanding inputs and temp sensor question
I know I am blundering around in the dark here.
I think I got the address of the one sensor I am testing using the address search sketch.
It wasn't the same length though? it was one set shorter than the ones in the original.
I put it into the sketch and ran it but I still cant see any temp data.
everything else is working fine though.
I would be most grateful if someone could pitch in here and Help.
Re: Asking for help understanding inputs and temp sensor question
here is a link
https://www.dropbox.com/sh/n1apqvqep9ryqlt/su2oW3e-0D
Re: Asking for help understanding inputs and temp sensor question
No one?
have I broken some rules?
Is there no support for temp sensing on the emon sheild?
Re: Asking for help understanding inputs and temp sensor question
Do not get impatient. People contribute to these forums in their free time, There can be 3 reasons why you have not got an answer:
I don't think it is No.3, so choose no.1 or no.2.
Now that I've got a few minutes spare, I can't see in your code where you are trying to read the temperatures, so is that what you have not done correctly?
I suggest you look hard at the EmonTx temperature sketch and copy all the lines of software that relate to the One-wire bus and temperature into similar places in the Shield sketch.
Where are the lines like these in your code:
sensors.requestTemperatures(); // Send the command to get temperatures
emontx.T1 = sensors.getTempC(address_T1) * 100;
emontx.T2 = sensors.getTempC(address_T2) * 100;
emontx.T3 = sensors.getTempC(address_T3) * 100;
emontx.T4 = sensors.getTempC(address_T4) * 100;
(You only need all 4 if you have 4 sensors).
I too don't believe the value you have for DeviceAddress address_T1 - there are only 7 words, not 8. That is surely wrong, so is having the same address for T3 & T4.
I have only one sensor, the address of mine is 0x28, 0x94, 0x82, 0xE0, 0x03, 0x00, 0x00, 0x96
Re: Asking for help understanding inputs and temp sensor question
Hi
When you have uploaded the temperature search sketch open the serial monitor. Unplug the data cable from the emontx. wait a second then replace the plug. You should then see the correct device address. If you just open the serial monitor after you have uploaded there is a good chance you will miss some of the data.
Regards
Ian
Re: Asking for help understanding inputs and temp sensor question
Thanks for the replies
I apologise for my impatience I guess I am getting a bit stressy with this.
The good news is It works YAaaay
thanks for your help
https://www.dropbox.com/sh/n1apqvqep9ryqlt/su2oW3e-0D
please find the files for the next person who wants them
Re: Asking for help understanding inputs and temp sensor question
Hi
Its often useful to post what the solution to your problem was, even if its a dumb mistake. It might help the next person that makes the same mistake.
Regards
Ian
Re: Asking for help understanding inputs and temp sensor question
Ian,
Noting your comment about timing, I routinely add delay(7000); at the top of every setup( ) function to give me time to start the monitor.
Re: Asking for help understanding inputs and temp sensor question
I would like to thank you again for your help
I checked the lines of code you mentioned Robert. I compared the two sketches, emonttx temperature and my kludge. I cut and pasted the lines that you pointed out to the sketch and compiled it
I loaded the temp search data again and pressed restart ( to allow the monitor to get it all) on the Arduino and got a full code.
I added the correct address into my sketch and uploaded it to the Arduino
I immediately saw some temp data coming in I checked this with a thermometer and it was good data.
I then repeated the process with a second DS18B20 temperature sensor. I wired one to the HW tank and another to the hall outside.
I can now see HW temp, house temp, power and current.
I have wired a trailing "stereo Audio socket" to the board where the temp sensor is normally fitted, I then used shielded audio cable to attach one DS18B20. Having proved the concept I then extended the cable with a second sensor.
I plan to fit another two sensors to monitor other parts of the house. This time I will try an audio "Y" adaptor just after the board socket and route a second set of sensors to that.
I still need to calibrate the readings for power. and work out why a 3kw kettle adds 20 amps to the data, but I am proceeding one step at a time, waiting for the ct clamp from the shop,
This is the first time I have attempted anything like this, so I am making lots of newbie errors and spending hours learning things that take the more experienced eye seconds to spot. Hence the stressy bit. ;)
Re: Asking for help understanding inputs and temp sensor question
I would caution against using a 'Y' connector on the temperature sensors. They are sending digital data and there is a slim possibility that you will end up with a critical length that causes the signal to be reflected and cancel itself. This is not likely to be a problem if the cables are short, but it would be better to wire in 'daisy-chain' - looping from one sensor to the next.
Re: Asking for help understanding inputs and temp sensor question
I have seen this caution before, it seems that it may be possible to do it this way and if the result suffer from signal reflection I can try a few adjustments before I go the other way and extend the cable on the other sensors. I have about 7 meters of cable in at the moment, to get the other rooms in a loop I will need about 30m.
I have also read on here that too long a cable can cause issues so I thought I would try it the easy way( for my installation) first. Each time I try something and fail in this way I learn a lot about the system I am working with, it may seem less productive, but it helps to fix the lessons in my mind.