### how do i intergrate temp + current

on my TX station i want to use the current sensors, however, also use the tempature sensors.

i figured out today how to use the temp sensors, using the device ID and to turn the reading from C to F.

going through the sketches (mind you, i'm slowly trying to figure out programming the AT mega, i know little, but understand programing somewhat.) i dont see one that intergrates all three (phase, temp, and current sensors)

doing some quick reading, most of the current sensors are based on 220 single phase, am i right?  as i want to measure 480 three phase, but i am going to monitor 4 lines that are split off of two legs.

the only things i have used were the sketches from the github.

also, with the low power nodes, do i need to find the Device ID for those as well?  i'm also trying to figure out where in the programing to turn the calculations from C to F.

quick run down of what i am doing, i have 2 TX stations and 2 remote low power nodes.  4 current, 2 temp sensors, to have 4 current and 4 temp.    i'm attempting to monitor tempature, 2 generation lines and 2 ups'ed lines in my datacenter.  (one of each in each server cab).  i have them all together, and have the PI running as well as pulling data from the remote Nodes.

guess i should also say hi :)  my first post!

### Re: how do i intergrate temp + current

Hello Mark, welcome.

You believe in jumping in at the deep end, don't you?

I see you're in USA. I assume your 3-phase supply is 480 V between lines, with earthed neutral? If it's what I would call a 6-phase supply (i.e. the supply transformer windings are centre-tapped and the centre taps are earthed), then life gets a lot more complicated). You have two choices. If you want accuracy, you need to measure the three phase voltages and the 3 line currents. (or maybe 6 voltages and 6 currents!) To do that you need 6 (12) analogue inputs. If you don't need great accuracy and the three phase voltages are well balanced, you can cheat and measure just one, delay that voltage in software and use it delayed by 120° for the second phase and 240° for the third. You of course need the right combination of transformer (voltage adapter) and resistors to correctly scale the voltage.

Once you've got your head around that problem ( ! ), it's a relatively simple matter to just add together the bits of code that do the various functions, and copying bits from the various sketches is the best way to start (but of course get each bit working individually first). Basically, there's temperature and 1 power here: emonTx_temperature_examples and 3 power/current readings here: and you need to pull the additional 2 currents/powers into the temperature sketch.

You turn °C into °F wherever you like, there's no right and wrong! I would normally do it immediately after you have read the value, simply to reduce the chance of inadvertently using the wrong value when you come to change the sketch in a year or two's time.

You'll find quite a lot of data in the Building Blocks section of the site, which should help you.

### Re: how do i intergrate temp + current

haha, yes that i do!   it is for a BS senior project,  i was given a task, and that task was to do telemetry or something to that effect with the Raspi my instructor said my project was ok!  i was initially wanting to just do temperature. however, once i saw that i can do current i thought of the possibilities.

i will look at those sketches again and see what i can  come up with in terms of that.

in regards to the three phase power, i'm not sure if its earth neutral, my guess is yes if its a US Standard, being a Govt Office.

i really am not too interested in measuring 3 phase, just really want to see the current in wattage (or amps if possible either or)   on 4 breakers, they  are, however, on three phase power.  does that kind of make sense?  unless i'm confused robert!

basing on your post  i may need min 6 or up to 12 inputs, i'm going to assume that you can not calculate wattage on each leg without calculating each phase?

also with the tempature, you would do just that in the inputs of eamon? or would you save it in the sketch itself

my other question is can you sense UPS battery voltages with the clip on sensors?  this may be what i might end up doing if i cant measure what i want with what equipment i have now.  if this is possible in the future i could also then monitor the battery voltage on our Generator which i would love to do as well.

### Re: how do i intergrate temp + current

You need to talk to the electricians who maintain the building to find out about the power supplies. Until you know, it will all be guesswork. I'm in the UK and I only know about UK practice.

If you need to measure "real power" (which is what you get charged for) accurately, then you need to measure the voltage on the associated wire as well as the current. The emonTx sketches that measure voltage do the correct sum to calculate "real power". If you're only interested in current, or only need a rough estimate of power, or only the "apparent power", then you may not need to measure all the voltages.

Each emonTx has a temperature input. It's a OneWire bus so you can daisy-chain many sensors and read them individually. The results need to be sent to your Raspi, of course.

You can't measure voltage with a split core current transformer! But does your UPS not have a data output that you can interrogate to get the battery state? I'd be surprised if it did not, and the servers might already have that information. If not, you'd probably need some fairly advanced programming to achieve that - something similar to the Elster meter interface.

Do you want to measure the generator starter battery? If so, that's probably a job for a separate emonTx for each generator as the presence of battery chargers will complicate matters. You'd need to design a d.c. voltage interface and not use the c.t. input if you use the emonTx as the starting point.

### Re: how do i intergrate temp + current

our UPS is actually close to 40 some years old i think.   our building was built in 73' ish  and i'm pretty sure it was installed around that time as well.

the individual ones we have in the data center do have a serial port and or USB built in, so that i have taken care of :)

i found the transformer breaker for our Datacenter, three power legs, a neutral and a ground is all i see, but i'll talk to our building dept about the power.    i should be fine just measuring those correct?  assuming i want to just measure datacenter usage.  but in the meantime i will have to figure out something else, perhaps humidity sensing in exchange for current.

nevertheless, i'm pretty happy with what iv'e done and seen so far :)

### Re: how do i intergrate temp + current

Robert, i found out our transformer that goes into the datacenter splits each line to 120 single phase power.

i  am sure i can do that without any issues right?

### Re: how do i intergrate temp + current

So you have a neutral at earth potential (or nearly so), and three phases each measuring 120 V line-neutral (and measuring 208 V between any two lines)?

If that's correct, then it's basically one emonTx per phase, as here. In addition you need 3 ac-ac voltage adapters to measure the voltages and 3 c.t's to measure the currents. If you want to measure more than the total per phase (e.g. individual racks) then this is the way to go as you have 3 current inputs per emonTx.

If you only want to measure the total, you could alternatively add two extra voltage channels to a single emonTx (the analogue inputs are available on headers, you'd need a handful of components on strip-board) and that would give you 3 channels each of voltage and current. It would necessarily sample each phase in turn, whereas the "Full-fat" project samples the phases concurrently.

If you want a really cheap solution, and provided the three phase voltages are relatively stable in relation to each other, then you might get by with one emonTx and just measuring one voltage and generating the two other voltages in software. But again, you have only 3 c.t. inputs so only the total can be measured. By presuming the voltage for the two phases that aren't measured, you will potentially lose accuracy. You need to judge whether this is important.

In each case, you would have voltage, current, real power, apparent power and power factor for each phase, and a temperature input. The values you measure would need combining to give you the total for the entire data centre.