Category Archives: Projects

Sonoff Basic Voltage Free Relay Changeover Modification

What is Sonoff –

Home automation is “The Internet of Things”. It simply means the way all devices or appliances are networked together to provide customers with a seamless control over their home equipment.

Sonoff is an affordable device that provides users with smart home control. It is a WiFi based wireless switch that can connect to a wide range of appliances. Sonoff transmits data to a cloud platform through the WiFi router, which enables users to remotely control all the connected appliances, via the mobile application eWeLink. The cloud server of Sonoff is Amazon AWS global server.

Sonoff makes all home appliances smart. As long as the mobile has network, users can remotely control the appliances from anywhere at any time. Another feature available is to set timing schedules for the appliances, which can include countdown, scheduled on/off, and can thus, help users maintain an easy life.

ios

wifi

The unit I needed to modify was the Sonoff Basic, this is a simple WiFi enabled unit which will switch 230v on or off, however, the application I needed was for it to switch a set of voltage free contacts, as these cost less that £6.00 each, its worth a go with the soldering iron.sonoff

The unit is very compact and before starting, I paired it with my mobile phone and checked that it worked correctly.

Sonoff open

The top simply clips off the base and the PCB comes apart without any fixings after cutting the paper security seal.

top bottom

The relay has the Sonoff sticker on it and the mains is switched through the relay, the board uses double sided tracks for this.

Removed

The relay was desoldered and removed from the PCB, this then allowed access to the tracks which were cut with a Dremel.

bottom cut

The picture shows the bottom of the PCB with the tracks cut from the 230v input and a shorting link to complete the relay switching circuit.

top cut

This shows the relay back in place and the top tracks cut, the modification now allows a voltage free changeover which will be used to bring on my low voltage triggered external lighting.

Please follow and like us:

Sonoff Power Switching & Hive Light in Workshop

Sonoff Power Switching & Hive Light in Workshop

I’ve wanted to do a few tweaks to the home workshop for a while, and today I finally got round to it.

The easiest job was done first, this was to install an additional light fixture to house a Hive Smart Light, this has been added to the global Group ‘Lights’ in the Hive App, by the simple Alexa command ‘Lights On’ or Lights Off, all Hive lights and sockets with connected lights operate, this is really handy feature should we hear any noises in the night.

The light can also be turned on independatly via the Hive  App or via interfaces to other Apps’ or IFTTT.

hive light

I bought a cheap and cheerful circular light fitting for the Hive light as it’s very easy to wipe clean.  In the application I was using the hive light for, the lamp required an unswitched mains supply.

The besa box Tee above the Exocutor had the ‘loop in, loop out’ wiring for the suspended light, the new fixture was simply fed from permanent live from this and was up and running within 5 minutes.

The second job is something that I have wanted to for ages but the cost of the technology was prohibitive, until now!

workshop

The picture above shows my conversion of a garage into a workshop, this was done in 2007, after the walls were lined, the dado trunking and socket outlets were installed, you can make out that I have used Red and White sockets, the Red ones are not switched via a contactor, whereas the white ones are.

white red

Operating any of the three ‘Emergency Off’ latching buttons, will disconnect the sockets and non Red fused connection units.  A Red LED indicator by the bench  illuminates when the Power to the sockets is ON.

stop

The existing arrangement works fine , but I have always wanted an easy remote ‘power off’ ability, as I have had to check on countless occasions if I have left a soldering iron ON, my usual ‘gotcha’ is the compressor ‘kicking in’, in the middle of the night.

With the cost of internet enabled and Alexa compatable WiFi Smart switches coming down to a ridiculous price of £4.39, now was the time to make the addition of remote operation.

iso

To the left of the change-over switch is the consumer unit feeding the Garage sockets via a 20A MCB, a 3A MCB is for the contactors control circuit via the latching stop buttons.

The idea was to install a Sonoff Basic WiFi Smart Switch to switch the supply to the contactors control circuit.

wires

Cables fished in, Left side is the supply to the Sonoff, the Right side is the Sonoff’s switched output.

box

Sonoff connected and cables dressed in to consumer unit.

finished

Completed job with Sonoff showing link to server established, before starting the work I configured the Sonoff in the house and enabled the power to be ON by default, once this was done I checked that it work in the Garage.

The configuration is very easy and the App is EWelink, also this is linked to Alexa, the image below is a screen shot of the EWelink App.

app

The blog on the Rig switching is HERE.

Update – 5 Jan 18, E-WeLink servers have failed this means that control of the Sonoff devices is not possible, no time given as to restoration of service 🙁

14 Jan 18 – Service back up and running and all Sonoff devices now working.

Please follow and like us:

Sonoff 4Ch Pro WiFi/Internet Switch Linked to Alexa

Sonoff 4 Channel Pro

sonoff

I have had an Amazon Dot for a while and use the interactive plugs and lights all the time, one of the plugs is for my Ham Radio PSU, so I have been looking for a relay interface which will work with the Amazon Dot, one of the key requirements is that the relays must be able to pulse on then off.

The Sonoff 4Ch Pro costs ~£25 and has 4 programmable relays including the ability to ‘inch’ a relay (pulse on then off), the reason this is important for me,  is that it allows a momentary trigger to the PLC controlling my automated mast.

The Sonoff 4Ch Pro is well made and can be powered from either the mains or 5 – 24v DC, relays are all voltage free.

The Sonoff App is EWeLink and allows direct control of the relays from anywhere, this App is then linked to the Amazon Alex App to allow voice control of the relays,m if you want to use voice control from your smartphone, Reverb is good.

EWeLink App needs an account setting up, once this is done, follow the instructions to pair with your router.  The default pairing LED flashing sequence did not work for me, I had to keep my finger on a relay button until the blue LED rapidly flashed and then followed the instructions.

Once paired, the blue LED remains steady, after a power down, WiFi locks within 20 seconds.

Sonoff Enclosure

I decided to mount the Sonoff 4Ch Pro in a 220 x 150 x 96mm ABS enclosure (£9.70 eBay), in Visio I drew the cutting stencil and transferred this to the enclosure.

The width of the Sonoff needing trimming slightly to make a snug fit, the get the correct height I packed the unit with 25 x 25mm wood off-cut.

enclosure

Using a Dremel equivalent, the lid was cut to accept the Sonoff.

enclosure

The IEC plug and socket stencil was attached to the side of the enclosure, using a scalpel, the cutting pattern was transferred.

cut

cut

Wired Sonoff 4Ch Pro, Relays 1 & 2 momentarily switch +24v as a trigger input to either Raise or Lower my mast, Relays 3 & 4 latch to supply individual IEC outlets.

The Relays and outlets are rated at 10A, the feeding plugtop has the appropriate fuse fitted.

wired

Finished unit tucked behind a PSU, LEDs show that Relay 3 is energized and WiFi is connected.

finished

The label below is the remind instructions on the voice commands (prefixed with ‘Alexa’) and how to change the relay names.

operating instructions

 

Please follow and like us:

Land Drains

Tenuous link to weather with this one, when we first moved into our house in January 2006, every time the dog came back in from being in the garden, she would have wet paws even if it had not rained for days as the land just did not drain as it is made up of very heavy clay with a thin topping of soil to allow the grass to grow, the only course of action was to improve the drainage.

poppy
Garden as it was when we moved in, first job was to put a gate into the fence so the mini digger can get in.
digger
Work starts on installing the land drains.
Trenching
All trenching done.
Backfill
Drains installed and back-filling.
rotovator
Top soil added and ground rotovated.
Patio
Patio base going in.
bin store
Beginnings of the bin store.
patio
Patio going down.
lawn prep
Edgings and raised border going in.
turf
Turf going dawn.
patio
Completed patio.
furniture
Patio area, note the gate in the fence used for the digger access.
lawn
Lawn growing well.

 

Please follow and like us:

Home Generator & Backup Switching

This blog is from 2014.

A few years ago just before Christmas we had an extended power outage, not only didn’t the telly work :-(,  but all the food in the fridge/freezer was nearly spoiled which would have been a disaster, it was at that point I decided to install an external power inlet point for a petrol generator and some form of switching.

I decided early on that I only needed the essentials to be on the generator backup, this included the heating, lighting, kitchen power circuit and cooking, it was important that I confirmed which circuit breaker control which circuit, this is important as I need to isolate high current consuming circuits so as not to overload the generator when online.

The generator I bought was a Honda 3kVA manual pull start unit off eBay (it later transpired that it wasn’t a genuine Honda, you’ve got to love shysters), which should be plenty big enough, if we need to heat water for hot drinks we’ll use the gas hob kettle rather than the electric one so as not to overload the genny, I can keep an eye on actual consumption due to a digital power monitor which is incorporated into the transfer switch enclosure.

As the generator is a manual pull start their was no point having an automatic power transfer switch, so I built a manual one.

So, outside in the meter cupboard is a 16A switched male socket inlet, this has been modified with a power indicator which illuminates when the generator is running, the generator plugs into this external outlet via small lead, two things to note, first that the petrol generator is outside so that fumes can’t get into the house and secondly that the power lead from the generator to the house uses a female socket to ensure that no exposed pins can be touched with the generator running, removing any shock risk.

From the external socket a 4mm cable feeds into one side of a power transfer switch, this switch has a capacity of 125 amps and is a break before make type, this will ensure that it is not possible to back feed power to the generator from the utility supply during the manual switching operation.

The supply from the utility company also go to this transfer switch, the output of the switch goes to the consumer unit and from here to each of the circuits in the house.

Operation – under normal conditions, the transfer switch is set to utility supply, this is confirmed by an LED, on a sustained power outage, the generator is hooked up and started, the switch on the external socket inlet is turned to on and the generator power available LED is lit.

Non essential circuit breakers in the consumer unit are turned to the off position, once done, the transfer switch generator power available LED is checked, and if lit, the transfer switch is operated to import power to the consumer unit from the generator.

Restoration of utility supply is indicated by an audible tone which obviously is switched off in normal utility power operation.

original
Original electricity cupboard
moded
Supply company lowered the isolator to make room for the generator intake switch.
generator intake
Generator intake.
switch
125A break before make transfer switch.
panel display
Digital Volts, Amps, Kw and frequency meter.
switch
Transfer switch mounted next to garage dado power consumer unit.
boxed up
Transfer switch fully installed.
Generator plugged in
Generator plugged in on test.
generator switch
Generator intake switch.
finished
Finished transfer switch.

The image above was taken a number of years ago, since then the main consumer unit was modified to remove the split RCD with all breakers being replaced with RCBOs, also the OWL power monitor has been removed due to the installation of a Smart Meter.

Please follow and like us:

Vehicle Inspection Pit

This was one of those jobs that you thought it was a good idea at the time, once construction started and things didn’t go as planned, I wished I’d never started it and the only way out was to spend your way out!

April 2011 was day one, the plan was to sink a vehicle inspection pit into the drive so that when it’s not in use, it would be completely covered and therefore unnoticeable, the pit had to be narrow enough to take the small car we had (Fiat Punto) but robust enough so that when our 3.5t motorhome was over it the walls didn’t collapse with me in it, also it had to be the correct height that I could work under the car or van comfortably and the right length that I can get to at least half of the underside of the van without it sticking out across the pavement (sidewalk for US visitors).

First stage was to confirm that planning permission didn’t apply, which it didn’t and secondly that there were no buried services that could stop the project, I did lift manlids to check the direction of pipes and wrote to the gas, electricity, telephone and water utility companies and all came back ok, the only thing I had to move out of the way was the armored conduit which goes to the outside lights which was easy as I’d fitted it.

One the dimensions were decided on, I started researching the reinforcing steel bars and type of concrete required, from this I drew a  rebar plan which gave me the quantities of steel and concrete needed.

rebar

I did explore using a ‘tanked’ construction and simply digging a hole and sinking it in, what bothered me was the high water table we have here and if you google ‘hydrostatic pressure’ their are examples where swimming pools have simply been pushed out of the ground, not a good look!

I opted to use 18mm plywood to make a ‘shuttered’ form even though the wood would be wasted, on balance it was still cheaper than hiring in bespoke steel panels from a local supplier.

The following series of pictures show the construction from the marking out of the hole to the finished pit, I mentioned at the start about things not turning out as expected, I made a flawed assumption that after the hole was dug, I could get away without propping the sides (I know it was stupid!), anyway fortunately I wasn’t in the hole at the time, but the sides caved in, now the problem this presented was that the cost to fix this.

The cost escalated as I would need a JCB rather than a mini digger to scoop out the spill due to the now extended boom reach required, also I would need two more 12m2 skips at £110.00 each, not to mention the additional backfill to make good the sides where the clay had slid from, all in all a blinking nightmare, so, do I fill the lot in and cut may losses, ore spend out of it, well the rest is history and a year later the credit card was finally paid off :-).

Drive

marked
Outline marked out

pre dig

dig1

start of trenching

services ducting

dig midway

dig in progress

dig completed

completed
Completed Holes
All done – spot on digging job, brown pipe is for the air vent and the Black tube is for the submersible pump to pump the pit out as their was no intention to make it waterproof.
collapse
Everything was going so well until the sides collapsed

Pit sides caved in the day after it was dug as I didn’t support them, the ground is heavy clay which slipped leaving a overhang, this overhang was soil and hay as the land on which the house was built used to be a farmers field.

So, change of plan, I decided to build the steel work outside of the hole and surround it in shuttering ply, and have the digger lift it into the hole……

Cage
Start of cage construction
cage 2
Lin looking happy to help
jcb
JCB with longer reach than a minidigger to clear the collapsed hole
base
Side shuttering ongoing

side

walls
Wall shuttering in place
welding
Rebar welded to angle iron edge protectors

backfill

internal shuttering

Please follow and like us:

PLC Simulator

After playing with a Programmable Logic Controller (PLC) to operate my radio mast, I decided to build a simulator in order to better understand the capabilities of the EASY PR-18DC-DA-R.

I wanted the simulator to have 16 inputs, either momentary or switched and the ability to import signals including an embedded 4 – 20mA current.

I had a sloped project enclosure already, so I made a dimensioned drilling template.

Drilling Template

Once the template was stuck down, the pilot holes were drilled, template removed and holes opened to the right sizes.

Drilled Case

The template was created in Visio and I used layers, one of the layers was for switch position drilling and alignment cross-hairs, turning that layer off (missed one in I8!), allowed me to print on  self-adhesive sticky Matte White Vinyl.

Blank template

Using a sharp knife, I cut though the Vinyl and started fitting the switches, buttons, Output indication LEDs and 4 – 20mA injector.

Terminals to go in

Terminal posts next.

Switches going in

Front panel populated.

Lidded

Wiring started.

Pre-wire

After a couple of changes, the internal wiring is completed and loomed in.

Wired

The simulator uses 24v DC, I used a small 1.5A output switched mode PSU for this, fed via a chassis fuse holder with the supply from an IEC male socket, the output from the PSU is fused separately.

PSU 24v

PLC simulator all powered up, the program in the PLC was legacy from my mast control project, this will be overwritten by downloading revised programs from xLogicsoft software.

Finished PLC

To complement the PLC simulator I bought a4-20mA Current Signal Generator 0-10V Voltage Generator Transducer Simulator for £19.00.

simulator

Injector resolution precision:

  • Current 0-20mA 0.001 0.1mA
  • Voltage 0-10V 0.001 0.1V
injector
Boxed injector

testrig

 

 

 

 

 

 

 

Completed test setup.

 

Please follow and like us: