Remote control socket розетка

Remote Control Sockets

Introduction

You can now buy remote controlled sockets very cheaply. If you want to turn some mains-powered things on and off with your computer but don’t want to get involved with Relays and wiring up mains then controlling these could be a great idea.

We’re going to use ‘Status’-branded sockets.

With these sorts of remote-controlled devices there are two ways of controlling them.

The Easy Way

Open up the remote control and then connect wires from Espruino to each pushbutton. This way, you can simply control whatever you want by faking a button press.

The Hard Way

Or, you can buy a radio transmitter and can then try and duplicate the remote control’s functionality. This is harder, but more flexible (you could control lots of sockets), and obviously more fun!

The sockets I’m using are 433.92Mhz ones (it’s written on the back). This band is an ‘open’ band — you don’t need a license to use it, and it’s a complete free for all. Every device has its own protocol, and they all transmit whenever they want. This means that there is quite a large likelihood that the signal that you send will not arrive intact so most devices send the same signal several times.

The Protocol

Unless you have a storage oscilloscope, working out the protocol of your particular sockets is remarkably difficult. In order to make the tutorial a bit easier I’ve described it below. There’s also this post on the PicAxe forum that describes it very well.

  • There are 25, equally spaced bits
  • A ‘1’ is represented as 0.9ms ON, and then 0.3ms OFF
  • A ‘0’ is represented as 0.3ms ON, and then 0.9ms OFF
  • The 25 bits are repeated continuously (as long as the button is pressed), with a pause between them of around 8ms.
Читайте также:  Перенос розетки для варочной панели

You’ll Need

  • An Espruino Board
  • A 433Mhz Radio transmitter/receiver pair
  • A CC3000 module (if you want to web-enable your sockets)

Working out your code

By far the easiest way to work our your code (and if your remote control sockets use the same protocol) would be to use a digital storage oscilloscope, but we’ll try and use the Espruino here.

Wire the 433Mhz receiver up as follows:

433Mhz Espruino
GND GND
VCC 3.3
DATA A0

Note: We’re using below the suggested voltage here, because it makes the receiver less sensitive and less likely to receive signals from transmitters that are further away.

We know what the protocol is (above) so we’ll try and make something to understand it.

Add the following code:

The function sig is quite hard to understand. It has been written such that the code executes relatively quickly, so it is explained in more detail (with comments) below:

Put the transmitter right next to the receiver and press one of the buttons. You should see a bunch of lines that are all the same (and a few corrupted ones!). They’ll look something like:

This is the transmitted code.

Try pressing different buttons, and you should notice that the numbers at the beginning are the same, and the ones at the end change (except the final 0). It should all look something like:

Button Code
ALL OFF . 10000
ON 1 . 11110
OFF 1 . 01110
ON 2 . 10110
OFF 2 . 00110
ON 3 . 11010
OFF 3 . 01010
ON 4 . 11110
OFF 4 . 01110

So now we’ve worked out the code, we can write a transmitter.

Making the Transmitter

Wire the 433Mhz transmitter up as follows:

433Mhz Espruino
GND GND
VCC BAT
DATA A0

And now reset Espruino and put in the following code, replacing the number in CODE with any of the block of numbers that you got.

Now you’ll find that when you press BTN1, it will turn Socket 1 either on or off!

Internet Enablement

Next, Wire up the CC3000 as described in this link and use the following code (Changing the WiFi access point and code):

When it instructs you to connect to an IP address, type it into your web browser. You should now see a simple Webpage with Socket on or off written on it. Click on either to change the state of Socket 1!

This page is auto-generated from GitHub. If you see any mistakes or have suggestions, please let us know.

© 2017 Pur3 Ltd (Printable Version) π

Источник

remote control socket

1 remote control socket

гнездо для подключения пульта дистанционного управления

[Я.Н.Лугинский, М.С.Фези-Жилинская, Ю.С.Кабиров. Англо-русский словарь по электротехнике и электроэнергетике, Москва, 1999 г.]

Тематики

  • электротехника, основные понятия

2 remote control socket

3 remote-control socket

4 remote control socket

5 remote control socket

6 remote control socket

7 remote control socket

См. также в других словарях:

Internet socket — In computer networking, an Internet socket or network socket is an endpoint of a bidirectional inter process communication flow across an Internet Protocol based computer network, such as the Internet. The term Internet sockets is also used as a… … Wikipedia

Comparison of Java Remote Desktop projects — This page is a comparison of Java Remote Desktop projects available for various platforms. Comparison chart Project License Date Version Protocol Technology Server Client Web Client Multiple Sessions … Wikipedia

Transmission Control Protocol — TCP (Transmission Control Protocol) Familie: Internetprotokollfamilie Einsatzgebiet: Zuverlässiger bidirektionaler Datentransport TCP im TCP/IP‑Protokollstapel: Anwendung HTTP SMTP … Deutsch Wikipedia

Canon T90 — The Canon T90, introduced in 1986, was the top of the line in Canon s T series of 35 mm Single lens reflex (SLR) cameras. It was the last professional level manual focus camera from Canon, and the last professional camera to use the Canon FD lens … Wikipedia

Olympus AZ-4 zoom — The Olympus Olympus AZ 4 zoom is a 35mm compact camera SLR camera (i.e. it has automatic features and the viewfinder sees through the lens, you cannot change the lens). It appeared in the 1989 Batman film. It is almost identical to the Ricoh… … Wikipedia

гнездо для подключения пульта дистанционного управления — — [Я.Н.Лугинский, М.С.Фези Жилинская, Ю.С.Кабиров. Англо русский словарь по электротехнике и электроэнергетике, Москва, 1999 г.] Тематики электротехника, основные понятия EN remote control socket … Справочник технического переводчика

TRS connector — 1⁄4 in TRS connector Trip … Wikipedia

Digibox — For other digital television receivers, see set top box. An Amstrad Digibox with Viewing Card Inserted … Wikipedia

Список портов TCP и UDP — Эта статья содержит незавершённый перевод с английского языка. Вы можете помочь проекту, переведя её до конца. В данной статье приведён список портов TCP и UDP, ко … Википедия

Power strip — Power bar redirects here. For the manufacturer of energy food products, see PowerBar. French/Belgian power strip A power strip (also known as an extension block, power board and by many other variations) is a block of electrical sockets that… … Wikipedia

Electricity meter — Typical North American domestic analog electricity meter … Wikipedia

Источник