Show Me the Money

Sachin Soni turned a Makerfabs ESP32-S3 AMOLED display module into a wearable UPI payment device — just scan the QR code to split lunch.

Nick Bild
14 days agoWearables
This tiny wearable device receives payments via UPI (📷: techiesms)

The proper way to design an electronic device is to first define the requirements, then select the best hardware available to meet those requirements. Designing the other way around — starting with hardware, then deciding what it should do — is likely to result in an odd final product that does not really solve any real problems. But as hobbyists, we often run into really interesting hardware platforms that we are determined to use for something, even if we have to shoehorn it in.

While this approach is not advisable, sometimes it does work out. YouTuber Sachin Soni of techiesms, for instance, recently came across the Makerfabs MaTouch ESP32-S3 AMOLED display module and was determined to use it in a project. With a 1.8-inch AMOLED display with a 368x448-pixel resolution and an onboard ESP32-S3 microcontroller, this module looks like it was tailor-made for use in DIY smartwatches. But that is not the direction Soni went — instead he built a tiny UPI payment receiving device.

For those unfamiliar with UPI, it stands for Unified Payments Interface, and it is a popular instant payment system used in India. The idea for the device was to have it display a barcode that other people could scan to send its owner a payment. And when that payment is received, the device should then display the status of the transaction on its screen. Groundbreaking? No, but it certainly makes splitting lunch a lot easier.

To simplify the software side of the equation, Square Line Studio was used to design the graphical user interface. This made it possible to incorporate elements like a home screen, payment display, and QR code generation by simply dragging and dropping elements onto a canvas. The interface was then exported as an Arduino sketch, which could be flashed to the ESP32-S3 microcontroller.

In order to enable UPI payment functionality, Razorpay's payment gateway was leveraged to generate QR codes and receive payment confirmations via webhooks. Adafruit IO acts as an MQTT broker, facilitating the real-time transfer of payment data to the ESP32-S3. The Arduino code was then modified to parse the incoming JSON data from Adafruit IO, extracting the payment amount and displaying it on the AMOLED screen. The code also incorporates visual cues, such as a loading spinner during payment processing and a success indicator upon confirmation.

To put some polish on the device, a 3D-printed case was designed to house the components, transforming it into a wearable pendant that is practical for everyday use. Of course similar functionality could have been built into the smartphone that Soni almost surely carries around everywhere, but where is the fun in that? Sometimes you have to toss aside convention and practicality and have a little fun.

Nick Bild
R&D, creativity, and building the next big thing you never knew you wanted are my specialties.
Latest articles
Sponsored articles
Related articles
Get our weekly newsletter when you join Hackster.
Latest articles
Read more
Related articles