Introduction
In life, remote controller can be seen everywhere, and most of them are inseparable from the battery. However, we often encounter problems when using the battery, for instance, it is troublesome to replace the battery, batteries are easy to corrode in a humid environment, or the waste batteries may cause serious environmental pollution. Do you know that wireless remote control can actually work without batteries!
This self-powered wireless switch from DFRobot can send signal wirelessly without installing a battery. The switch is composed of a micro generator and a 433Mhz radio frequency circuit. Based on the principle of electromagnetic induction, the micro generator converts kinetic energy of press into electrical energy that will be rectified and stored by the RF circuit later, by which a signal can be transmitted wirelessly. It is suitable as a maintenance-free switch for long-term monitoring of changes in the state of pressing, collision, etc., such as making wireless doorbells, pagers, food ordering devices, wall switches, etc.
A receiver is required when using this product. It is recommended to use it with our official Gravity: Digital wireless switch receiver(433MHz), or other receivers that support EV1527 decoding format and 10Kbps decoding rate.
Note: After the module is connected to the DC power supply, it is forbidden to press the power push button since the generated excessive energy may burn the chip.
Note: When pressing the power generation button or using DC power, at least one of the dip switches on the module must be dialed up, otherwise the chip will be burned.
Features
- No battery needed, maintenance-free
- Wireless signal, wiring-free
- RF signal, strong penetration
- Onboard 4-position DIP switch, adjustable 15 states
- 1 million sets of random address codes
- Lifetime of 100,000 presses
Specification
- Working Frequency: 433Mhz
- Transmission Rate: 10kbps
- Encoding Format: EV1527
- Output Power: 13dBm
- Modulation Method: OOK
- Power Generation Energy: 600uJ
- Module Size: 47x25x11mm(LWH)/1.85x0.98x0.43”
- Press Down Force: Typical 1800g
- Action Method: Automatically rebound after pressing down
- Action Distance: 2.6mm (end point)
- Press Frequency: no more than 3 times per second, long-term rapid press will cause energy accumulation and cannot be consumed in time, and eventually burn the chip
- Stable Transmission Distance: Indoor 40M
- Distance Test Condition: Straighten the wire antenna of the transmitting module, and for the receiving module, use Gravity: Digital wireless switch receiver(433MHz)
Board Overview
Name | Function |
---|---|
1. DC input terminal | The DC power input terminal, 3.3V-5V, can transmit signals directly after being connected to the DC power supply. Used to pair with the receiver; |
2. DIP switch | Key value selection, dial up to select, from right to left is D0~D3, One must be dialed up when using |
3. Power Push Button | Generate energy when pressed |
Receiver Operating Instructions
The receivers in this tutorial all take DFRobot's Gravity: digital wireless switch receiver (433MHz) as an example. The principle is similar when using receivers from other vendors.
Mode Switch
Note: The receiver is in inching mode by default. The following examples all take inching mode as an example. If there is no special requirement, you can skip this step.
Mode | Description |
---|---|
Latching | After D0 receives the signal once, it stays high until D1~D3 receive the signal |
Self-locking | Each time D0 receives a signal, the corresponding output state is inverted once, the same is true for D1~D3 |
Inching | D0 receives the signal and outputs high level, but does not receive the signal low, the same is true for D1~D3 |
Interlocking | When receives the signal D0, D0 stays at a high level, and all the others are low. The same applies to D1~D3. |
Press and hold the button for 0.5~1.5 seconds, then release it, the blue indicator light flashes twice, indicating that you have entered the mode switching state, and then you can enter different modes according to the different times of pressing the button within 6 seconds:
Press once to enter the latching mode;
Press twice to enter the self-locking mode;
Press 3 times to enter the inching mode;
Press 4 times to enter the interlocking mode;
According to the mode you need to enter, press the button for the corresponding number of times, and then hold the button for 0.5~1.5 seconds as a confirmation signal. After letting go, the blue indicator light flashes 2 times to set successfully and enter the corresponding working mode. 0.5-1.5 seconds is relatively short, be careful not to press overtime.
Clear pairing
The receiver can store up to 32 sets of transmitter codes. When there are more than 32 sets, the first paired code will be overwritten; Clear all paired transmitters: Press and hold the button on the receiving end for more than 4 seconds. After releasing your hand, the blue indicator light flashes twice to successfully clear all paired transmitters; if the clearing fails, repeat the above operation.
Tutorial
Take Arduino as an example. Other main controllers use the same principle, just need to be connected to the corresponding digital port. The receiving end takes the inching mode as an example, the principles of other modes are the same.
Requirements
- Hardware
- DFRduino UNO R3 (or similar) x 1
- Self-powered Wireless Switch x1
- Gravity: Digital Wireless Receive Switch (433MHz)
- Software
Pairing
Note: After the module is connected to the DC power supply, it is forbidden to press the power push button since the generated excessive energy may burn the chip.
Note: When pressing the power generation button or using DC power, at least one of the dip switches on the module must be dialed up, otherwise the chip will be burned.
- Step1. Supply power to the receiver and prepare a 3.3-5V DC power supply, 3.3.5V power supply can be obtained from the expansion board of the main control such as UNO
- Step2. Dial any one of the DIP switches on the self-generation switch to the top (To avoid misoperation, the D0 terminal will be toggled up at the factory);
- Step3. Connect a 3.3-5V DC power supply to the upper right corner of the self-generation switch, and the self-generation switch will light up in red at this time;
- Step4. Press the button on the receiver, the receiver will turn on a blue light at this time, and enter the waiting state for pairing;
- Step5. Wait for the blue light of the receiver to flash three times and light up again, then the pairing is successful;
- Step6. Disconnect the 3.3-5V DC power supply from the self-generating switch and wait for 5S to release the stored excess power;
- Step7. Press the button, the receiver will receive the signal at this time
- Instruction: The receiver pairing waiting time is 6S, if it does not receive the transmitter's pairing signal within 6S, it will automatically exit the pairing mode.
- Instruction: If the pairing fails, repeat the first two steps.
- Instruction: You only need to pair any one of the transmitters D0~D3, and the other three will automatically match.
Connection
Receiver:
#define Button_D2 2//Arduino
#define Button_D3 3//Arduino
//#define Button_D2 D2 //ESP32
//#define Button_D3 D3 //ESP32
void setup() {
Serial.begin(115200);
pinMode(Button_D2, INPUT);
pinMode(Button_D3, INPUT);
}
void loop() {
if ( digitalRead(Button_D2) && !digitalRead(Button_D3) ) {
delay(20);
if ( digitalRead(Button_D2) && !digitalRead(Button_D3) ){
Serial.println("Received:D2");
delay(100);
}
}
if ( !digitalRead(Button_D2) && digitalRead(Button_D3) ) {
delay(20);
if ( !digitalRead(Button_D2) && digitalRead(Button_D3) ) {
Serial.println("Received:D3");
delay(100);
}
}
if ( digitalRead(Button_D2) && digitalRead(Button_D3) ) {
delay(20);
if ( digitalRead(Button_D2) && digitalRead(Button_D3) ) {
Serial.println("Received:D2&D3");
delay(100);
}
}
}
Expected Results
When only D2 of the module DIP switch is dialed to the top, press the button and the serial monitor will print: "Received: D2".
When only D3 of the module DIP switch is dialed to the top, press the button and the serial monitor will print: "Received: D3".
When D2 and D3 of the module DIP switch are simultaneously dialed to the upper side, press the button, and the serial monitor will print: "Received: D2&D3".
FAQ
Q1: What should be noticed when using this self-powered wireless switch with receivers from other manufacturers?
A: You need to pay attention to whether the receiver supports EV1527 decoding and 10Kbps rate. EV1527 encoding and 10kbps is a very common standard.
Q2: In the "press, store energy, bounce, transmit" mode, immediately release the button after pressing it, and 30M can be transmitted, but if it is pressed for a long time and then released, why the transmission distance can not reach 30M?
A: If you press the button and release it quickly when you use it, you don’t need to consider this issue. To ensure that the stored energy will not accumulate and cause the chip to burn out, a bleeder resistor is added to the system. In the "press, store energy, bounce, transmit" mode, the stored energy will begin to bleed slowly after the button is pressed. If it takes a long time, this part of the stored energy will be slowly exhausted by the bleeder resistor. If you have to press it down for a period of time before transmitting the signal during use, you can remove the bleeder resistor at the energy storage terminal. However, it must be noted that in this state, if a DC power supply is used to power the module (DC power supply is required for pairing learning), the energy storage capacitor will be in a state of full energy after the DC power supply is disconnected. Then a bleeder resistor must be connected to discharge the energy storage capacitor to below 1.5V. If the power generation switch is not discharged at this time, the chip will be burned directly when you press down the button. And when the bleeder resistor is removed, it is strictly forbidden to press the power button quickly in a continuous manner.
The discharge resistors are R4 and R2. R4 is used to dissipate the energy generated when the button is pressed, while R2 is used to dissipate the energy generated when the button is released.
Instruction for Self-powered Wireless Switch
The switch defaults to press to store energy, and bounce to transmit signal. Jumper pads can be shorted to transmit signals when pressed and popped up.
"Press, store energy, bounce, transmit" mode working flow: press the button - energy storage - release the button - transmit signal.
"Press, transmit, bounce, transmit" mode workflow: press the button - transmit the signal - release the button - transmit the signal
It can be seen from the work flow that the "press, store energy, bounce, transmit" mode has one more function of capacitor energy storage than the "Press, transmit, bounce, transmit" mode. Therefore, in "press, store energy, bounce, transmit" mode, it emits more energy and tranmist signal further.
Note: The pressing frequency should not exceed 3 times/sec. Continuous rapid pressing will result in energy accumulation that cannot be consumed in time, and eventually burn the chip.
For any questions, advice or cool ideas to share, please visit the DFRobot Forum.
More Documents
Get Self-powered Wireless Switch -433Mhz from DFRobot Store or DFRobot Distributor.