Ralph S Bacon

MicroControllers, Electronics and IOT

Automation on hold – for a bit

If things had gone to plan we would have had another video out by now, and talking about another peripheral that I want to add to my automation project.

Regrettably, though, I’ve had a family bereavement which has halted most things Arduino and Pi for this week and next, as I fly out to Germany for my dad’s funeral. He’s been suffering from Alzheimer’s for a couple of years or so which meant he had difficulty understanding some concepts – which meant I was saving news and photos of my new workshop for a face-to-face when I went over this weekend for his birthday. Now it will be for his funeral instead and I’m sad because he never got to know about it. In many ways, he was responsible for nurturing my practical, hands-on nature which allows me to “build stuff”. He would have been absolutely fascinated by my new workshop, that’s for sure.

But he would have been the first to say that life goes on for the rest of us, so I’ll give you a brief preview of what it is I plan to include as part of my next video.

It’s a three-channel, optocoupler (aka optoisolator) mains detector, that can be interfaced to an Arduino or Pi without any danger of zapping that unit should things go awry.

The concept is simple enough: you supply a line (L) wire to any of the three channels (on the right in the above picture), from a light perhaps, a neutral to the common neutral and the power is dropped by a rather chunky resistor, rectified via an MB2M bridge rectifier and fed into an optoisolator chip (an EL817) that can then be used to bring a µcontroller pin high. Simples. And safe for your receiving device.

The actual optoisolator unit can be potentially fatal though, and as we are now talking DC line-level voltages (albeit at tiny currents) that makes it even more so. So not a board for the risk-takers or those uncomfortable with mains electricity. I will be taking extra care when I do the video as I don’t want to be the next one in the Bacon family to go to the great breadboard in the sky. Not just yet, anyway. The whole area enclosed in the white box on the circuit board is at mains potential and must NOT be touched when connected.

I bought this from a UK supplier on eBay, moore_estates, but if you’re not in the UK you can probably pick them up from other local or Far Eastern outlets if you’re prepared to wait a few weeks. Single units are also available from them if you don’t need the three channels, and are cheaper, of course, but I will need 3 channels, as I want to detect my lighting, heating and something else, but I haven’t decided on it yet!

Taken in about 1950, on national service in Egypt

Stan Bacon 1930 – 2018

So thanks, dad, for giving me the genes and the opportunities to explore the practical nature of my life – and perhaps you’ll now see my workshop from above. Tempus Fugit.



30 replies

  1. So, over 3 years later and having found this page from your YouTube video, here I am I left a note on YouTube about an 8 circuit version of the optocoupler, and just ordered one. However, no sooner has Amazon confirmed shipment than I realized there may be a significant limitation for some applications of this board and the 3 circuit variant.

    In my case, I want to detect failure/tripping of a GCFI breaker protecting a range of individual breakers. We have a (very) old home here in France and the electrics are a bit dodgy, so some kind of notification system is a good idea. I had built my own cards several years ago, but the 8 circuit version looked perfect. And at only 26€, the price was right. But, here is the potential, lest I say probable, issue. To detect the tripping of a GFCI it is a basic requirement to connect to the Phase on the protected side of the GFCI. Which is what I currently do, 1 phase, 1 neutral go to each board, and all works fine. But, if I take the phases from multiple circuits and a common neutral from the neutral bar, I am pretty sure I will trip the GFCI since the return will be less than what passes through the GFCI. I should be able to use a number of small 1:1 isolation transformers and then ties all the output neutrals together. But, that sort of defeats the beauty of having a single board. We shall see.


  2. Hei Ralph, I am sorry for your loss. My dad also passed the “makers” spirit and interests on to me.

    I commented on your videos as well, but wanted to make sure my comment reaches you.
    I am new to your videos and I like them very much, so thank you for making them.

    I was making something similar to the unintrusive mains detector you explained in one of the videos, with the same intention in mind (actually checking if device is on). However, I need to check water heater and stove, where I am not allowed (insurance policy) to modify the wires at all, so I found these hall effect sensors that can actually detect if current is flowing trough the wires even thought they are wrapped around together, like most of cables in household (according to their blog at least) https://moderndevice.com/product/a1324-hall-effect-sensor/
    I purchased few of them, but I never got any success with them (most likely doe to lack of skill/equipment) .
    They also make “bumped up” version of it, which I also purchased but never got around to test https://moderndevice.com/product/current-sensor/ and they even wrote a blog post about using it https://blog.moderndevice.com/?p=356

    I think this might be even better for your (our 🙂 ) intention, as it is completely unintrusive and can even measure how much current is flowing, thus detecting if oven is on, for how long, detect cycles of washing machines and other appliances etc. Possibly even attached to some centralized cable and detecting several appliances based on their power usage signature (if that is a thing at all)

    I hope I can get you interested in those sensors, as I think they can open a lot of new possibilities for home automation (and I also hope you will share your findings with us 🙂 )
    Looking forward to new content!

    All the best,


  3. Ralph, So sorry for the loss of your dad. May you and your family find piece knowing is now pain-free and no longer bound in a tired body. Watching over you.

    Danny Johnston

    Liked by 1 person

  4. So sorry to hear of the loss of your Dad Ralph. I’m sure he would have been incredibly proud of your new workshop however little of it he was able to see.

    My Dad too inspired my love of tinkering and creating gadgetry. And while he too doesn’t understand the workings of the Arduino generation of projects he continues to be a great inspiration to me and for all he lives a long way away I’m not sure how I’d cope without him.

    Stay strong.



    • Thank you for your condolences, Gavin.

      Yes, my dad would have been very proud indeed of my new workshop and what I do here (although like yours, he would not have understand the intricacies of the Arduino!).

      And savour the time you have with your dad, it really does matter in the end.


  5. Sorry about yr dad. Alzheimer obviously must have put a burden on your relationship with him for years.
    We all know that at one time our parents will be gone but somehow it is always too early


  6. I’m sorry to hear your father past away. Take your time. The elektronics (and us viewers & readers) can wait. Later on you will find your time and joy back to show us those fantastic video’s, which i learn a lot from.


  7. Ralph

    So sorry to hear of your loss. We are all coming of that age when parents and their generation are leaving us. I lost both my mother and aunt last year.


  8. Dear brother, I am sorry to hear about your dad. May his soul rest in peace. Kind regards Mohan


  9. Please accept my deepest condolences at this difficult time. Your priority at this time is to attend to the unfortunate matters at hand. We are understanding so don’t feel pressured to prepare more videos until you are ready.


  10. Ralph, I am saddened by the News of your DAD, l Mums & Dads are very special people,the loss always comes as a shock,even if your expecting it. You need to take time to come to terms with it.
    Do not feel you have to produce video’s you owe us nothing, and you need time,I speak from experience.
    Take care and care for the people who matter the most your loved ones.

    Liked by 1 person

  11. I am sorry for your loss. I can only hope your Father had the ending he might have wished for, should have been in a position to do so. People often forget that the Royal Corps of signals were the first step in the sequence of achievements that led to the success of Bletchley.


    • Thank you for your condolences, Michael. I am impressed you recognised that he was in the Signals, on his motorbike in Egypt for two years. And yes, I believe that my father was in no pain at the end, having fun with others in his care home.


  12. My deepest condolences on your loss Ralph. I’m sure all of your regular followers will understand you need some time for yourself. We’ll still be here on your return.

    Liked by 1 person

  13. I lost two Grandparents this way, very sorry for your loss.




  14. Dear Ralph, I deeply understand your feelings. My father too taught me so many things in his life and poured into me his electrical skills (which I developed into electronics and computing) and… his love for music & singing, or should I say “crooning”, since he was a great fan of Bing Crosby. He passed away in 1995, but as often as I listen to the music he loved… he’s still here with me. Unfortunately, almost two years ago, my only son died, who had inherited the music ‘addiction’, alas for heavy metal.. He left me his daugther, now a 6 years old who loves her grandad.
    I’m sure your Dad is now happy to watch from high above all the good things you are doing, not least your great videos.
    Although we are only e-friends, please accept my hearty condolences.


    • Thank you for your condolences, e-friend Daniel. Parents most certainly shape us in what we develop into. I cannot begin to understand your own loss of a child, but I’m sure there is some consolation with your grandchild. And I really do hope my dad is watching from above, as he never to got to see my workshop.


  15. I am very sorry for you about your father, I know from my own life as I did lost mine in 1999. I am shure he was proud of you in his living years, so keep that in mind and be thankful for his life.


  16. Ralph,

    I’m sorry for your loss. I lost my dad when I was 15. He was a WWII vet. I haven’t had experience with Altzheimer’s, but my father-in-law had another form of dementia just before he passed on–a very trying epoc in my life.

    I really appreciate your Utube posts. You are very understandable despite my lack of English mastery. I am still in the Arduino mindset, so please don’t leave us Arduinoites behind.


    Pete Bodnaruk



Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.