A wireless transmitter without battery, works on EV1527 encoding scheme. Radio transmission with fully secure wireless channel.
Software apps and online services
Story
Batteries are the heart of any electronic circuit, the impossibilities of making a wireless circuit without batteries is now eliminated by this DFRobot mini generator based Rf circuit. Remote controllers 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.
![](https://dfimg.dfrobot.com/652ce179aa9508d63a4326b8/community/83da09b21d68923247e74a1bff1fbbd3.gif)
This self-powered wireless switch from DFRobot can send signals 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 the kinetic energy of the press into electrical energy that will be rectified and stored by the RF circuit later, by which a signal can be transmitted wirelessly. This can be used in devices, such as making wireless doorbells, pagers, food ordering devices, wall switches etc.
Components Required:
· Arduino UNO
· Gravity DFRobot self powered wireless switch
· Gravity DFRobot radio receiver
· Custom PCB from PCBWAY
Damage and Chip burning conditions:
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. 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. Press Frequency should not more than 4 times per second, continuously rapid press will cause energy accumulation that cannot be consumed in time, and eventually burn the chip.
Basic Principle of energy generation:
![](https://hackster.imgix.net/uploads/attachments/1728671/emi_eRJIJvN6jp.png?auto=compress%2Cformat&w=740&h=555&fit=max)
This energy generation principle is given by Faraday, When a magnetic field and a conductor (such as a coil of wire) interact, an electromotive force (EMF) or voltage can be induced in the conductor. For voltage to be generated, there must be relative motion between the magnetic field and the coil. This can be achieved by moving the magnet through the coil, moving the coil through the magnetic field, or changing the strength of the magnetic field over time.
![](https://hackster.imgix.net/uploads/attachments/1728672/screenshot_2024_06_27-2_vNX4hDmou8.png?auto=compress%2Cformat&w=740&h=555&fit=max)
The voltage induced in the coil is directly proportional to the change in field and total number of loops in a coil. In this case here, we have a copper coil underneath the PCB and the button is pressed having a magnet attached on the other side, which is overall used as an emf generating device.
Features:
This wireless switch is a transmitter unit, which can be programmed as per radio channel output. And to keep the information safe, random address codes are used. In order to interpret these codes, we have to pair the receiver manually. The pairing procedure is given below.
· 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
· The lifetime of 100, 000 presses
Specifications:
· Working Frequency: 433Mhz· Transmission Rate: 10kbps· Encoding Format: EV1527· Output Power: 13dBm· Modulation Method: OOK· Power Generation Energy: 600uJ· Press Down Force: Typical 1800g· Action Method: Automatically rebound after pressing down· Stable Transmission Distance: Indoor 40 Metres
![](https://hackster.imgix.net/uploads/attachments/1728673/mini_img_4386_b3s4mQEkom.jpg?auto=compress%2Cformat&w=740&h=555&fit=max)
Distance Test Condition: Straighten the wire antenna of the transmitting module, and for the receiving module, use [Gravity: Digital wireless switch receiver(433MHz).
Connections and pins:
![](https://hackster.imgix.net/uploads/attachments/1728674/mini_6bbcaa5a6e580ad6abc502f573598e02_UqFHm3vRYB.png?auto=compress%2Cformat&w=740&h=555&fit=max)
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.
Transmission of codes from transmitter side:
![](https://hackster.imgix.net/uploads/attachments/1728675/mini_img_4381_uEZ7XITbs7.jpg?auto=compress%2Cformat&w=740&h=555&fit=max)
There are 4 DIP switches on the PCB, these switches are used to select the channel. 16 different combinations can be made with these 4 DIP switches. Receiver part also has 4 channels, it recognizes the combination of DIP switches on the transmitter end and turns on the respective channel. All the 4 channels can be activated at the same time if all the DIP switches in the transmitter are in ON state. To change this behaviour of the receiver see the Mode switch part of this tutorial in detail.
Pairing of transmitter with receiver:
![](https://hackster.imgix.net/uploads/attachments/1728676/pairing_schematics_rx_pEvG3LwXgq.png?auto=compress%2Cformat&w=740&h=555&fit=max)
Receiver: Upload the pairing receiver code in Arduino UNO and Connect the receiver with Arduino Uno as shown in the schematics below.
![](https://hackster.imgix.net/uploads/attachments/1728689/serial_output_pair_VhK2Yu1AEp.png?auto=compress%2Cformat&w=740&h=555&fit=max)
#define Button_D2 2 //Arduino
void setup() {
Serial.begin(115200);
pinMode(Button_D2, INPUT);
}
void loop() {
if (digitalRead(Button_D2)) {
Serial.println("Pressed:D2");
delay(1000);
}
}
Transmitter: Dial all 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). For pairing we need to attach a battery with this transmitter unit. After pairing, the transmitter can be used without battery. Press the button on the receiver, the receiver will turn on a blue light at this time, and enter the waiting state for pairing.
![](https://dfimg.dfrobot.com/652ce179aa9508d63a4326b8/community/8f0583320da724f82cafa7620d907deb.gif)
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. Wait for the blue light of the receiver to flash three times and light up again, then the pairing is successful. Disconnect the 3.3-5V DC power supply from the self-generating switch and wait for 5S to release the stored excess power. Press the button, the receiver will receive the signal at this time.
![](https://dfimg.dfrobot.com/652ce179aa9508d63a4326b8/community/81621106a7b7735addeb2092303dbf6a.gif)
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. If the pairing fails, repeat the first two steps. You only need to pair any one of the transmitters D0-D3, and the other three will automatically match.
Radio receiver and Clear pairing:
The receiver used in this tutorial is EV1527 encoding format, 433Mhz one from DFrobot. Here is another example tutorial,to use the digital radio transmitter and receiver pair from DFrobot. Any other receiver of the same specification and encoding scheme can be used with this transmitter unit.
![](https://hackster.imgix.net/uploads/attachments/1728693/mini_6a92898b47adae63821d761b8deb7717_Grff0hFJwT.png?auto=compress%2Cformat&w=740&h=555&fit=max)
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.
Mode Switch:
In this DFrobot, Gravity receiver unit we have 4 different modes. The receiver is in inching mode by default, the following examples all take inching mode as an example. If there is no requirement for using other modes, you can skip this step. In the above example I used the receiver in Inching mode, which is default mode.
Inching: After D0 receives the signal once, it stays high until D1-D3 receive the signal
Latching: Each time D0 receives a signal, the corresponding output state is inverted once, the same is true for D1 to D3
Self-locking: D0 receives the signal and outputs high level, but does not receive the signal low, the same is true for D1 to D3
Interlocking: When receiving the signal D0, D0 stays at a high level, and all the others are low. The same applies to D1 to D3.
Press and hold the button for 0.5 to 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.
![](https://hackster.imgix.net/uploads/attachments/1728694/mini_img_4391_OQEbCRC4wJ.jpg?auto=compress%2Cformat&w=740&h=555&fit=max)
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 to 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.
Working of Transmitter and Receiver unit:
After pairing and setting the device modes, we can connect any external load to the receiver part, Receiver part needs a microcontroller unit in order to run any sophisticated device used with it. The microcontroller can be used to turn ON/OFF different things and we can increase the number of channels using a multiplexer with an Arduino which is the topic for another tutorial.
![](https://dfimg.dfrobot.com/652ce179aa9508d63a4326b8/community/cdfc84a3787319637caa275a064817e0.gif)
In order to operate it with simple load, for example, LEDs and other indicators no need for a microcontroller unit. And in order to run DC motors with the same receiver we need a motor controller in between, because current carrying capacity per channel is very low and only works on 3.3 to 5V.
Example of receiver with Arduino:
![](https://hackster.imgix.net/uploads/attachments/1728696/main_schematics_rx_rTpzMmwo9t.png?auto=compress%2Cformat&w=740&h=555&fit=max)
Upload the main receiver code in the Arduino, and connect the receiver with arduino according to the given schematics.
![](https://hackster.imgix.net/uploads/attachments/1728697/serial_ouput_aenayRqDat.png?auto=compress%2Cformat&w=740&h=555&fit=max)
#define Button_D2 2//Arduino
#define Button_D3 3//Arduino
#define Button_D4 4//Arduino
#define Button_D5 5//Arduino
void setup() {
Serial.begin(115200);
pinMode(Button_D2, INPUT);
pinMode(Button_D3, INPUT);
pinMode(Button_D4, INPUT);
pinMode(Button_D5, INPUT);
pinMode(6, OUTPUT);
pinMode(7, OUTPUT);
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
}
void loop() {
if (((digitalRead(Button_D5)==0) && (digitalRead(Button_D4)==0) && (digitalRead(Button_D3)==0)&& (digitalRead(Button_D2)==0))) {
Serial.println("State:0");
digitalWrite(6, LOW);
digitalWrite(7, LOW);
digitalWrite(8, LOW);
digitalWrite(9, LOW);
delay(500);
}
if (((digitalRead(Button_D5)==0) && (digitalRead(Button_D4)==0) && (digitalRead(Button_D3)==0)&& (digitalRead(Button_D2)==1))) {
Serial.println("State:1");
digitalWrite(6, HIGH);
digitalWrite(7, LOW);
digitalWrite(8, LOW);
digitalWrite(9, LOW);
delay(500);
}
if (((digitalRead(Button_D5)==0) && (digitalRead(Button_D4)==0) && (digitalRead(Button_D3)==1)&& (digitalRead(Button_D2)==0))) {
Serial.println("State:2");
digitalWrite(6, LOW);
digitalWrite(7, HIGH);
digitalWrite(8, LOW);
digitalWrite(9, LOW);
delay(500);
}
if (((digitalRead(Button_D5)==0) && (digitalRead(Button_D4)==1) && (digitalRead(Button_D3)==0)&& (digitalRead(Button_D2)==0))) {
Serial.println("State:4");
digitalWrite(6, LOW);
digitalWrite(7, LOW);
digitalWrite(8, HIGH);
digitalWrite(9, LOW);
delay(500);
}
if (((digitalRead(Button_D5)==1) && (digitalRead(Button_D4)==0) && (digitalRead(Button_D3)==0)&& (digitalRead(Button_D2)==0))) {
Serial.println("State:8");
digitalWrite(6, LOW);
digitalWrite(7, LOW);
digitalWrite(8, LOW);
digitalWrite(9, HIGH);
delay(500);
}
if (((digitalRead(Button_D5)==0) && (digitalRead(Button_D4)==0) && (digitalRead(Button_D3)==1)&& (digitalRead(Button_D2)==1))) {
Serial.println("State:3");
digitalWrite(6, HIGH);
digitalWrite(7, HIGH);
digitalWrite(8, LOW);
digitalWrite(9, LOW);
delay(500);
}
if (((digitalRead(Button_D5)==0) && (digitalRead(Button_D4)==1) && (digitalRead(Button_D3)==0)&& (digitalRead(Button_D2)==1))) {
Serial.println("State:5");
digitalWrite(6, HIGH);
digitalWrite(7, LOW);
digitalWrite(8, HIGH);
digitalWrite(9, LOW);
delay(500);
}
if (((digitalRead(Button_D5)==0) && (digitalRead(Button_D4)==1) && (digitalRead(Button_D3)==1)&& (digitalRead(Button_D2)==0))) {
Serial.println("State:6");
digitalWrite(6, LOW);
digitalWrite(7, HIGH);
digitalWrite(8, HIGH);
digitalWrite(9, LOW);
delay(500);
}
if (((digitalRead(Button_D5)==0) && (digitalRead(Button_D4)==1) && (digitalRead(Button_D3)==1)&& (digitalRead(Button_D2)==1))) {
Serial.println("State:7");
digitalWrite(6, HIGH);
digitalWrite(7, HIGH);
digitalWrite(8, HIGH);
digitalWrite(9, LOW);
delay(500);
}
if (((digitalRead(Button_D5)==1) && (digitalRead(Button_D4)==0) && (digitalRead(Button_D3)==0)&& (digitalRead(Button_D2)==1))) {
Serial.println("State:9");
digitalWrite(6, HIGH);
digitalWrite(7, LOW);
digitalWrite(8, LOW);
digitalWrite(9, HIGH);
delay(500);
}
if (((digitalRead(Button_D5)==1) && (digitalRead(Button_D4)==0) && (digitalRead(Button_D3)==1)&& (digitalRead(Button_D2)==0))) {
Serial.println("State:10");
digitalWrite(6, LOW);
digitalWrite(7, HIGH);
digitalWrite(8, LOW);
digitalWrite(9, HIGH);
delay(500);
}
if (((digitalRead(Button_D5)==1) && (digitalRead(Button_D4)==0) && (digitalRead(Button_D3)==1)&& (digitalRead(Button_D2)==1))) {
Serial.println("State:11");
digitalWrite(6, HIGH);
digitalWrite(7, HIGH);
digitalWrite(8, LOW);
digitalWrite(9, HIGH);
delay(500);
}
if (((digitalRead(Button_D5)==1) && (digitalRead(Button_D4)==1) && (digitalRead(Button_D3)==0)&& (digitalRead(Button_D2)==0))) {
Serial.println("State:12");
digitalWrite(6, LOW);
digitalWrite(7, LOW);
digitalWrite(8, HIGH);
digitalWrite(9, HIGH);
delay(500);
}
if (((digitalRead(Button_D5)==1) && (digitalRead(Button_D4)==1) && (digitalRead(Button_D3)==0)&& (digitalRead(Button_D2)==1))) {
Serial.println("State:13");
digitalWrite(6, HIGH);
digitalWrite(7, LOW);
digitalWrite(8, HIGH);
digitalWrite(9, HIGH);
delay(500);
}
if (((digitalRead(Button_D5)==1) && (digitalRead(Button_D4)==1) && (digitalRead(Button_D3)==1)&& (digitalRead(Button_D2)==0))) {
Serial.println("State:14");
digitalWrite(6, LOW);
digitalWrite(7, HIGH);
digitalWrite(8, HIGH);
digitalWrite(9, HIGH);
delay(500);
}
if (((digitalRead(Button_D5)==1) && (digitalRead(Button_D4)==1) && (digitalRead(Button_D3)==1)&& (digitalRead(Button_D2)==1))) {
Serial.println("State:15");
digitalWrite(6, HIGH);
digitalWrite(7, HIGH);
digitalWrite(8, HIGH);
digitalWrite(9, HIGH);
delay(500);
}
delay(100);
}
![](https://dfimg.dfrobot.com/652ce179aa9508d63a4326b8/community/0fd31ef78f56dc2349e8ef594c4d5716.gif)
Any combination of DIP switches on the transmitter is able to produce the same output on the receiver side and the operation can be manipulated by the arduino hence a faithful wireless communication set between the TX-RX pairs.
Schematics
Code
This article was first published on Hackster on June 28, 2024
cr: https://www.hackster.io/sainisagar7294/battery-less-self-powered-radio-transmitter-4d935e
Author: sagar saini
![licensBg](/images/license_bg.png)