Sometimes I sell stuff online and people dont always want it to get sent to them. Sometimes they want just to come over and pick it up because they live close by, but I cant be home all the time. So what if they would just get an email with a code go to the pickup box, enter that code and get whatever they bought from me. That would be pretty nice, its basically the same system like with those pickup boxes that all the big delivery companies nowadays have, but were gon na, make an open source DIY version. So everybody can build like just one or like a whole system of pickup boxes if they want to lets get started foreign. So the main component of a pickup box is, of course, the door box and I decided to use an Electronics cabinet for that. Its made by Schneider Electric really sturdy, this is used for all the connections and some Electronics in industrial settings. So if you would have a factory, then, basically all the circuit breakers and all the stuff they need for a certain machine would be mounted in there. Its watertight, its dust proof its basically all that I would want ever in a box, so that is my base. What else do we need? We need a thing that lets me enter in the code, a thing that reads the code and determines if its right. So a microcontroller Im choosing an Arduino Leonardo for the job because I have it.

We also need some sort of mechanism that allows the door to be opened only when the correct code is in, and I would also like to know when the door is open or closed. So I can use that for mode selection or basically we also check that the door really has opened when its supposed to for safety and stuff, so critical part is how do we open and close a latch on the door? There are pre made parts for this, so I basically I got online search for door, opening ledge solenoid thing and I got one. They are not very expensive. You can get them between 10 and 20 to 30 Euros depending on the make and model, but all they do is basically, they have a solenoid in there that, if activated releases the latch – and there is also a little micro switch in there – that can tell if The door is open or closed. Basically, if the latch is inserted, then its registered as the door is closed, and you can read that with a microcontroller, pretty simple stuff, not so simple stuff. How do we activate that solenoid solenoids? Take a lot of energy to activate and you should always test before you design anything how much is actually needed to activate them. The solenoid, in the thing that I bought is rated for 12 volts. I think I could go down to 9 volts. I tried that out on my bench, power supply and it does activate, but of course it takes more current to activate it at the same time, with a lower voltage so Im basing my system around 12 volts and coincidentally 12 volts is also a voltage that an Arduino can take in over the barrel Jack.

This is basically my entry point. I use the onboard voltage regulation for the microcontroller, of course, and for all the stuff that I add to it, but I also use the be in pin to pass that on to my solenoid, so were having only one power connection for the whole system: 112, volts And if this relay should activate it opens the door yay, we need to think about. How does the user enter the code and how does the machine give feedback about a code that has been entered? My first idea was pretty complicated, like were using like some sort of Wi Fi controller and then theres a QR code on the box. And if you scan that you get to a web page where you can enter your code and then that is checked and activates. The relay yeah that could work, but its also like super complicated and Im, not sure if that is what most people would want to use like logging into an unknown system and stuff Im. Not sure about that – and I also dont want to expose this thing to the internet, because of course it could be hacked so Im using a simpler version that maybe more of you would be interested in having a keypad where just enter the digits and some buttons And some symbols to make it more complicated and not easy as like guessable and were just using normal LEDs so for every digit that has been entered, one of these LEDs will light up and when they have all written up, then the unit checks the code and Then activates the relay, if its correct and if not, then it goes back to its normal state.

Oh and also it shouldnt forget the code when its rebooted and stuff. Oh, we have to think about a lot of stuff in hardware and software Im gon na start with the hardware lets go to the computer to Calcutt Music. This is the whole schematic for the shield that goes on top the Arduino Leonardo for this project. Doesnt. Look very complicated thats because it isnt very complicated. So here we have the pins of the Arduino, the standard Arduino layout you can tell. I started this Calcutt schematic with the template for an Arduino Uno Shield. Here we have the LEDs, they are all controlled by their own pins. This is the button Matrix. You can see. We use four rows and four columns to form a matrix and each one of these buttons has a diode on it, and that makes sure that if we press one of these buttons, we dont get Ghost presses like by coincidence, some of them lining up and for The computer it looks like another line is also activated, so this allows us to get each individual button push without false positives. This is the input for the door sensor, which is only opening and closing. So if its closed, then this pin will go to ground if its open its pulled High, and here we have our output segment. This is where we connect the solenoid and its connected in between VCC, which is in our case 12, volts and ground.

If this activates, this is a solid stage relay – and this is a mechanical relay – I put both into my schematic. So if one doesnt work, I can populate the other on my board just in case, I understood something in the data sheet wrong. I use the new part and also have a fallback to a part that I have already used and know it works. We also make sure that we have uh. We dont overload the PIN for driving this relay coil, so theres a resistor in between, and that is a basically its everything else is in software and done on the Arduino. Looking at the physical layout, we have the button Matrix here. We have the LEDs on top and on this side we have our inputs and outputs. The power will get over the barrel check into the system and is internally divided by the Arduino for the 3.3 volts power for the microcontroller and for the logic stuff and 12 volts for the relay. If you look at that in 3D, you can see here are the buttons here are all the LEDs and each LED corresponds to a digit in the codes that we have to enter so once we have pressed one of these buttons. One of this, these LEDs will light up and when they all are lighting up, then it will check the code and we see if we have entered everything correctly. Hi Im David from element 14 to the electronics inside join me as I tear down toys tools, appliances, Modern Vintage Classics and even some new releases just to find out whats inside Music foreign Music.

Like many times, plants dont always work at the first try, especially if youre like me and didnt, read the data sheet correctly, so solid state relays only work with AC on the load side. If you put DC in there, they dont deactivate anymore nice to know so. Im, switching out that solid state relay for a normal relay that works with three volt logic levels: Ive used that before in the Raspberry Pi Super 8 camera build a long time ago. I still got one of those, so I put that in great. I designed that in just in case it wouldnt work as I planned. Then we can activate that relay with our software. Speaking of software, we need software lets, go to the computer and look at the Arduino code. Welcome back to the computer and to the Arduino IDE. We are developing some firmware for this pickup box and we have to make sure that the codes that we enter are processed correctly, so they are entered correctly. Then they match what we expect them digit by digit and also in case of a power outage. They those shouldnt, get lost, so I want to be able to set new codes just on device, no refreshing firmware ever, but I also want to be sure that those state in there, even if I lose power and thats the main reason why we have to include The eprom library, yes, we store the code in an eprom, so these addresses are basically just telling me where, in the eprom I will store, which digit and just for Simplicity I just number them 0 to 5.

. We have six digits zero indexed. I use the a different keypad library for reading the keypad. This is really convenient because we just have to tell it how many rows, how many columns and then which letter or which symbol or number is on which position on the keypad and we can use this. Like kind of physical layout for that, which makes it really easy to understand where stuff has to go foreign, that looks like a pickup box, if I do say so myself, mainly because it says pickup box on here, I decided to paint it in bright colors. So people that are looking for the pickup box can actually find it. Otherwise it just would look like an electrical cabinet. We have the keypad mounted on top. I have planned to make a cover on there like overlay, to protect the buttons from moisture, but that didnt work out really. So I will have to postpone that to another time, but the thing is working, the door is locked, so we need to get in and the only way to do that is with the code. So lets try this thing out. Music foreign – nothing in here, but as we can see, I fixed all the cables inside, so the only way to go at the cables is to get inside with the code. Of course you can break everything, but it wouldnt be like worthwhile digging through this case. Just to get on whatever is inside and if you put d mount or rip apart this unit on top here, which is actually pretty sturdy, then all you would get is a tiny hole that wouldnt help you get into the unit.

Lets try out the setting feature. So you are not fixed to one particular code. You can change that without reflashing the firmware. So when the thing is open, then you are able to place stuff inside, but youre also able to change the code with a master password. The master password is hard coded. So that should be this one, okay and it stays on, and that means the master password is correct, and now I enter the new one, which is one two, three four five six then I close it. Okay and now, if I would enter the new password, it should open and it does oh look at this. I got my order. Some resin, a lot of our viewers, are proper engineers and they know how to make good relay controls, not the crude ones that I made. So if you know about flyback diodes and things like that post, your version for a relay control on the element – 14 Community Im very curious to see your proper solutions. To that. Anyway, we have learned to use keypad matrices as controller solenoid and also how to store information that we gather through our device in non volatile memory on an Arduino Leonardo. Let me know your ideas for future projects on the element: 14 Community and download all the files code and cache for free there. I got ta go theres, another project waiting for me, Music.

https://www.youtube.com/watch?v=75ONPctDkY0