Friday, April 12, 2019

Week 14 - Final Update

Hello

This is going to be my final update for my Capstone blog as today I was demonstrating to visitors. My Capstone project is not nearly as complex as some of the others, but this is more due to the fact that I did my project alone while the more complex ones were group projects.

I liked working on this project. Sure there were some of those days were I didn't really get any results, but that's okay. Things happen. They don't work. Nothing's perfect. This project really was a learning process for me as I had to understand and really know what I was doing with one component before I went on to the next step. If I didn't understand the Electricity Meter and the Current Transducer, I could not program them in the EasyIO. 

Thank you for reading my blog. 

-Valentin

Friday, April 5, 2019

Week 13 Update - EasyIO LIve Charting

Hello

Today I created a new graphics page on the EasyIO with the intention of having a chart and graph that tracks the changes in the values from my previous graphics page and here they are below both in CPT and in the web page.




Just like last week, this wasn't difficult. Just drag, drop, and set your preferences. Below I have screen shots showing the settings for the Chart and for the Line Graph.





The settings are similar to what was done last week the actions are just using the outputs of the Write Floats I created. The columns and lines are simply the string values that come from the outputs of those same Write Floats. Other than that I think it's really cool that I can create some simple graphics in CPT and then with a quick deploy I can view them in real-time on the web. I can see the changes live in the Meter Dashboard I created or I can go to my Trend Graph and see the changes in values via the chart or the line graph.

My professor wanted me to try what I did this and last week but with a BASpi. I thought about it and it may be possible, I just do not see a point in it. Why try to do the same thing, especially recreate the graphics on inferior hardware? I mean I could connect 2 EasyIOs together and transfer data using BACnet and then connect in a BASpi. I might be able to transfer over my program. But, again inferior hardware and I already had a bad experience working with the BASpi. Honestly, I just don't see a point as I have a hunch that my values will not be the exact same as on the EasyIO.

-Valentin

Friday, March 29, 2019

Week 12 Update - EasyIO Graphics




Hello

Today I was able to create my own custom graphics in the EasyIO and preview them live on the web as a dashboard. Here's how I did it. Below is my program which as you can see has some new additions.





I added in some WriteFloat values added to the CTVolts, Current, Watts, and MeterTr blocks which were later used for creating the graphics. You'll also notice that WriteF1 has it's value dropped from 0.57 to 0.33 because when I turned on everything on the station and opened up the program. I found that my MeterTr was displaying a way higher value than on my Electricity Meter. So, I doubled checked all the connections and it seemed that nothing was unplugged from last week so I just played with the value of that particular Write Float so that that MeterTr displayed the same value as on my Electricity Meter.

Anyway, to create my graphics I created a new graphics page and called it "Meter Dashboard". I would drag and drop the new Write Floats I made into my "Meter Dashboard" Graphics page and I would first configure the actual graphic and then the label. I used a Gauge to represent my Electricity Meter reading and 3 bars to represent Current Transducer Voltage, Current, and Watts. Below are screenshots showing the Graphics page then when deployed, you hit preview to see your graphics live on the web.





It's not every difficult to create the graphics. As you simply drag and drop the Write Float values and configure your options. Below are the options you configure when making the actual graphic. I will go through what you need to do for each screenshot.




For the link, you're just setting up the graphic to be whatever page you created. 


For the action you need to link it to the Write Float.

You need to set your parameters and for the graphic your input data is just a string.


Again for the graphic, you input data is the output of the Write Float and should be a string.

Below are the options you configure for the label, you can see they are slightly different. 


For the label, you need to slink it the Write Float.


You set up parameters such as text size and your text which will not a string, but whatever you want the label to display.


Again your output isn't a string this time, but whatever you want your label to display.


Again set up your label to be on the graphic page you created.

I would also like to point out that when you do a full deploy for your graphics, there will be a pop-up for username put: webuser and for password put: 123456. After you deploy, you hit preview. For username put: admin and for password put: hellocpt. Inside the EasyIO, there should be a microSD card similar to the RaspberryPi which is needed for deploying the graphics, mine already 1 installed. Instead of hitting preview to see your graphics in the web, you can just go to a web browser and type in the IP Address of your EasyIO.

-Valentin

Friday, March 22, 2019

Week 11 Update - Current Transducer and EasyIO (Cont'd)

Hello

Turns out the current I got at the end of my Sedona program was not the correct value. That's why today I'll do some quick calculations because you always need to come with a value otherwise you have nothing for comparison.

Desired Current = 272 Watts/120 Volts
Desired Current = 2.266 Amps

This is the Theoretical Current and after that I then measured the Voltage coming out of the Current Transducer and calculated the Actual Current that I should see at the end of my program.

Actual Current = 0.35 Volts X 2
Actual Current = 0.7 Amps

I made sure to have everything on the bench turned on to take an accurate reading because the Actual Current is way higher than my Desired Current. However, when I opened up the Sedona program, my CTVolts was reading 0.96 Volts and I went back to confirm the reading on my DMM and got a similar reading.




My professor wanted to see what the Wattage actually was and got me the Electricity Meter. So I plugged it in and got a reading of 235 Watts rather than 272 Watts, but that doesn't matter.





So, I got to work in Sedona modifying my program to reflect the new readings and display the same Wattage reading as on the Electricity Meter. You can see the program below:





Just like last week, I will go through the program to explain how it works:

CTVolts (UI7): This is the Voltage coming from the Current Transducer, in this case it's 0.95 Volts
WriteFl: A float value with the value of 2 in this case.
Mul2: A multiplayer taking CTVolts and WriteFl (0.95 X 2) to get 1.90 which is my Current.
Current (UO1): The current which is 1.90 Amps.
Mul21: A second multiplier which takes CTVolts and Current (0.95 X 1.90) to get 1.80 which is the Watts because according to Ohm's Law. Watts = Volts X Current.
Watts (UO2): The calculated Wattage value which is 1.80 Watts.
WriteF1: A second Float Value which is 0.57.
Add2: An adder which takes Watts and WriteF1 (1.80 + 0.57) to get 2.37 which is close to what the Electricity Meter was reading. We're almost there.
MeterIn (Meter Initial, UO3): This displays the same value as from the Adder which is 2.37. This is the initial value from the Meter that's not what my professor wanted. He wanted my program to display a number that was the same as the reading on the Electricity Meter.
WriteF2: A third Float Value which is 100.00
MeterTr (Meter True): A multiplier that displays the same displays the same number as one the Electricity by multiplying MeterIn by WriteF2 (2.36 X 100) to 236.18 Watts

Now, I set forth on creating graphics to display the values from my program. Here they are below:



I put in 2 gauges. 1 for Meter Initial and Meter True. I put in 3 bars, 1 for Current Transducer Voltage, 1 for Current, and the last one for Watts. I just wanted to drag, drop, and link the values from my program to these graphics. But, apparently that doesn't work. Am I missing something? Is there something I don't understand? It's not a big deal. Next week, I'll get a classmate to help me finish the graphics.

- Valentin

Friday, March 15, 2019

Week 10 Update - Current Transducer and EasyIO




Hello

Last week, I ran into a roadblock where my Multi-Meter and the BASpi web interface where not displaying the same value and I did not know why. So what I'm thinking of doing this week is replace the 40 Watt Bulb with a 50 Watt Bulb like I used a couple weeks ago and seeing if my Multi-Meter and BASpi will display the same value. If so, I will do but with a 100 Watt Bulb. 

For the 50 Watt Bulb, here are the calculations as a reminder:
50 Watts (Wattage Rating for the Bulb)/120 Volts = 0.416 Amps. 
170 millivolts X 0.001 = 0.17 Volts X 2 = 0.34 Amps


Even though I used a 50 Watt bulb and did my setup like last time, I ran into some funny issues. 1: My Multi-Meter wasn't reading Voltage. I just wanted to bench test my setup and make sure my readings are the same before I put them into Sedona. 2: My professor wanted to know just what current was coming from the bulb. Unfortunately, none of the Multi-Meters I have used thus far measure AC Current, only DC current. Anyway I got an AC Ammeter and measured 0.35 Amps which is similar to the calculated value. Below I have included a picture of the AC Ammeter below:


After that, I went and measured the Voltage coming from the Current Transducer using a more stable connection and got a reading of 173 millivolts which lines up with my calculations. This is great. Remember always bench test, it will save you a lot of frustration later.




Next, my professor showed me that inside a junction box connected to the Main Power for one of the benches there was a Current Transducer (the same one in fact) and that he wanted me to measure total power consumption just like I did with the Electricity Meter way back when. I found some wires stripped them and fed them from the Current Transducer to U7 (Universal Input 7) on the EasyIO. I also hooked up power and here is my setup.





After I powered up the EasyIO and connected it to the Internet via an Ethernet cable. Now I used an IP Scanner to scan the network since the default IP Address of the EasyIO is 192.168.10.11, luckily someone who used the computer earlier this week must have changed the IP Address to 192.169.50.29 so I was able to log into CPT and access the EasyIO version of Sedona without an issue.Here is a screenshot showing CPT for login, as well as, the program I made in Sedona:




Now, I will explain each component of my program for you.
CTVolts: This is the Voltage coming from the Current Transducer into Universal Input 7. Just like with the BASpi, it's not the same as what what I calculated.
WriteFl: This is simply just a value created by me for calculations, in this case the value is 2.00.
Mul2: This just Multiplies 2 numbers and spits out an output. In this case it multiples CTVolts and WriteFloat (0.07 X 2) to get 0.14. We're almost there.
WriteFl1: Another value I made, this time the value is 0.03.
Add2: This Adds 2 numbers and gives and output. This one adds the output from Mul2 and the 2nd WriteFloat (0.14 + 0.003) to get 0.17. This is even better as this is the value I saw on my Multi-Meter and in my calculations.
WriteFl2: Yet another value I created, this has a value of 2.00.
Mul21: Another Multiplier which multiples the output from the Add2 and WriteFl2. (0.17 X 2) to get 0.33. Again this is great as this is the Current I calculated and saw on the Clamp-On Meter and the Analog Ammeter.
Current: This is just UO1 (Universal Output 1) and this just displays the output of Mul21. 

Remember that for CTVolts, the input type has to be voltage0-10volts otherwise you won't see a number. On the other hand, for Current, the output type has to be Current0-20mA otherwise you will not see a value. In my physical setup, I had to make sure the EasyIO jumper wires matched what type of value I was measuring. Here are some pictures showing off the jumper guide inside the EasyIO cover and the correspoding jumper wire placment on UI7 and UO1.




Next week, I want to get BACnet working in EasyIO and transfer what I did today into Azure. But, I also want to play with the code so that the current is accurate to what I would have read on the Electricity Meter I used a while back. Speaking of Electricity Meter, I want to the modify the code so it displays the same wattage I saw on the Meter which will then be multiplied by 12 so it gives me the total power consumed by the benches in C527.

- Valentin 

Friday, March 8, 2019

Week 9 Update - Current Transducer and BASpi

 

Hello

Remember last week when I was using that Current Sensor and neither I nor my professor could figure out and get working? We blew it and we're still going to blame it on the lackluster documentation.

Now, today I got the same Current Transducer I used in Week 6. Got a Light Bulb, Electrical Cord, and hooked it up exactly as I did before. This time the bulb I used was a 40 Watt so this means that 40 Watts/120 Volts = 0.333 Amps. On my Multi-Meter I got a reading of 134.0 millivolts which I then multiplied by 0.001 to get 0.134 Volts then multiplied that by 2 to get 0.268 Amps. This is not too far off from the 0.333 Amps I calculated earlier, and you would see a similar value on a Clamp-On Meter. I've included pictures of my setup:





I then hooked up my BASpi and here is the set up. I know it's messy as I had to get my breadboard out so that the Current Transducer, Multi-Meter, and Universal Input wires would all go to the same place.





By the way I just wanted to let you that I had to play with my Tablet's Ethernet settings. Why? Well, the default IP Address of your BASpi is 192.168.92.68 which means I had to change my Tablet's Ethernet settings to:

IP Address: 192.168.92.69
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.92.0

Afterwards I access the the BASpi web page and his a screenshot. My Multi-Meter still reads 134.0 millivolts, but on BASpi I'm getting 0.109 Volts and not 0.134 like in my calculations and I don't know why.



Here are some screenshots of the Virtual Points I used, as well as, a screenshot of Sedona showing the program I made.




Now, I will explain my program. So, my Universal Input 1 which is my Current Transducer is feeding in 0.10 Volts into a Multiplier. I used a Virtual Point with the value of 3 in so 0.10 multiplied by 3 would give me 0.32 which is my Mutli-Meter reading. This was great, but I ran into a problem. In my calculations, I would multiply the Voltage by 2 to get the Current, which I did feeding my 0.32 and a second Virtual Point with a value of 2 into another Multiplier to get 0.65. According to my calculations, I'm supposed to get 0.268 Amps. I'll give this another try next week. Bu then I will have figured something out. I'll even ask one of my classmates for advice.

Here is an alternative way to setup the jumper wires on the breadboard:

- Valentin