Split-Wire Arduino Outlet

About: Disabled veteran of the US Air Force. Lucky enough to visit 11 different countries around the world before I separated after 6+ years. Network engineer by trade, amateur philosopher, and maker of things. Lea...

Hey all, this project isn't safe. I've been given some suggestions on how to make this more safe, but if you're a professional and want to give your input, I encourage you to do so. This idea is public domain and I will update this accordingly based on feedback. For a video example of it working (that apparently almost killed me) see : https://twitter.com/WithWhitt/status/1113909347539...

For a safe, single wire example, see: https://www.sparkfun.com/tutorials/119

Requirement: I want a modular, logically controlled power supply for any static electric appliance I create (or zombify). I wanted it safe enough for a responsible adult to put together, and instruct a competent person or adolescent on the dangers of operation and can expect them to not drool into the openings. The goal is to make it as safe as any outlet or extension cord. (we're not there yet) Instead of recreating the wheel every time I decided to get a baseline project so I could rapidly change my Arduino from project to project. This project aims to isolate the dangers of electronics, gives control of motors, and make projects modular so they can easily be replaced in autonomous parts.

This is a side-by-side comparison of my 1st generation and the 2nd Arduino Outlet project. I left the breadboard off the second project because my camera wouldn't pick it up very well on the side.

The basic idea for any interface: ANSI Z535. or https://www.dla.mil/portals/104/documents/landAndM... - Please call me out for being wrong on something! I'm not a professional, yet.

My recollection, but I haven't read the ANSI regulation in ages:

Red = Danger to life or limb

Yellow = Informational / action required / damage to equipment

You can use amber/orange for equipment damage, but equipment can be replaced, people can't. Didn't think it was necessary.

Green = All good fam!

** I don't know enough about electronics to meet the safety requirements of a military-standard or commercially available electronic product, I tried getting in touch with professional contractors, electricians, and educators in my area but no one would help me due to "legal fear". Any of my projects, until I get certified, are do at your own risk and skill level.**

The only way to learn for free is to teach yourself, which is easier as a community. Let's learn something, together.

My Creative Process: https://coggle.it/diagram/XJlWS-IIly4fNW_s/t/crea...

Project design: https://coggle.it/diagram/XJWkpwlXH_EMc7TQ/t/ardui...

I don't think I'll do the project design in coggle again, but there are some useful links and I find mind-mapping a project helpful to teach myself. If you have suggestions, I would love to hear them! I've only been doing this two weeks.

Step 1: Materials

Not everything pictured made it into the final project, but this project isn't for me. It's for you! I didn't end up using the Combination Connector, nor the outlet cover that is pictured. I originally wanted to make an outdoor outlet, but since this is my first project and am learning as I go, I wanted to start small to prevent possible injury scenarios.

Starting from top to bottom, left to right:

1 US Duplex wall outlet.

1 Weather-resistant Outlet cover (ended up using an indoor cover)

1 PVC FSE Outlet knockout box.

1 Combination Connector (the hardware guy said I would need it, have no idea how to use it - didn't end up in the project)

1 Plastic NM Connector 3/8" - 1/2" - used to immobilize the cord going into the box to reduce solder stresses.

Various standard wire w/ pins. (22 AWG) .92 Amps MAX

1 Arduino UNO

1 Breadboard (ended up not gluing it to the side as it would be hard to see from my current camera angles)

1 G5LE-1 5v DC magnetic Relay - 5-10 Amps 120V AC **This relay sets the maximum threshold for items you plug into the outlet. Anything above the rating of your relay and wire used will result in a risk to life and safety**

3 220 ohm resistors **anything above 150 ohms will work, with the higher resistors providing less light**

See: https://www.evilmadscientist.com/2012/resistors-fo...

3 LEDs (red, yellow, green)

1 3-prong extension cord **Consider solid wire for permanently installed projects, as stranded (extension) cable will wear over time.**

(14 AWG for 5.9 amps MAX See: https://www.powerstream.com/Wire_Size.htm)

Step 2: Safety Equipment

This will vary between projects, tools, and materials used. The US Air Force taught me the basics, and anything is better than nothing.

Eyes: shatter-resistant eye-wear. More coverage = better
Ears: Over-ear headphones, ear-muffs, etc.
Breathing: Bandana/Cloth/Flu-Mask/Respirator/Gas Mask
Skin (Electrical/Fire): Gloves/Uniform/Polyester blended materials?*
Hair: net, hat, or non-metal pins or scrunchies? I don't have long hair, and with DIY projects it's up to you to be safe.

Take off all jewelry, and restrain any loose hair. I have seen too many degloved fingers and patches of hair missing. It's not worth it.

I wear my old uniforms out of function, not fashion. They resist static build up and are fire retardant. You can buy them used at nearly any goodwill or new at a military surplus store and they are generally very cheap compared to commercial garments. They usually have VERY convenient pockets and are utility-based, just remove the rank insignia and branch identifying tapes to avoid "impersonating a federal officer".

I'm sure the USAF would love the idea of putting to use uniforms that are no longer serviceable. Contact your local military base and see if they'll donate them. I know they donate old electronics via AFI 33-112. You just needed to be a legit school/non-profit and ask when the next technical refresh is.

I don't have an ESD mat that is grounded, but I plan on getting one when my budget allows for it, but that generally protects the equipment, not you. I recommend using one, but it's not required for personal safety.

Step 3: Tools

Everything in this project CAN be done with a screwdriver and a self-tapping screw of varying sizes, with different placement of parts and electrical reliability/safety requirements. I don't want my hands to hurt, and I'm too shaky to not use some tools. I have:

(Tool / Cheaper alternative)

Dremmel / Mallet + Chisel (not required, but I thought it looked better)

Power Drill, drill bits / Screwdriver/self-tapping screw

Wire Cutters / Scissors or Teeth (please consult your dentist)

Solder, soldering iron, and/or Wire-Wrap tool - arrived mid-project, but you can use your fingers or pliers.

See: http://everyspec.com/MIL-STD/MIL-STD-1100-1299/dow... - but solder or plugs are suggested for more-permanent results. This was the rule for a telephone frame mounted to 6 feet of cement in the basement - not as much vibration compared to stranded wire in a flimsy plastic box.

Electrical Tape

Hot glue / adhesive / rubber band (reduce vibration stress on soldered joints)

Would be nice: Digital Multimeter (we can make one together, soon)

Step 4: Remove Obstructing Chassis to Final Design.

I want the LEDs on the front, so I wanted to remove the extra screw holes in the outlet. They snap off easily with pliers.

My Arduino from Sparkfun came with a plastic mount for the Arduino. I decided to use it as a guide for drilling screw holes. I taped it to the top and used a 5/64 drill bit as a guide, and then used the thicker bolts to put groves in the plastic so I wouldn't need the nuts on the other side (because I lost them). You can use a screwdriver and self-tapping screw here, but beware, your hands will hurt. I'm not a fan of the Arduino mounting holes, but I ended up using the problematic hole for the grounding wire. Fun fact, 22AWG wire with pins can fit through the Arduino mounting holes.

I ended up removing the top left screw mount to fish my wires through the top later, but you can do this now. If you use a chisel and mallet WEAR EYE PROTECTION and gloves. Beware that it could ruin the final product. I used a Dremel after it chipped in an unexpected way.

I ended up breaking the outlet cover as I didn't buy one that could fit the larger screws and padding (recessed?). I used a 3/16th drill bit on a sample material to fit the LEDs. I didn't line them up at the beginning and ended with an unsafe result. Good luck with yours!

Step 5: Build the LED (user Feedback) Circuit

We have to connect 3 LEDs to 3 resistors, and the Arduino to each pair of LED/resistors. You can save resistors by connecting all three to a single resistor but expect dim lights.

Being a phone troop for 3 months taught me wire-wrapping which I don't see a lot in DIY projects. You can do this easily with wire and diode/resistor leads, while much of everything else has stiffer metal leads. Wrapping by itself works for wires that are not expected to move a lot. I used wire wrapping, bent the LED cathode pin and capped each with solder to make sure I had a reliable connection. I have no idea if this is good practice, but I look forward to critiquing in the comments.

Since the resistors would overlap, I didn't want a short circuit. I put a hole in electrical tape and covered everything but the pin to connect to. It wasn't long enough to do a proper wire-wrap, so I did a shoddy solder job later. I wouldn't solder until the end in case something goes wrong.

Step 6: Build the Outlet/Relay Circuit

Remove the duplex bridge. I use the top outlet for the switched circuit, and the bottom one is always-on to provide power to the Arduino. This magic is done via split-wiring.

See a professional on split-wiring in action (not me, but he gave me direction on achieving this project):

If mine is different than his, follow his guidance. I'm not a professional electrician.

G5LE-1 has 5 pins. two are 5v DC. 3 are 120v AC.

Pin : Datasheet Designation : Laymen

1 : Common : 120V AC Input (HOT)

2 : VCC : 5V DC Input (HOT)

3 : NO : 120V "Normally Open" Output (Ground)

4 : NC : 120V "Normally Closed" Output (not used in this project)

5 : Gnd : 5v DC Output (Ground)

Datasheet : https://omronfs.omron.com/en_US/ecb/products/pdf/e...

Since the relay is the last piece to the project, I began soldering to it and hot-glued it to the back of the outlet to prevent solder stresses. I soldered everything else once it was in place.

Step 7: Solder

for the consolidated ground, I drilled a hole in flat solder I spilled on my table, placed it on the post, and melted it on. My hands shake too much for me to want to do it another way. I thought it was a good idea, feedback is welcome!

Step 8: Assemble

With everything soldered and secure, begin assembling the project. I ran into an issue where my light placement could short-circuit on the environment ground. I fixed it by placing electrical tape on the surface but noted that the screw wouldn't come into contact with it either.

I left the breadboard off my project for the best camera angles, but if your prototype needs to be more mobile, consider affixing it to your outlet chassis by using the sticky surface on the back of most breadboards.

I left the Arduino on the top because I thought I might design a shield to go with the power/motor pair. That way, you can remove/reuse the Arduino in other projects when your current one isn't in use!

Modular Logic, Motors, and Sensors, with a basic user interface for dangerous procedures, was the goal. There's room for improvement, and room to add this to your modular prototype designs as well!

Maybe the logic that controls daily appliances can improve with backward compatibility and user-defined requirements on the motor and sensors to buy. Dreaming big, but I hope I inspired you to get started in designing your own electronics! This has been Whitt, on EngineeringWithWhitt. I'm glad we learned something together!

Review:

It seems most designs have diode-out and resistor-in designs to components to control the possibility of short-circuits. Not having these in the presence of a short-circuit can cause a jump in voltage and amplitude (the stuff that kills you in electricity). I couldn't get it to work with the diodes and resistors I have available and I figure a 22 AWG wire will be "safe enough" to prototype on in the meantime as it should melt/burn during a time I am not touching it, or reduce the amplitude enough when heating up so it's not lethal and just really wakes me up *fingers crossed*. Arduinos can always be replaced. I'll have a fire extinguisher at the ready! Please consult a professional before making/selling/giving a project to someone else that uses elements from my instructable(s). The idea works, but with local "professionals" refusing to give advice due to legal fear, I wasn't sure how to make my first project safer.

Step 9: Consider Joining My Community!

This is my first project on Instructables! and only project I've shared publicly. I would love to continue doing this, and have a $120/month budget that my wife gave me for now. She wears the pants, and looks great in them! *wink*

Please read my mind-map of how I intend to interact with you, my community!

https://coggle.it/diagram/XJlWS-IIly4fNW_s/t/creat...

I'm disabled physically, but I'm fortunate enough to receive veteran benefits to get by with a *little* help of my wife! The military equipped me with the mind of an engineer. I would like to help you solve real, everyday problems. Until I get better at making projects, I will be strict function over fashion, but when it comes to DIY, isn't that the idea? The more problems we fix together, the more granular problems we can influence. The more funding I get, the more manufacturing limitations I can overcome. I know enough safety know-how and basic electronic principles to not kill myself, and disabilities that make the remaining risk negligible.

I hope to get deep in Arduino, Raspberry Pi, and even making my own open-source software to make your home or business "smart". Any revenue generated will only go back into making new projects, equipment, and maybe the electricity that we use in making them. If I can design a way to be open about my funding and spending, I have no problem sharing it. Eventually, I would like to inspire the younger audience in making their own uniforms to show off their own projects and what they've learned. I hope to create something to help you remember where you started. My uniform is blank too, let's learn something together. Patches will come as I can afford new designs. I have a quote for ~$20 to design each badge. I have a manufacturer, but my budget doesn't allow for badge designs yet.

I would like to live stream whenever I work on a project to both get and give feedback on different projects. My mind has indexed a plethora of military standards, which I have noticed are similar to public standards but provided publicly without payment. I'm not trying to get certified to work commercially yet and want to share my hobby with you, but as safely as possible with publicly available references, literature, and examples.

Twitter: https://twitter.com/WithWhitt

YouTube: https://www.youtube.com/channel/UCxL8b3b4pl93b9qb1...

Twitch: https://www.twitch.tv/engineeringwithwhitt

Share

    Recommendations

    • Arduino Contest 2019

      Arduino Contest 2019
    • Trash to Treasure

      Trash to Treasure
    • Tape Contest

      Tape Contest

    10 Discussions

    I posted on instructables to get feedback as to how to make this safe because qualified professionals were unwilling to give constructive feedback elsewhere.
    I don't have the money to keep trying with new parts. People on this site and this community are not the people I'm looking to collaborate with. This will be my only post here. You all take care.

    1
    None
    yknivag

    12 days ago

    This must be one of the most dangerous projects I have ever seen on this site.

    There is far too little isolation or insulation between the low and high voltage sides. There is no fuse to protect the dangerously under-rated relay or the under-rated flex.

    Not only could this kill you when you touch it it could just as easily burn down your house.

    Please when working with mains voltage pass the design by a qualified electrician or electrical engineer before using it and definitely before offering it as a tutorial for others.

    1 reply
    0
    None
    MennoLabs

    12 days ago

    I read your instructions twice and still don't get what you are choosing to do here.
    What code is running on the Arduino?
    What input on the Arduino makes your relay activate?
    What determines when which LED is lit up?
    On which input of the Arduino are the LED's?
    On which output of the Arduino is the relay?
    Coggle gives me a "diagram not found" error.
    Please include your schematic here, so we can give you feedback.
    And besides that: you are going to fry your Arduino by hooking the relay up to it directly.
    First off, it needs about twice as much current to drive it as your Arduino can safely provide.
    Put a transistor in between.
    Secondly, inductive voltage spikes when closing the relay can damage your Arduino.
    Use a flyback diode.
    There is a good Instructable on hooking up a relay to an Arduino:

    https://www.instructables.com/id/Driving-a-Relay-With-an-Arduino/

    1 reply
    0
    None

    I should probably clear that up but this project doesn't do anything, yet. There isn't code associated with it. It's meant to prototype other projects. There are 4 wires coming from the box expecting 5v. Red, yellow, green, white, and black. The colored wires are LED inputs. The white, is relay input. The black wire goes to digital ground.

    How is it going to fry my arduino? The relay's datasheet says it requires less amps at 5v than what the arduino can provide. I assure you it works, but if it's going to fry down the road, I'd like to fix it now.

    As for the schematic, which software do you recommend? Coggle is mind-map software. And I've been doing this for all of a couple weeks. I know my level of skill handling mains power is not safe, but I'm dying anyways. May as well bridge the knowledge gap for those not fortunate enough to have a formal education.

    As for the voltage spikes, I thought I made that clear when I said the project isn't safe. That will be fixed when the diodes arrive. I only had a starter kit and the g5le relay I bought years ago. I didn't budget for it because I didn't know I needed it yet. (referencing my skill)

    I'll be sure to clear everything up when the parts arrive. Thanks for the feedback!

    0
    None
    iggyts

    12 days ago

    Technical correction in your post of assembly, in the review portion. Amperage, current, is what kills you in electricity, specifically if the path of least resistance goes through your heart and disrupts the pulse. (It's why you should never rest your unused hand on a conductive surface. Also, AC is more dangerous at lower current because of this.) Although, amplitude, if meaning range of voltage in AC, can too, if it's high enough. Good read, will comb through it again later.

    1 reply
    0
    None
    engineeringwithwhittiggyts

    Reply 11 days ago

    I've electrocuted myself across my heart about 9 years ago on mains power in Germany. It's why I wanted to create this project. Thanks for the reply, I'm not a professional.

    1
    None
    DavidW856

    12 days ago

    good 1st project!! very detailed. I like it!!