Online Payment Soundbox
About the project
An ESP32-based device that can receive SMS regarding payments, print it on the LCD display and also call out the amount loud. The device includes a DFPlayer Mini module that has an SD card attached to it. Based on the amount received, the specific number is called out using the speaker.
Platforms: Arduino, Autodesk, Espressif
Estimated time: 2 weeks
License: MIT license (MIT)
Items used in this project
In India, online payment has become an integral part of business merchants. Right from small-scale groceries to shopping malls, we can pay for everything using UPI(Internet banking). The only difficulty faced by shop owners is that they cannot check each and every transaction that happens on their mobile phones.
The proposed solution is a device that can notify you when a new payment has been received, and also call out the exact amount using a speaker. In India, every payment merchant can register up to 5 mobile no.s for receiving payment messages through SMS linked to the same bank account. So, by using one of these sim cards, we can fetch the details of the payment received.
The proposed solution uses a SIM800L GSM Module, that can be used to fetch the data from the received SMS. The brain of the circuit is ESP32, which reads these messages and fetches the useful data from the received SMS. This data can be used to speak out the exact amount received to send it to the speaker. For sending this data, we will need some pre-recorded audio messages, which can be stored on an SD Card, and the DFPlayer Mini module used in our device will transmit the data which needs to be called out from the pre-recorded audio messages. The PAM8403 audio amplifier is used to amplify the audio signals and the output of this module is connected to a speaker to call out the amount received. The circuit has an inbuilt DC-DC Buck converter based on the LM2576 IC, which means that the user can provide any DC supply from 7V to 40V for the circuit to operate. The circuit also has reverse voltage protection. There is a provision for connecting an I2C LCD Display to show the amount on the display at the same time when it is called out aloud. This device can prove useful for business merchants that cannot keep their phones occupied on the counter and instead, the Payment Soundbox will be configured such that it will notify other employees that are currently working on the counter.
The PCBs were designed using EasEDA and sent to the EUROCIRCUITS Team for verification.
Later, the complete assembled PCBs were delivered to us for free. The quality of the PCBs is very good and the hardware worked exactly as expected.
Once the PCBs were completely assembled, the next task was to write a stable Firmware for the code.
The following steps were followed by me, and anyone can follow these steps to make the project from scratch.
Step 1: GSM Module Settings
- SIM Card: For this project, I am using my registered SIM Card, which has SMS notifications enabled. If you don't have a valid SIM card, you can add any of your available SIM cards to the recipient's list by visiting the merchant's website. In my case, the application used was PhonePe(An Indian Payment application).
- Once the SIM card is registered, the GSM Module(a module that can send and receive SMS, Calls, etc) is set to receive SMS mode.
- while (Serial2.available() > 0)
- Serial2.println("AT+CNMI=1,2,0,0,0"); // AT Command to recieve a live SMS
- while (Serial2.available() > 0)
By using these two commands, the module is set into receive SMS mode and will start fetching SMS.
Step 2: DFPlayerMini Settings
The DFPlayerMini Module is used to play audio using the various mp3 files already stored in the SD card. For decoding the amount, and calling it out, it has to be bifurcated and only the amount part is to be taken out from the whole SMS string which looks like this.
Step 3: Using this amount, we need to remove the units, tens, and hundreds place of the received amount.
For example: If the received amount is 155.
- int ones = amount % 10;
- int tens = (amount / 10) % 10;
- int hundreds = (amount / 100) % 10;
- int thousands = (amount / 1000) % 10;
The following code will bifurcate the amount(155) into (0 1 5 and 5). Then you can simply call the audio files that are stored on the SD Card.
These files are then called out loud and simultaneously displayed on the LCD Display.
Step 4: 3D Modelling using Fusion 360
The enclosure for this device was designed using Fusion 360 and 3D printed from a local manufacturer.
The video below explains the working of the device.
Leave your feedback...