Make Dumb Electronics Smart for $3

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
These days most electronics have some sort of a smart feature, some sort of a connectedness so that you can control them from an app or from a voice assistant, but not everything. A lot of times it's not worth the cost to the manufacturer to make something like a lamp smart because it just turns on and off, but you can still control that with a smart plug. But unfortunately the smart plug doesn't really handle things that have more than two states like this screen. The screen actually has three states. It's got a go up button, a go down button, and a stop button so you can get it to the right height that you want. And even though it's not made to be smart, I think we can modify this and make it smart. I wanted to point out that this screen is not anything fancy. It's one of the cheapest screens I could get on Amazon. It's a hundred inch screen that's motorized. It's got those same three buttons on a wall control that it has on the remote. And yes, it has a remote. So it doesn't really need to be smart, but why not? And especially if we can make it smart with just a couple of dollars of electronics. First things first, I don't wanna ruin this thing. So I'm gonna leave the wall controls as they are for now unless I absolutely have to mess with them. And instead, I'm gonna try to hijack the buttons on the remote. And by hijack, I mean, I wanna connect the buttons on this transmitter to pins on this little ESP board. Basically, this is a tiny Arduino that's really inexpensive and easy to program. But you know, first things first, let's rip this thing open and make sure it's actually gonna do what I think it's gonna do. So kind of what I was expecting, there are three little buttons which we can easily tap into and kind of fake the button presses, which is the whole point here. The thing I wasn't expecting is that this little remote runs on a 12 volt battery. It's not a huge deal, we can work around it, but I just didn't expect that. Before we move on, we gotta talk about the basic premise here. And if you're not an electronics person, this may help kind of explain what the plan is. Of course, shameless plug, I do have an online course that teaches how to do basic electronics, how to program Arduinos, and how to do projects like this. If you wanna check it out, I'll put links down in the description. But if you don't, let's at least just run over what's happening. If you're an electronics person, you may wanna skip ahead, but if not, here's a very simplified version of what's happening in a remote like this. You've got a battery down here that's passing electricity through a circuit, through a bunch of different components and stuff. And basically you have a little chip here that's waiting for electricity to come from one of three places. When you press a button, you're either allowing or not allowing electricity to pass through a certain place. So these three things act as triggers. When you press one, it lets this little chip know that electricity has come through and that means it needs to do something. And in this case, it needs to send out a signal to say go up or go down or stop, depending on which button you press. And on a microcontroller or an arduino, you've got these little pins that stick out. Using some code that you can write, you can either send or not send electricity through those different pins. And depending on what those pins are connected to, you can trigger or not trigger things. So I wanna use those two things together. I wanna use the pins that I can control on the arduino to hijack or trigger the buttons without actually pressing them. Effectively, I wanna connect some of these pins to the sides of some of these buttons and fake a button press. So that begs the question, how do you tell the arduino when to push a button? Or how does it know what to do and when to do it? Luckily, some really awesome people have written some software to make that very, very easy and I've used it before. A couple of years ago, I actually used the same software to make a remote controlled finger to press a button in my shop when I asked my Amazon devices to push the button. The way this works is basically it's mimicking what these smart devices do to get them on the network and give them functions and you just put it on one of these. Once you've got that software on here, you can name this, connect it to the network and give it commands. Basically, you can make it do whatever you want. So first off, we gotta get some code on this thing. Now walking through code in a video is not very interesting but basically what it did was create three devices on this thing through code and they're called screen up, screen stop and screen down. And before we hook this thing up to the remote and potentially mess something up, let's hook it up to some LEDs just to make sure that the code is doing what it's supposed to do. I hooked up an LED to a pin, each one with a resistor, so that I've got three kind of status LEDs to test this out. Now, I will say, if you're not an electronics person, this may all seem like magic. If you don't know how to code, that may seem like magic, but it's not. It's something that anybody can learn. Our online course starts you at the very beginning. You don't have to know anything going into it, and you can learn all of this stuff, and it's a lot of fun. So here's where we're at. Three LEDs connected to three pins. I just asked my Amazon system to discover devices, and it found all three of the screen up, screen down, and screen stop. And basically, if we just test these out, they turn on the pins. And that's actually all from the example code. I didn't write anything from scratch. I just modified what was there for my particular instance. But along the way, I realized that that software has actually gotten better. It can do more than turn things on and off. It turns out that instead of emulating one of these that just turns on and off, now it emulates a light bulb. So you can turn it on and off, but you can also set the brightness and the color, which means we have a lot more options, and that actually makes it simpler because we don't need three devices, we just need one. So if we're thinking about using this as a single device, it's gonna simplify it because now if we turn it on, it will make the screen go down. If we turn it off, the screen will go up. And then we can set the brightness to be between zero and 100, and that can tell us how far down to go if we even need that. But I don't think we actually even need that. I think we just need a physical button right here that when this hits it, it stops it. So I think we can actually just make a little smart controller that also has a physical limit switch here just to stop the screen when it gets down far enough. I think I've got all the pieces we need to do this, but we have to talk through it because there's kind of a weird translation that has to happen. This is the remote that we've talked about and it's running on a 12 volt battery. This is a 12 volt DC power supply. So theoretically, you could just wire this directly to this and have a remote that was plugged into the wall, which is weird, but that's kind of what we're gonna do. And the problem comes in when we try to hook this thing up because it could take 12 volts in, but it's not really good for it. And if you put too much voltage into something like this, you're basically just gonna melt it. Ideally, you wouldn't wanna put more than nine volts into this, but preferably five, which is why there's a USB port on this. USB provides five volts, almost always. But luckily we've got a really simple way to step down from a 12 volt input to the five that we need. And when you're talking about electronics, there's a bunch of different ways to do this, but one way is just to buy a step down transformer. This will actually take 12 volts in and put five volts out. So it's gonna be perfect for what we need. So getting those things wired together is not really a big deal, but we do need one more component to stop the screen when it comes down to the right height. And that is a limit switch. The switch is actually that tiny little red thing in there and that gets pressed by this arm, no matter where you hit the arm. And the roller on the end makes it so you can pretty much hit it from any angle. This is great when you're trying to detect when something is moving into something or away from something. So step one, let's get all the stuff wired together to make sure that my idea is even gonna work. Then we'll figure out how to integrate the whole thing into the screen. I had my Amazon system detect the screen, and so now it's one of my devices, and it totally works. I've got it set up so that if you power the thing on, it will bring the screen down, and if you power it off, it will take the screen up. But the thing I really needed it to do was for the limit switch to stop it either direction that it's moving, and that works. And that's awesome. I mean, it's basically fully functional at this point, but in addition to that, I accidentally found out something really cool. I had this whole thing hooked up to the computer through USB so that I could write the code and test it, and I didn't have the 12-volt power supply hooked up, and it turns out that that remote doesn't actually need 12 volts. It turns out you actually don't need the 12-volt battery for that remote to work. In fact, it worked just fine with 3.3 volts that came out of the Arduino, which means we can simplify the whole circuit and the whole thing can run off USB power. And with that, the electronics are pretty much done. I just need to add USB power to this, but the next step is to take all of this stuff and put it in something to kind of hide it, but also make it mountable. It's got to sit underneath where the screen comes down so that that bar hits the limit switch to stop it from moving. So now it's time to just do some design. I had to 3D print a few different versions of that to make sure everything would fit well, but also that the USB port was accessible. And now, we've got the final layout and I've got a final design that matches the mural over there. So now it's just a matter of putting this thing on the wall and making sure that it works. As long as I get this to stop where I want it to stop on its own, then I can use that position to make sure that this button is pushed right there. And as long as this is in that place, it should stop it. So I went to try it out and it didn't work at all. Like it didn't do anything. It had power and everything, but it just didn't work. So I took it all out of the case to check the connections and it worked just fine. Then I put it back in the case and tried it again and it didn't work. Basically I did this back and forth for about an hour before I realized that I think the antenna for the remote is right here and I was covering it up with the switch. And apparently that switch is enough to stop it from being able to send any commands to the thing. So I printed a new version of this moving the switch down and I think we're good to go. But while I was in there messing with it, trying to make it work, something else occurred to me. I was using one device to turn it on and off to make the screen go up and down. And I really don't need to. It turned out that it was actually weird to try to turn the screen on and off when there was another switch or other switches that could kind of interrupt that. So basically here's what I changed. I actually ended up changing the code. So now that my little controller has two devices on it, it's got one called screen up and one called screen down. And I can turn both of those things on or off to activate the right button. So if I actually wanted to do this with voice, I would have to say, Alexa, turn screen up on. Which is not a natural thing to say, but I'm actually never gonna say it. The plan is actually to use this thing kind of behind the scenes as part of a routine. And if you're not familiar, when you use a voice assistant, a routine is a way for you to say one command and have it trigger a whole bunch of other stuff. Like for instance, I could say, Alexa, it's movie time. And when she hears that command, she might turn on the LEDs around the top of the room, but turn off the lights. She may turn on the projector and bring down the screen. And then we're ready for a movie. Let's try it out. Alexa, it's movie time. Totally works. Now I did look out a little bit in that the buttons in the remote could take the same voltage that my microcontroller put out. But if that wasn't the case, I could have put a relay in the middle of those. That would let me take a low voltage input and control a higher voltage output. But that's the type of stuff that we talk about in our online course, Arduino for Makers. Again, shameless plug. I would love it if you checked it out. You can watch the first few videos for free. I'll put a link to it down in the description and there'll be a discount down there. That's it for this one. Thanks for watching. It's time for bloopers.
Info
Channel: I Like To Make Stuff
Views: 540,132
Rating: undefined out of 5
Keywords: i like to make stuff, iliketomakestuff, diy, woodworking, metalworking, electronics, 3D printing, prop making
Id: p0t78_R-pzg
Channel Id: undefined
Length: 13min 12sec (792 seconds)
Published: Sat Apr 27 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.