Controlling a projector screen with an ESP

I'm trying to automate my home cinema, and I got a projector screen with a wealth of integration options (IR, RF, button panel, 12V trigger). One of those is a small box with three buttons (Up, Down, Stop). I've disassembled it to take the picture below:

The white/green/red wires lead to an RJ45 connector that is plugged into the projector screen case.

Now, I'd like to create a new button panel that functions exactly as the old one, except that I'd like to be able to issue an HTTP request/use MQTT to simulate button presses. The reason I'd like to keep the buttons is both so that I can manually control it if the smarthome system is down, but also in case I need to quickly stop it.

I'm not sure whether or not I'm on the right track, so please feel free to suggest a different approach.

I have the following questions:

  • Am I right in understanding that the STOP button on the above image is equivalent to pressing both UP and DOWN simultaneously?
  • Would an ESP8266 be suitable for this project?
  • I assume I'll need some kind of relay to replicate the functionality buttons. What kind would I need? An optocoupler?
  • Should the relay just be placed in parallel with the buttons?
  • This is potentially a dumb question, so bear with me. Would be possible (and a good idea) to power the ESP8266 from the voltage I assume is present on the UP/DN wires? (I haven't measured anything yet).
  • Can I just grab any random diode that suits the voltage, or is there something I need to be aware of?

Thanks for taking the time to read this!

  • It certainly looks that way. Makes sense - “Up” and “Down” together means “Stop”! :astonished:
  • You want to connect to the Internet? ESP is automatically the first choice!
  • An optocoupler will probably suit. The first thing you need to do is to use your multimeter to detect exactly what voltage is between the common white and each of the other wires with no buttons pressed. Then you can set it to a current measuring mode and see what current would flow when a button is pressed. This will allow you to judge what device will suit.
  • Yes. Not a problem, whatever the “relay” is.
  • No. Nowhere near enough current available and conencting anything that draws current woudl be effectively “pressing” the button. Same problem as powering a “smart” light switch in the house when there are only the two wires and no neutral, though since a light generally draws a fair bit of current to operate, that sometimes is practical.
  • Why would you need a diode? (Those are in fact, general-purpose diodes, SMD version of 1N914 or 1N4148.)

Does it have an IR remote? Arduino can usually emulate that.

Thanks for your answers, @Paul__B. I'll measure it as you described. For 5, I figured there probably wouldn't be much current, but I hoped an ESP didn't use much either for such a simple circuit. Duely noted, I'll try to figure out how to power it from mains. I must be able to find a tutorial on that somewhere, and a power supply off of ebay or something.

As for 6, I don't know if I'll actually need it. I assumed it was there on the original circuit for a reason :slight_smile:

@aarg: It has both an RF and IR remote, but I figured a hard wired solution would be more stable. I do see your point though about it being simpler to do.

chucara:
As for 6, I don't know if I'll actually need it. I assumed it was there on the original circuit for a reason

The two diodes are to implement the "stop" function by effectively pressing both "Up" and "Down" simultaneously. Easier than trying to do so with fingers and no need to explain how to the user. :grinning:

(Of course, in many situations, pressing both "Up" and "Down" simultaneously might be very undesirable. Because these here are merely inputs to a well-designed logic system, this is not a problem but perfectly desirable. :sunglasses: )

If you are doing this digitally, your logic will be perfectly able to simultaneously switch both inputs - and you only need two - to achieve the same effect.

It would likely be simpler to emulate a remote control.

Ok, so I measured it today. The voltage is 3.7V on both terminals, and if I'm measuing it correctly, the current is 2.4mA. But I'll be honest and say that I have some doubts about that, as I'm not 100% sure how the decimals work on my meter. I still haven't figured the bar in the bottom out.

When measuring the current, the projector started moving as if I had pressed the key. I'm assuming that's normal.

chucara:
OK, so I measured it today. The voltage is 3.7V on both terminals, and if I'm measuring it correctly, the current is 2.4mA. But I'll be honest and say that I have some doubts about that, as I'm not 100% sure how the decimals work on my meter. I still haven't figured the bar in the bottom out.

This essentially confirms that the buttons are connected to logic inputs and the logic voltage is presumably 5 V. At 5 V, 2.4 mA would correspond to a 2k2 pull-up resistor in the unit. Another useful check - with power off - would be to confirm that the white "Ground" wire is securely connected to the ground on the screen unit - you said it had a "12 V" control input as well, and presumably a ground on the power cord.

OK, now you want to interface this to an ESP8266, since you want to use WiFi. Because of the different logic voltages and the possibility of one part being powered when the other is not, I think it would be best to use optocouplers (so the ground does not matter anyway :grinning: ). The PC817 is basically the current "goto" for this, just connect the output transistor between the "up" or "down" connection and the ground and to guarantee it will switch 2.5 mA, you need to feed the LED with 5 mA which the ESP can easily do with a 390 Ohm series resistor.

chucara:
When measuring the current, the projector started moving as if I had pressed the key. I'm assuming that's normal.

Well, of course, the current measuring range approximates a dead short, so you clearly had "pressed the key", that is exactly what should happen and answers your question 4.

First of all, thank you so much. You've been a godsend.

So, if I understand you correctly, the schematic would look something like the one below - and I must apologize for my childlike abilities in Eagle. I haven't used it that much, yet I've even managed to forget how to do ground nets.

The GND and 3V3 feeding into the ESP will likely come from an external AC adapter. Either a 5V barrel jack or via USB. With a voltage regulator as described here: A Beginner's Guide to the ESP8266

The SW switch is a safety measure to ensure the screen cannot be rolled down unless a door that opens under it is closed. I've yet to find out exactly how to implement this, but it either will be an off-board component with some sort of reed switch, or I'll simply place this gadget close to a magnet on the door and run an ethernet cable to the projector screen. It's only a foot or two at most.

OK, so the wrong component image for the opto-isolator, that is illustrating a MOC3021!

chucara:
The GND and 3V3 feeding into the ESP will likely come from an external AC adapter. Either a 5V barrel jack or via USB. With a voltage regulator as described here: A Beginner's Guide to the ESP8266

You have clearly illustrated an ESP-01.

To actually use the ESP-01 in a project, a very convenient way is with the cheaper adapter board, plugged into a USB "phone charger" so you have both the 5 V and 3.3 V conveniently supplied.

Aliexpress item

You have three GPIO conveniently available by soldering to the adapter, and the fourth - serial Rx - can be separated from the USB chip if necessary by cutting a track

To program the ESP-01, the best way by far is to use the purpose-built USB programming adapter:

Aliexpress item

chucara:
The SW switch is a safety measure to ensure the screen cannot be rolled down unless a door that opens under it is closed.

i was wondering about that when I first saw the diagram. :grinning:

You do of course, realise that disabling the "Down" connection also disables the "Stop" function by actuating both control lines and in fact turns it into an "Up". command. :grinning:

I've (albeit briefly) considered the fact that I'll be disabling the Down action as well as the stop. The important part here is ensuring that someone won't accidentally move it down while it is up. If it already down, the door is definitely closed :smiley:

Nonetheless, I have moved it in the schematic. It seems more correct that way.

I'll be sure to pick the right components before I start soldering. I haven't tried any PCB manufacturing services, but I stumbled upon jclpcb yesterday, so I might give that a try. If I do that, I'll definitely need to pick the right ones.

I found out I had a few ESP01S from previous projects, so I might as well use those.

The MOC3021 was added before you posted which one I actually needed, and I forgot to replace it :smiley: I have updated the schematic to match.

I'm hoping I can print the board 1:1 so I can double check that the stuff I have actually matches what's in Eagle :smiley:

Next step is breadboarding it out, but I'll have to wait a few weeks for ebay to deliver the diodes, and a reed switch.

Once again thanks. Best case this would have taken me a lot longer to do. Worse case I couldn't have done it, and average case, I'd have made a lot of mistakes along the way :smiley: (I probably still will)

Just uploading my final schematic (unless someone can spot any mistakes) in case someone else needs it. But also as this thread contains all the documentation I need in 6-8 weeks when the parts arrive from China.

Compared to previous revisions, I've added the voltage regulator and a screw terminal for the reed switch that will ensure the door is closed.


And just throwing in a few keywords for the google bots: elite screens saker tab tensioned wall box

Using ground fill to provide extra heat-sinking on the regulator?

Absolutely! (Now that I've googled what that is) :smiley:

In truth, I had heard about ground planes, but figured that noise won't matter in this type of circuit. Then I figured that I'd slap a heatsink on the LM1117T, but if I can just use the copper on the PCB for that, I'll definitely try to figure out how to do it in eagle.

EDIT: I just checked the datasheet for the LM1117T, and it states that "tab is Vout". Does that have any bearing on the design?

Were you thinking something along these lines? (identical on both sides and vias to transfer heat)

That would certainly be one way to do it. You need a heat transfer insulating washer under the TO-220.

The ESP doesn’t use a lot of currant, peaks at a few hundred milliamps as it transmits to WiFi but how much time it does that depends on how much activity it will be having.

Whoah.... Did the OP say there was a RF remote for the screen?

If it's on 433 MHz, then the Sonoff RF bridge flashed with Tasmota software is all he needs.
No surgery required.

SteveMann:
Whoah.... Did the OP say there was a RF remote for the screen?

If it's on 433 MHz, then the Sonoff RF bridge flashed with Tasmota software is all he needs.
No surgery required.

Very good point, but I'm leaning for the wired solution for a couple of reasons. I still want the physical buttons, and a safety measure to ensure that it won't move the screen down if the door behind it is open. Also, I really want to learn more about electronics in general, and this seems like a simple enough project to pull off for me.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.