Radio Mast Automation – Part 5: Control Modification

Since my last blog on Mast Automation when I thought I’d finished the project, I have made some changes to my weather station which means I no longer have an output to the mast controller, this output used to trigger the mast to lower when the wind speed hits 30 mph.

I decided to update the discontinued version of my Programmable Logic Controller (PLC) with a Rievtech PR-18DC-DA-R from Audon Ltd, this unit is a direct replacement for my old PLC and has 12 Inputs and 6 relay Outputs.

Rievtech PLC

The PLC accepts a number of input types, in my application I’m simply switching a voltage state with the exception of one of the inputs which is configured as an Analogue input, to which I have connected my mast mounted Anemometer as a means to trigger mast lowering during unsafe wind conditions.

1733

Adafruit 1733

TECHNICAL DETAILS

Dimensions:

  • Height (base to center): 105mm / 4.1″
  • Center out to Cup: 102mm / 4″
  • Arm Length: 70mm / 2.8″
  • Weight: 111.8g

Wire Dimensions:

  • Wire Length: 99cm / 39″
  • Plug Length: 30mm / 1.2″
  • Diameter (thickness): 4.8mm / 0.2″

Specifications

  • Output: 0.4V to 2V
  • Testing Range: 0.5m/s to 50m/s (111.8 mph)
  • Start wind speed: 0.2 m/s
  • Resolution: 0.1m/s
  • Accuracy: Worst case 1 meter/s
  • Max Wind Speed: 70m/s (156.5 mph)
  • Connector details: Pin 1 – Power (brown wire), Pin 2 – Ground (black wire), Pin 3 – Signal (blue wire), Pin 4 not connected

I tested the output  with help from my better half by driving at steady speed and monitoring the output from the anemometer:

  • 0 mph = 0.40  mV
  • 25 mph = 0.78 – 80 mV
  • 28 mph = 88 mV
  • 30 mph = 96 – 100 mV
Anemometer
Anemometer mounted on 2m/70cm H/V relay switch box

I mounted the anemometer to the top of my mast to get a representative wind speed, the next job was to strip out the old PLC from the control cabinet.

Mods
Starting mods, (hand held winch controller on top of cabinet)

I needed to make several changes from the original design in order to free up one of the PLC’s inputs, also out of the 16 Inputs only the first 6 allow analogue inputs, so some moving of inputs was needed along with some minor works to the LED voltages and override/luffing switch.

PLC
Completed Cabinet

All went back together quite nicely but an intermittent problem remained after the PLC replacement in that when the mast completed the mast raise cycle, the motor would immediately reverse and the mast would lower.

Hooking up the laptop to to the PLC, I selected ‘live monitoring’, this displayed the input and output condition, this showed that after operating the ‘raise’ toggle switch (centre bias On – Off – On centre off), the ‘lower’ switch input also went and remained high. This output to the PLC caused the motor to immediately  change direction and lower the moment the mast raised sensor was triggered.

To reduce the chance of a repeat problem occurring, I modified the replacement DPDT switch wiring so that both poles need to switch in order for a signal to pass.

switch wiring

Prior to starting the upgrade works I had the programmed PLC on the bench and I thoroughly tested all control permutations by simulation using the software from Audon Ltd to ensure correct operation.

v3
PLC Modified block diagram (Program File for use with xLogicsoft)

As you can see, the logic has grown with the project, I’m sure this could be significantly simplified, however, it works for me.

Mast Control Logic

Pressing the Emergency Stop button will inhibit any operation and reset any timers which are running.

Raising the Mast

Conditions –

  • E Stop not pressed. (Input 1004)
  • Top Securing mast pin IN. (Input 1008)
  • Mast in the lowered position. (Input 1006)

Trigger –          Switch input momentary high. (Input 1003)

Action –

  • Lower switch inhibited.
  • Switch input via wiping relay with a 1 second ON timer to ensure momentary trigger to the next stage.
  • 36 second up timer start to operate Up relay (fail mechanism in case the ‘raised’ sensor fails).
  • Up relay closes to energize motor drive. (Q002)
  • After expiry of Up timer or on activation of the Up sensor, Up relay opens.
  • Mast raised output relay energizes. (Q003)

Lowering the Mast

Conditions –

  • E Stop not pressed. (Input 1004)
  • Top Securing mast pin IN. (Input 1008)
  • Mast in the raised position. (Input 100C)

Trigger –          Switch input momentary high. (Input 1005)

Action –

  • Raise switch inhibited.
  •  Switch input via wiping relay with a 1 second ON timer to ensure.momentary trigger to the next stage.
  • 39 second down timer starts to operate Down relay (fail mechanism in case the ‘lowered’ sensor fails).
  • Down relay closes to energize motor drive. (Q001)
  • After expiry of Down timer or on activation of the Down sensor, run on timer operates for 0.15 seconds to take slack off winch cable.
  •  After expiry of run-on timer, Down relay opens.
  • Mast lowered output relay energizes. (Q004)

Wind Speed Triggered Auto Lower

Conditions –

  • E Stop not pressed. (Input 1004)
  • Top Securing mast pin IN. (Input 1008)
  • Mast in the raised position. (Input 100C)

Trigger –           Wind measured via Anemometer at 28 mph for 1 minute. (Input A1001)

Action –

  • 0.4 – 2v Anemometer to Analogue Threshold Trigger output set go high at 90 mV and off at 76mV, these values equate to ~28 mph and ~24 mph respectively.
  •  ‘On Delay’ timer from analogue threshold trigger set for a sustained output of 1 minute duration before the next stage is enabled in order to reject gusts.
  •  ‘Off Delay’ timer set to 10 minutes, if no input from the ‘On Delay’,  ‘Off Delay’ resets.
  • Whilst the ‘Off Delay’ timer is running, the WX Amber LED is lit. (Q005)
  • Output from ‘Off Delay’ to wiping relay timer set to 1 second to ensure a momentary output to the next stage.
  • 39 second down timer starts to operate Down relay (fail mechanism in case ‘lowered’ sensor fails).
  • Down relay closes to energize motor drive. (Q001)
  • After expiry of Down timer or on activation of the Down sensor, run on timer operates for 0.15 seconds to take slack off winch cable.
  •  After expiry of run-on timer, Down relay opens.
  • Mast lowered output relay energizes. (Q004)

Battery Charging Process

The winch has 3000lb capacity from Winch-It and is powered by a 12v car battery with a capacity of 45Ah – 360cca.

Normal Operation –    4.5w solar panel connected to the battery via CMP Solar Charge Controller.

Automatic Operation –

Trigger –       After 4 operations of the motors (raise & lower twice) or Weekly – Sunday 01.00

Action –

  • Multi-pole relay energizes after a 2 second delay via Q006, this:
  • Disconnects the solar panel.
  • Applies mains to a 4A output battery charger (charger sized for Ah of battery).
  • Connects the battery charger output to the battery.

Charging ceases when:

  • Battery terminal voltage reaches 14.14v (Over-voltage detection module to Input 100A).
  • 8-hour battery run timer expires.

Manual Operation –

Charging Start – Push button in control cabinet (Input 100B)

Charging Stop – Cursor key on PLC (C3)

Note –

If the battery charging cycle has started and the motor (either up or down) is operated, charging will cease and resume after a delay of 2 seconds after the motor has stopped.

Luffing the Mast

Conditions –

  • E Stop not pressed. (Input 1004)
  • Top Securing mast pin Out. (Input 1008)
  • Bottom Securing mast pin In (Input 1002)
  • Mast in the lowered position. (Input 1006)
  • Luffing switch set to On (Input 1007)

Trigger –           Momentary switch (raise or lower) (Inputs 1003 or 1005)

Action –            Operating the Luffing switch supplies power to the wireless receiver and manual switch which came with the Winch-It kit via a relay , the supply for this is taken from the Luffing/Override indicator LED, (the Luffing switch is a Double Pole Double Throw On – Off – On, the LED is fed from one side of the switch).

A further change to the control is to from latching to momentary switch operation allowing the motor to be ‘inched’ via the wireless handset or panel switches in the control cabinet.

Using the handset allows the mast to be walked down whilst lowering or the reverse when reinstating the mast to the vertical.

Override

Operating the Override switch bypass all limit switches and enables momentary manual control.

 

UK Weather Network & Meteobridge Pro

Chatteris Weather has been publishing weather data to UK Weather Network (UKWX) for a number of years when Martin from UKWX Admin mailed to let me know my data was no longer being shown.

Originaly Weather Display was configured to send data to UKWX and during the changeover to Meteobridge Pro this got missed, fortunatly in Martins mail alerting me to the problem was a link on how to configure Meteobridge.

MB instructions

I followed the above steps but couln’t get it to work, Martin kindly gave me the details of Bob Montgomery owner of Bishop Sutton Weather Station who also uses a Meteobridge, and he was very willing to offer advice in order to help me get the data created in a format which UKWX can injest.

This is what I learned with help from Bob:

  1. Open MB_stickertags-template.txt
  2. Copy the contents of the text file and past it into Notepad (I use Notepad ++)
  3. Save this file as MB_stickertags-template.txt
  4. Upload this file to your server, for ease I placed it in the root directory
  5. Set the file permission to 666
  6. In Notepad create a blank file and save it as MB_stickertags.txt
  7. Upload this file to your server, for ease I placed it in the root directory
  8. Set the file permission to 604
  9. Open Meteobridge Pro and select the Services tab
  10. Create an FTP and select periodical upload
  11. Enter your site details and update frequency as per the example below  (don’t forget to use yoursite) and press SAVE
  12. .Press TEST
  13. Using your browser enter www.yoursite/MB_stickertags.txt and you should be able to see your data
  14. Using the UKWX Contact Form, let admin know of your details
Example MB
Example MB Pro Services Setup

 

 

 

All done and time for a coffee!

Weather Station for WordPress added

Weather Station LogoAdded Weather Station for WordPress to my blog pages, the application needs the following to work:

  • PHP 5.4 or greater;
  • cURL extension;
  • JSON extension;
  • Internationalization support.

My native setup 4.6 provided by GoDaddy had 3 out of the 4, with Internationalization support missing, and thefore the app would not run.

Talking to GoDaddy techincial support, this was resolved very easily.

  1. Use cPanel to access your site.
  2. Click on ‘Select PHP version’.PHP page
  3. Click on the ‘PHP Version’ drop down box and select 5.6 and click ‘Set as current’, by default ‘inil’ is checked.
  4. Click ‘Save’ and all is done.

php version

 

Chatteris.biz SSL secured

secure

My main domain name is Chatteris. biz, Chatteris Weather and M0HTA.uk are  linked to this domain name.

In order to give users confidence that the site they are linking to is secure, I have upgraded to SSL.

SSL (Secure Sockets Layer) is the standard security technology for establishing an encrypted link between a web server and a browser. This link ensures that all data passed between the web server and browsers remain private and integral.

During the transition it was found that some of the existing information displayed broke the security integrity of SSL, and therefore, I have either changed the menu to the remote link directly or removed the link completely, this has been unavoidable.

Stopping MM0CUG Mast Rattle

With the latest round of high winds, my wall mounted 12m mast makes a loud rattling noise which transfers into the house as the mast marginally moves within the top bracket and was getting to be a nusance.

A simple solution was to make a plastic shim to take up the small slack bewteen the mast and bracket, this is visible in the picture to the left of the pin sensor (I put a 90 degree bend in the shim so I can put it out easily).

Top mast retaining pin

For the shim I used the a section of lid from 16 x 16 trunking lid from Screwfix.

Trunking lid

Grinding the lid lip took only a few seconds.

Trunking lid grinding down

Finished shim, I used two, one between the fron pin and mast, the other to the side of the top bracket and mast, nice, cheap and easy solution which has solved the noise problem.

Finished lid for cutting

Meteobridge Pro

Tidied up the installation of my Meteobridge Pro as originally it was inside a metal patch cabinet and I wanted to try using it on wi-fi.

The unit has been on test since it was returned from repair and has performed really well with no issues requireing a reboot, dropped uploads have been attributed to network problems, hence moving it outside of ther cabinet and off the wired LAN.

I monitor uptime from the Status Page of my weather web site, cumulative downtime is recorded in a rolling 7 day period within the MORE setting HERE.

The front USB port has a micro 16Gb thumb drive for saving scheduled backups.

SOHO cabinet

Power for the Meteobridge Pro and the Davis Vantage 2 Pro are both  fed from a UPS in order to filter the mains to the adapters and to keep the units active during short duration ‘blips’ in power.

The screenshot below shows all the services the MB Pro is running perfectly with the bonus of significantly reduced power consumption.

Meteobridge live data

Power Data: 5.47V 413mA 2.26W  (Box Climate: 51.5°C 11%)

Pulsar Evolution 800 UPS Repair

I have had an MGE Pulsar Evolution 800 Uninteruptable power Supply for about 8 years through which my computer and other sensitive kit is fed and I serviced it with new batteries in January 17.

This UPS delivers 800VA or 520 Watts (Calculator for Watts/VA HERE.) and is at 67% loading when in use, giving a back up time of 9m 35s, which is more than adequate for my needs.

In early February the UPS stopped working completely, no output or indication of power in, the one I have cost £10 second hand off eBay so I couldn’t complain when it stopped working.

MGE UPS

Before looking for another replacement, I opened it up the check for the obvious, such as internal fuses blown or PCB track damage, looking  near the power regulator stage I noticed a bulging capacitor which is a sure sign that it has failed.

PCB

Mother Board

PCB caps
Bulging Capacitors

Everything else passed a visual inspection, so I bought a pack of 5x 10uF 450v 105c capacitors from eBay for £1.59.

After changing the capacitors, I measured the old capacitors and they had both failed as the meter should be displaying 9.5uF to 10.5uF.

Cap meter
Faulty capacitors

UPS front panel

Once reassembled, I powering up the UPS after inserting the batteries, the UPS kicked in to self-test mode and was working 🙂

Everything is back in place working and I have software monitoring its performance and everything is looking good so far.

A copy of the Pulsar Evolution 800 manual is HERE.

Solution Pac software for the UPS can be downloaded from HERE.

Software dashboard

Software options

Arduino Windspeed Switch

I used to have a PC on 24/7 running weather software linked to my weather station, this allowed me to have a relay operate should the wind speed exceed a predifined value, this would then signal my antenna mast to automatically retract.

To save energy, I no longer use a PC to publish weather station data to the internet and once this was switched off I lost the relay facility, so I needed a solution.

Looking for windspeed switches on the Internet kept pointing to commercial units at £320 ish, however, I did stumble accross this link from Geeky Gadgets for an Arduino based unit which looked perfect for my needs and all credit must go to the author.

Key Parts

Mouser Electronics:

Anemometer part# 485-1733  @ £42.62

eBay:

LCD Keypad Sheild 2 x16 display 1602  @ £5.75

Arduino Uno @ £8.95

Relay unit @ £0.99

Total Cost £58.31

Construction was very simple, it involved plugging the LCD sheild onto the Arduino, uploading the sketch and making the three connections from the anemometer to the Arduino.

The connection information is in the Geeky Gadgets documentation with the exception of the relay output, the picture below shows this.

Things to note:

  1. The contrast pot on the LCD sheild may need to be adjusted to give an optimal display.
  2. The ‘standstill’ mV of the anemometer needs to be measured and entered in the sketch (min was 0.4345 mV) so the display shows 0 MPH at rest. This is done with a digital voltmeter to measure the resting output, or you could use trail and error and enter values in the sketch until  zero MPH is registered, and then slowly increment the values, uploading each time a change is made, until you hit a point where a speed is registered, then back the number down, at this point you should see and increase in speed displayed with minor turning of the cups.

Arduino

The above is the finished setup, just ready to mount in a suitable enclosure, for test purposes I have set the relay to operate at 4 MPH, when the speed drops below this, the relay de-energises.

The finished unit will be powered by 12v and will work as a standalone unit with a simple normally open output to the mast automation PLC.

Arduino Software can be downloaded from HERE , the working sketch which allows a replay to operate if the windspeed exceeds a preset value is below, simply copy and paste the code below into Aduino software and save the file before compiling:

===================================================

/*
Arduino Wind Speed Meter Anemometer mph – Adafruit anemometer (product ID 1733).
Modified code created March 2016 from original code created by Joe Burg 11th November 2014
At http://www.hackerscapes.com/ with help from Adafruit forum user shirad

12 Feb 17 added relay output based on wind speed.
*/

//Initialise LCD display

#include <LiquidCrystal.h>
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

int serial_in;
int relay =3;
//Setup Variables
double x = 0;
double y = 0;
const int sensorPin = A1; //Defines the pin that the anemometer output is connected to
int sensorValue = 0; //Variable stores the value direct from the analog pin
float sensorVoltage = 0; //Variable that stores the voltage (in Volts) from the anemometer being sent to the analog pin
float windSpeed = 0; // Wind speed in meters per second (m/s)

float voltageConversionConstant = .004882814; //This constant maps the value provided from the analog read function, which ranges from 0 to 1023, to actual voltage, which ranges from 0V to 5V
int sensorDelay = 2000; //Delay between sensor readings, measured in milliseconds (ms)

//Anemometer Technical Variables
//The following variables correspond to the anemometer sold by Adafruit, but could be modified to fit other anemometers.

float voltageMin = 0.4345; // Mininum output voltage from anemometer in mV.
float windSpeedMin = 0; // Wind speed in meters/sec corresponding to minimum voltage

float voltageMax = 2.0; // Maximum output voltage from anemometer in mV.
float windSpeedMax = 32; // Wind speed in meters/sec corresponding to maximum voltage

void setup()
{

//Setup LCD display with welcome screen

lcd.begin(16,2);
lcd.print(“Geeky Gadgets”);
lcd.setCursor(0,1);
lcd.print(“Windspeed Sensor”);
delay(2500);
lcd.clear();
lcd.setCursor(0,0);
Serial.begin(9600); //Start the serial connection
pinMode(relay,OUTPUT);

}

//Anemometer calculations

void loop()

{

sensorValue = analogRead(sensorPin); //Get a value between 0 and 1023 from the analog pin connected to the anemometer

sensorVoltage = sensorValue * voltageConversionConstant; //Convert sensor value to actual voltage

if (sensorVoltage <= voltageMin){ windSpeed = 0; //Convert voltage value to wind speed using range of max and min voltages and wind speed for the anemometer. Check if voltage is below minimum value. If so, set wind speed to zero.

}else { windSpeed = ((sensorVoltage – voltageMin)*windSpeedMax/(voltageMax – voltageMin)*2.23694); //For voltages above minimum value, use the linear relationship to calculate wind speed in MPH.

//Max wind speed calculation below

x = windSpeed; if (x >= y){

y = x;

}else

y = y;

}

//Print voltage and windspeed to serial

Serial.print(“Voltage: “);
Serial.print(sensorVoltage);
Serial.print(“\t”);
Serial.print(“Wind speed: “);
Serial.println(windSpeed);

//Display Wind Speed results to LCD with Max wind speed

lcd.setCursor(0,0);
lcd.print(“Wind Speed mph”);
lcd.setCursor(0,1);
lcd.print(windSpeed);
lcd.setCursor(7, 1);
lcd.print(“Max=”);
lcd.setCursor(11, 1);
lcd.print(y);
if (windSpeed >4) { //Enter the value of MPH windspeed to be exceeded which will operate the relay
digitalWrite(3,HIGH);
} else{
digitalWrite(3,LOW);

}

delay(sensorDelay);
}

===================================================

For my purposes the displayed wind speed does not have to be calibrated, I only need an indicative reading, therefore cannot vouch for accuracy of this unit.

Meteobridge Pro failed hardware

Due to a fault with the Meteobridge Pro, I’m unable to publish data from my weather station, the unit has been sent to Germany for repair and as soon as I receive it, normal service will be restored.

16 January 17 – Meteobridge Pro returned, fault identified as:

“There have been some pins
not correctly shortened that caused shortcuts on the USB path.”

 

Back up and running at 16:45.

Hot Water to Outside Tap

When we first moved into the house I installed an external bibcock tap which I fed by ‘teeing’ into the cold water feed line in the garage which is  used for the combination boilers filling loop.

In the previous house I had hot and cold available outside to wash the car, so the project was to do the same here. The two problems were the lack of available hot water pipes in the garage and no more wall space to add another external bibcock dedicated to hot water.

First things first, locate a source for the hot water, fortunately on the other side of the garage wall is a small utility room with a sink and plumbing for a dishwasher and washing machine.

Isolating the cold water fill to at the tank, I drained the hot water down into the utility sink and emptied the dead leg of the washer fill line using the tap at the bottom of the pipe, once this was done, I put the plug in the sink and removed the sinks waste pipe for ease of access to where I would be cutting and soldering.

Drilling a 15mm hole through into the garage from the house was easy as the internal double skin walls are built using low density thermalite block.

Pipe installPutting some tape over the open end of pipe, I pushed it through the hole into the garage where I soldered an end fed elbow with stub to a compression fitting isolation valve. From the isolation valve a stub with a tee and drain cock were soldered.  A stub pipe from the tee had a plastic stop end fitted, the pipe was then pushed back into securing clips fixed to the garage wall.

soldered bridgeUsing the pipe slicer tool shown in the first picture, I cut out a small section out of the hot pipe and put on a 15mm copper tee, using a half crossover to bridge the cold pipe, I then used a short piece of pipe to connect an elbow to the pipe to the garage.

Once the dry fit went ok, I dissembled it all to clean and flux the pipe and fittings before soldering, all the fitting were end fed here.

Once all the joints were soldered and making sure all the valves are closed, I cracked open the hot water tank fill valve and went to check for leaks after venting air from the system and running water through the garage drain valve to flush out any debris.

Pipe pull

The garage has been converted into a workshop and I didn’t want to damage any exposed pipe  when I throw stuff for storage, so the best option was to use plastic pipe and fish it behind the false wall as their was just enough room.

Drilling 110mm holes, allowed me plenty of room to push trunking lids taped together for the 4.5m run, string was attached to the end of the lid and pushed in place.

At the other end it was a pain to fish for the string using a torch, mirror and bent hook, however, once grabbed, I tied on stronger blue rope  to the string and pulled this back to secure on the pipe as shown, (the last thing I wanted to repeat fishing!).

At the utility isolation valve end, I clipped the John Guest Layflat Speedfit pipe to the wall and used a cold form bend to hold its radius and take strain off the ‘plastic to copper’ coupling.

The design to allow me to use one external bibcock tap was to use a three port valve, this suggestion came from DIYNOT plumbing forum.

SchematicParts

The pressure reducing valve, 3 port valve, double checkvalves and themostatically controlled valve were from eBay, all other parts from Screwfix.

How it works

The cold water has a local isolation valve for ease of maintenance, a double check valve stops contaminants getting back into the upstream water system, a ‘tee’ allows the pressure reducing valve to be bypassed, and if the 3 port valve is in the right position, allows full mains pressure at the outside tap for use with the hose.

The pressure reducing valve is set for 3.5bar which is the same water pressure as my unvented hot water tank, therefore the water pressure for both feeds to the thermostatically controlled valve (TCV) is the same.

The hot water also has a local isolation valve and double check valve before it feeds the TCV, the temperature of the blended water leaving the TCV is 42C.

Garage pipeAs the cold water was available, I connected this first to the valve and allowed pressure testing, the biggest problem I had was sealing the 1/2″ BSP threads on the 3 port valve.

I tried using fibre washers, PTFE tape and jointing paste but a couple of joints would still weep very slowly over time.  I searched the problem in the DIYNOT forum and the advice from experienced plumbers was to use Locktite 55 , following the instructional video on the locktite site, I applied the sealing material onto the prepared threads and it worked, no more leaks.

At the end near the bibcock tap, I used another ‘plastic to copper’ coupling and piped up and over to the hot water isolation valve.

A hot water drain cock was installed where the pipe emerged from behind the false wall so I can drain down if needed.

Hot pipeThis shows the hot water pipe coupling about to be soldered, hence the heat resisting mat, on the right of the picture is the cold water valve which is open and testing for leaks.

In the garage is another isolation valve directly behind the bibcock, this stops unauthorised use of the external tap.

The final job was to flush the system thoroughly and check that the water coming out of the bibcock tap is at the correct temperature, once proven, all exposed pipes were insulated and where the risk of damage was high, boxed in.

The most expensive part of the job was the plastic pipe as this comes in a minimum of a 25m roll and I only needed 4.5m. The option of pulling in straight lengths with a connecting coupling behind the false wall was discounted as I didn’t want any inaccessible joints, so I had no choice but to pay for more than I needed.

Apart from hassle of sealing the weeping threads, the job went well and I’m happy with the result.

Lagged pipe

General information and status updates.

Social media & sharing icons powered by UltimatelySocial