Does your pet also look like he has a rocket pack on every time they sees an open gate? This project is to help see when a gate is open after hours.
Our little dachshund likes to go out for his last patrol around 10PM when it is already dark outside and we have motorized gates with way too many remotes and people with access, as is the case normally. Sometimes people leave the gate open or accidentally press the button on the remote or whatever and when i open the front door for my dachshund, i cannot see from the front door whether the gate is open or not due to it being too dark. He then darts down the street with no concern for his own safety and i go panting after him lol :)
In this project, we will make a circuit that flashes two red LED's alternately when the gate is open.
As always, NO SPECIAL KNOWLEDGE NEEDED. Anyone can recreate this project and if there is a step that is a little bit challenging(like for instance soldering)........no problem......there's an Instuctable for that. https://www.instructables.com/id/Soldering-101-for-...
Step 1: Safety.
Electronic components are prone to getting hot or burning when incorrectly connected or handled and can cause a fire.
Depending on how you choose to power your project, there may also be the possibility of a shocking hazard.
The battery type that you choose could also be of concern. Li ion batteries for instance can be very volatile when incorrectly handled or recharged.
Neither myself or this site or anyone (for that matter), but yourself will take any responsibility for any issues that may arise from the recreation of this project.
Step 2: Gather the Parts.
What you will need.......
Fig. 1 - 2 x 4K ohm Resistor
Fig. 2 - 1 x 4v Rechargeable Battery
Fig. 3 - 2 x 5mm Red LED
Fig. 4 - 2 x 560 ohm Resistor
Fig. 5 - 2 x BC547 Transistors (or equivalent)
Fig. 6 - Component Schematic
***(please note that the resistors marked 460 ohm in the schematics are in correct.....i used 560 ohm)
Fig. 8 - Heat Shrink Tubing
Fig. 10 - 1 x 40mm x 30mm perfboard
Fig. 11 - 4 x 2.5v Solar Cells
Fig. 12 - Project wire
Fig. 13 - "Click Pen"
You will also need 5 x 1N4007 Diodes
Just a quick tip.......
Most of these components are sold in lots of 10 to 100 to whatever. So, go for a pack that has for instance 100 pcs 1N14xx so, it will contain let's say 10 1N1001 and 10 1N1007 etc. This way, you will have the parts you need now as well as other values in the same part type that you might need on a next project.
Re- use and recycle as much as you can. Apart from the led's i used......all my parts are de-soldered from old or broken electronics. Even my project case is from an old antenna switch.
There is way too much trash in the world already..........did you know that there is a whole island of trash drifting in the pacific....... see the last picture of this step.
Step 3: Gather the Tools.
8mm drill bit
Hot Glue Gun
Tester (test your components before using them and a continuity tester to check your connections after having soldered the project’s parts together). I have added links that show how to test the components and which testers can be used.
I like to test all components before using them and the further test will be by bread boarding before soldering the project together. If you do not have a breadboard or even know what it is......don’t worry, it’s not a critical or essential step......I just do it because of my own paranoia lol
I absolutely HATE when I have put everything together just to find out that I have to go search for an issue due to a component not working. Also cause most of my components are salvaged and not bought, i tend to have more component failures.
Step 4: Circuit Explanation.
This circuit (Fig. 32) is based on a multivibrator which is one of the staple circuits in the electronics world. The other picture is just a illustration of the working of the circuit. You'll note that ours are a bit different, but it works exactly the same (electronics is fun!)
There are more than one type of multivibrator circuit and the base of these can be used in a very wide range of electronic applications.
They are also known as a flip flop circuit.
I won't go too much into detail, but here is a link that explains it's workings if you wish to peruse it.
***a special that you to Colin Mitchel. The illustration above of the green and red flashing circuit is off his site which has and is helping me a lot in my quest to learn more about electronics.
In simpler terms, we will connect a push switch to the gate and once the gate is opened, the switch releases, switching the circuit on.
The circuit will then flash the two red lights alternately indicating that the gate is open.
I will expand on this a bit by connecting the battery that will power the circuit to some small solar cells, so that the battery stays charged.
So we will be making :
a push switch
a multivibrator circuit
and a small solar charging array.
Step 5: Let's Make the Switch.
***This step is completely optional.
These switches (normally open momentary switch) is widely available, but i did not have one on hand, so i decided to make one. It;s more fun to make your own anyway.
Carefully take apart a "click pen". We are only interested in the top "click" part as shown in Fig. 13.
In Fig. 14, you'll notice that this part has vertical sleeves down the side. This enables the pen.....when you click it, to latch. We do not want it to latch and therefore you need to remove those sleeves. I just used my project knife to cut them away. Be careful not to cut away the rim at the bottom as that rim prevents this part to go through the top.
Bend a wire to resemble that which i have done in Fig. 15 so that it can fit through the top of the pen casing and around the pink part(lol, hopefully yours is not pink)
Now wrap a piece of wire around the crowned edge of the pink part and insert it through the base of the pink part so that it sticks out at the bottom.
Solder a piece of project wire to the ends of each of the wires you prepared in steps 3 & 4.
Put the parts all together as they fit and then slide the spring over the wire that you soldered to the bottom of the pink part, Depress the spring and secure it in place taking care not to stop the wire from being able to move.
.......and we're done with the switch.
When you now press the pink part and it slides into the sleeve, it moves away from the top wire, therein breaking the connection.
We will be placing this switch against the gate so that the pink part is depressed when the gate is closed and released when the gate is open, so when the gate opens and it releases, the two wires make contact on the inside around the pink part and switches out circuit on, making the lights flash alternately.
Please do not use insulation tape as i did to cover the switch......Randofo, https://www.instructables.com/member/randofo/ will probably kick my butt lol.
See why here : https://www.instructables.com/class/Electronics-Cl...
Step 6: Building the Circuit. (Breadboarding)
Because this circuit is a tiny bit more complicated, it is essential to test it first before we solder it together permanently.
If you do not have a breadboard, i will show you a way to do the same as with a breadboard without having a breadboard.
I do however recommend that you get yourself a few breadboards....... they are super cheap, re-usable and worth their weight in gold when you switch your completed circuit on and it works perfectly with no need for troubleshooting after having tested it on breadboard first.
First, I'll give a brief explanation of the breadboard and then i'll explain how to test without a bread board.
From there, we'll dive right in and start putting the circuit together.
Let's do this!
How the bread board works.
The bread board is a small panel that consists of many small holes where you can insert the leads of components and your power source etc.
Look at Fig. 31. The picture on the right shows the bottom side of the breadboard opened.
You can see that on the left and right of the board there are four vertical metal strips where each strip connects all the holes of the front of the board. Kind of acting like a wire or solder line. So anything that is inserted in the holes of the first strip for instance will be connected to anything else that is inserted into that strip.
In the middle there is horizontal strip, these act the same as the ones on the side, each one individually acting as a long connection.
The Vertical strips are used for your “Positive” and “Negative” Rails and the horizontal strips are used to connect your components.
Now, let’s look at the front of the board in the left picture of Fig. 31
Note the red and blue lines and “+” & “-“signs running down the sides of the board vertically, these are the “negative” & “positive rails we discussed above.
Also note that the holes on the vertical sides of the board are numbered and at the top and bottom are alphabetized. This will make it a bit easier for us to follow along. i.e. I might say “place the one lead of the resistor in the fifth hole from the top and sixth hole from the left” or I could say “place the one lead of the resistor in F 5”. The latter is much easier to follow along with.
How to do the same without a bread board.
Remember those scrap pieces of wire that you wanted to throw away after your last project? The ones that the little voices kept telling you to keep?
Well, you’re in luck. The voices were right and now we will find some good use for those little pieces of wire so as to not add to the trash island any further.
Take a piece of wire and crimp one end with pliers so that it softens the end up a bit. See Fig. 29 & 30.
Now that the wire and insulation at the tip is a bit softened, we can easily wedge the lead of a component in there. See Fig. 28
So, we can connect various components to each other and to “+” & “-“ of our power source with little pieces of wire and the little pieces of wire then act as the strip of a breadboard.
Also make some “T” junctions as needed......How? That’s’ easy...
In the middle of one of the pieces of wire, remove a bit of the insulation and connect another piece of wire’s end to that. Now you should have a “T” where you can connect components to 3 ends.
Connecting the circuit on bread board (or using scrap wire).
Where I use an asterix (*) in the explanation it is meant for those using wire instead of the actual bread board.
Focus on the schematic and the steps, the breadboard pictures are there for illustration purposes only and there might be incorrect connections done there.......(I was in a crazy hurry when I did it).
1st BC547 emitter to “-“
* Connect a piece of wire to the emitter but do not connect it to your power source “-“yet.
1st BC547 collector to A 26
1st BC547 base to A 28
2nd BC547 emitter to “-“
* Connect a piece of wire to the emitter but do not connect it to your power source “-“yet.
2nd BC547 collector to A 20
2nd BC547 base to A 22
1st Capacitor “+” to D 26
* Connect a piece of wire between the collector of the first BC547 and the “+” of the first capacitor. Here you will have to make a “T” junction. (See schematic in Fig. 32) There is a junction between the BC547, capacitor and the resistor.
1st Capacitor “-“to D 25
2nd Capacitor “+” to D 20
* Connect a piece of wire between the collector of the second BC547 and the “+” of the second capacitor. Here you will have to make a “T” junction. (See schematic in Fig. 32) There is a junction between the BC547, capacitor and the resistor.
1st Capacitor “-“to D 19
1st 560 ohm resistor to E 26 and F 26
* Connect a piece of wire between the “+” of the first capacitor and one end of the 1st 560 ohm resistor.
2nd 560 ohm resistor to E 20 and F 20
* Connect a piece of wire between the “+” of the second capacitor and one end of the 2nd 560 ohm resistor.
Short lead of 1st LED to G 26
*Connect a piece of wire between the short lead of the first LED and the “+” of the first capacitor on the “T” junction that you made earlier.
Long lead of the first LED to “+“
* Connect a piece of wire to the Long lead of the first LED but do not connect it to your power source “+“yet.
Short lead of 2nd LED to G 20
*Connect a piece of wire between the short lead of the second LED and the “+” of the first capacitor on the “T” junction that you made earlier.
Long lead of the second LED to “+“
* Connect a piece of wire to the Long lead of the second LED but do not connect it to your power source “+“yet.
Still Keeping Up?
Let’s finish this!
1st 3K ohm resistor to E 25 and F 25
*Connect the one end of the 1st 3K ohm resistor to the “-“of your 1st capacitor.
2nd 3K ohm resistor to E 19 and F 19
*Connect the one end of the 2nd 3K ohm resistor to the “-“of your 2nd capacitor.
Place your “pot” with the one “sweeper” at G 16, the other “sweeper” at I 16 and the “base” at H 12.
* You need a double “T” junction here. The two sweepers need to be connected to each other and to the ends of the 1st and 2nd 3K ohm resistors.
Connect a piece of wire between G 25 and F 16 and another between G 19 and J 16.
Connect a piece of wire from I 12 to “+”
*Connect a piece of wire to the “base” of the “pot”. The other end goes to “+”, but do not connect it to the “+” of your power source yet.
Connect a piece of wire form B 28 to B 19.
*Connect a wire from the “base” of your 1st BC547 to the “-“of your 2nd capacitor.
Connect a piece of wire from B 22 to B 25.
*Connect a wire from the “base” of your 2nd BC547 to the “-“of your 1st capacitor.
***This step is very important. The wires need to cross here but where they cross, they do not connect to each other. See Fig. 19
Turn the adjusting screw of your “pot” all the way clockwise, now turn it all the way counter clockwise whilst counting how many turns is made from one side to the other, now turn it back clockwise half the amount of turns that you counted.
*This step is the same instruction for both bread board and wire users.
Connect the “+” of your power source to the “+” of your bread board on the side closest to J
*Connect all the “+” end of your wires that I said earlier not to connect yet to each other and then to the “+” of your power source.
Connect the “-“ of your power source to the “-“ of your bread board on the side closest to A
*Connect all the “-” ends of your wires that I said earlier not to connect yet to each other and then to the “-” of your power source.
Give yourself a pat on the back! Your LED’s should now be flashing alternately.
If they are not flashing, disconnect the power source, refer to the end of the instructable where I will have a “Trouble shooting” section. Do not stress too much if it is not working right away, there are many factors that I’ll explain later that can contribute to this circuit not working, and so we might have to do some fine tuning.
If they are flashing, admire your “magic” for a bit then disconnect the power source and buckle down so that we can carry on completing this project.
Step 7: Making the “permanent” Circuit.
At this point, if your circuit is working and the LED’s are
flashing alternately we can go ahead and transfer this to our perfboard and solder it all together.
If your circuit is not flashing when you power it up, go to the trouble shooting step first and get your circuit to flash before returning to this step.
This step will be the easiest because we already laid such good groundwork by bread boarding.
Basically you just need to transfer the components one by one from the bread board to the perfboard and make the connections the same as on the breadboard then solder it to the perfboard.
Once you have soldered the components to the perfboard we need to do some cleanup work.
If you use the same kind of perfboard I have then there are silver strips running from one end to another which connect components. I said to solder components together because I have little to no trust in those strips, they can sometimes give “bad connection”. But in having ignored them, we now actually have some unintended connections that we need to go and get rid of.
The one end of the resistor is connected to the “pot” and the other end to “positive rail”, but between the two leads of the resistor, there is still a piece of silver strip. Now, we want the power to run from the “pot” through our resistor to the “positive rail” (or actually visa versa), but it now runs through the metal strip too, so we simply need to take off the metal strip between the legs of the resistor. Take an 8mm drill bit and place it against one of the holes of the unwanted strip and roll it back and forth between your fingers whilst applying a bit of pressure. That will easily remove the metal film exposing the perfboard material and “breaking” the unwanted connection. Don’t use a drill for this, only the bit. The material is soft and a drill will create a hole right through the perfboard. Repeat this step everywhere where there are “silver strip” connections which are not mentioned in the steps and also do the same between rows of components Take your nail clipper and remove any excess wire of the components. Now take the continuity tester and ensure that all your connections are good. https://www.google.co.za/url?sa=t&rct=j&q=&esrc=s...
Step 8: Making the Solar Circuit.
First a quick explanation.....
The important numbers to look for when working with solar cells is the voltage and the mili-amp/hour rating.
In this case I used 2.5v 200mah cells, but this represents us with somewhat of a problem. Our battery is 4v, so we will never get it fully charged then.
Here’s the trick.....
When solar cells are connected in series, the voltage of the cells can be counted together to give the total output and the mah will remain the same. So if we connect two cells of 2.5v and 200mah in series we will end up with an output of 5v and 200mah.
When solar cells are connected in parallel, the mah of the cells can be counted together to give the total output and the voltage will remain the same. So if we connect two cells of 2.5v and 200mah in parallel we will end up with an output of 2.5v and 400mah.
The mah is the total milliamps per hour that the solar cells will supply to your battery.
Your battery will also show a voltage and a mah rating. This is the total amount that the battery can hold. In this case my battery is 4000mah.
So, if we want to increase our solar cells voltage AND mah output we connect two in series and another two in series and then we connect the two series pairs in parallel which will give us an output of 5v and 400mah.
Generally your voltage from your solar should be 1 ½ the voltage of the battery which ours is not, but it will do the job for this application.
Looking at the mah output of the solar cells and the mah storage potential of our battery, it should take 10 hours for the battery to charge which should also be fine given that daylight time is also around there.
There is another issue though....
If there is not sufficient sun and your solar cells stop charging the battery and the battery then discharges into the solar cells, we will destroy our solar cells. That is where our 1N14007 diodes come in, they only allow electricity to flow in one direction, so if we place them facing the battery from the solar cells, the electricity can only flow from the solar cells to the battery and not vice versa.
So, now that we know how.....let’s get to it.
See Fig. 33
Connect a diode between the positive and negative lead of each of your solar cells with the grey line of the diode on the positive side.
With two of the solar cells, connect one’s negative lead to the other’s positive lead.
Do the same with the other two solar cells.
Connect a diode from the positive side of both pairs of cells to your positive rail with the grey line of the diode on the solar cell’s side.
Connect the negatives of both pairs to the negative rail.
Now for some cleanup.....
Solder all the connections together and put some heat shrink tubing over all of the connections melting them in place with a lighter or heat gun. Do not use your soldering iron to melt the heat shrink tubing......why?..... JUST DON’T! :) .......that’s why.....
Then you can use your glue gun to glue all your panels to one flat surface (preferably black). I used the top of a Tupperware container.
I made another circuit which rotates the solar panels throughout the day and follows the movement of the sun, but that is a whole other instructable. See the link below....
There are also many more possibilities for this circuit like including a photodiode in a dark detector configuration (remember we built three for our garage parking assistant https://www.instructables.com/id/Garage-Parking-Ass...) to the circuit so that the circuit only flashes when it is dark outside.
Step 9: Bringing It All Together.
Now we need to connect the switch, flashing circuit battery and solar cells together.
Connect one wire of the switch to the "-" wire of the flashing circuit and the other wire of the switch to the "-" of your battery.
Connect the "+" wire of the flashing circuit to the "+" of the battery.
Connect the "+" of your solar array to the "+" of your battery and the same with the "-"
Mount your project to the gate where you need it so that the switch is depressed when the gate is closed and released when the gate is opened. Make sure that your project is nice and water tight and that your solar panels are placed in such a way that they get maximum sun during the day.
Step 10: Troubleshooting
So, i followed all the steps and this thingy is not working.......what now???
1. Go over all of your connections one more time and make 100% sure that they are exactly as described and they fit the circuit diagram Fig. 32.Use a continuity tester to check your connections.
2. Manufacturers of electronic components generally allow for 20% variance, so a 560 ohm resistor can be anywhere between 560 + 20% to 560 - 20% The LED's rely on the current limiting resistors, the two 560 ohm ones, so it might be that your LED's are not exactly rated the same as mine. Therefore try another value resistor start with 460 ohm. Make sure that you change both with the same value.
3. Try changing the 3K ohm resistors with different values. Go lower or higher gradually.
4. If none of the above works........take a clear picture of your circuit showing the connections and post it in the comments section and i will see if i can help from there. If not, I'm sure that we can consult one of the ever so helpful experts within the community.
Step 11: The Last Word.......
The reason for this instructable is because I am a complete novice myself and by sharing, maybe some will improve on my concept and also share.
I want to reiterate, I am at best a novice when it comes to electronics, so if you have technical questions, they are better directed at the awesome and always very helpful experts within the instructables community.
This instructable is made with my fellow novices in mind too, so I over explained everything in an attempt to be as clear as possible, but if anything is not clear please let me know, so that I can edit and improve this instructable to better assist you and others.
Also, this is my very first instructable, so any constructive comments to better any future instructables I might write will be greatly appreciated.
I stated earlier that this instructable is not to teach electronics etc., but if you accidentally learned something during the course of this instructable......i apologize lol. Hopefully this at least sparked a bug in you to go and learn electronics....HAVE FUN! :) https://www.instructables.com/classes/tagged/elect...
I also want to take this opportunity to thank the instructables community for this awesome site that helps so many people.
Again, if you made it, SHARE IT! If you have a better solution or shortcut, SHARE IT!
Participated in the
First Time Author Contest 2018