My 3 year old grandson is a fan of the Paw Patrol cartoon series. I recently purchased a M5Dial V1.1 from M5Stack and decided that I would make him a Paw Patrol Communicator that he could wear on his wrist and pretend that he was calling the various pups for missions.
M5Dial FeaturesThe M5Dial has a 1.28 inch touch display which is about the size of a large watch face. It has an RTC and LiPo battery support which would make it ideal as the base for a portable watch interface. It uses an M5Stack StampS3A as the MCU unit so it has 8MB of flash, 512KB of SRAM, and a WiFi/BLE interface.
The M5Dial is intended to be used as a panel mounted rotary control/indicator so one drawback in my application is its 32mm height. In my current implementation the overall height above the wrist including the band mounting is about 40mm which is clunky but usable.
M5Dial OOB ApplicationsHere's a quick video showing the Out-of-Box Applications that are available on the M5Dial.
RTC App
A couple of pics showing the RTC time when it's selected.
The battery connector is located below the StampS3A module that needs to be removed to access it. This is straightforward after removing two small hex head screws, just have to be careful because of the tiny 1.25mm pitch header pins. The cavity below the MCU only has space for a battery smaller than 4mm x 12mm x 18mm (HxWxL). I was hoping to find a battery with 50 - 70 mAh capacity but batteries this small tend to be available as special order or bulk purchase. I managed to find a 3mm x 12mm x15mm (301215) on Amazon that even had the correct battery connector but it was only rated at 30 mAh. That battery is shown in the picture below inserted in the cavity. Unfortunately, this was a defective battery that came with no charge (0V) and it also wasn't labeled so I ended up returning it.
I only found one other vendor on Amazon with the same battery except that it didn't come with a connector so I had to splice on a pigtail (I also had to swap the connector pins as they were reversed polarity). Fortunately this battery worked. Pictures below before and after I added the connector.
I have a M5StickC Plus2 with a wristband kit so I decided to use that to mount the M5Dial. I 3D printed a circular housing for the dial with an adapter plate that allowed me to clip it onto the band. The components are shown below.
The assembled unit is shown below running on battery power. You can see that the unit is quite tall. The slot in the housing is to access the USB-C connector for charging and programming.
Next I needed to find pictures of the Paw Patrol Pups online and resize the images to 250 x 250 pixels to fit on the round display.
UiFlow is an online graphical programming IDE that allows programming with either blocks or MicroPython code. The two formats are shown below. I find it convenient to start with a block flow to get the framework and syntax correct and then transfer to doing custom edits to the Python code that is generated since it is quicker to modify the program.
Uploading and testing the program uses a WebTerminal connected to the M5Dial through a USB connection to the host computer. The WebTerminal is also used to access the MicroPython file system on the M5Dial. The WebTerminal Toolbar is shown below.
The root of the flash file system is /flash. When the program has been debugged and is running correctly you can upload it to the M5Dial as the main.py file in the /flash directory using the upload button. This file will execute whenever the M5Dial powers up.
The file system also stores auxiliary files such as image and sound files in the resource directory /flash/res. The WebTerminal enables file transfer to and from the filesystem.
The M5Dial can also be programmed using the Arduino IDE, so I should mention that to use the UiFlow / Micropython flow you will first have to upload the M5Dial Micropython image using the M5Burner app.
Paw Patrol Communicator Image Selection VideoMy iPhone had some issues rendering the colors on the LCD but here is a video of using the rotary dial for Pup image selection.
Paw Communicator AudioThe audio capability of the M5Dial is somewhat limited. It does not have an onboard microphone but it does have an 80dB buzzer that I thought could be used for low resolution audio (voice) output. I found online sites that allowed me to generate text-to-speech 16 KHz WAV files. The quality of the audio isn't bad but I just couldn't figure out a way to get more volume, so it is hard to hear. The M5Dial uses a PWM interface with the buzzer and I think that combined with the buzzer being embedded in the housing mutes the sound a lot.
M5Dial PowerdownThere isn't a power switch on the M5Dial, so it is necessary to implement a method to power it off. There is a "Wake" button available at the bottom under "M5" on the bezel ring that is referred to in the software as btnA. It is necessary to add a trigger event and callback to power down the system. I decided to use a long press to shutdown as this is also the event that is the turn on trigger. The turn on is handled by the M5.begin code, so no code added for that.
I should note that true power off only happens when running on battery. When running on USB the "powerOff" command puts it to sleep. Then you'll need some code for a wake up event or press the reset button. In my case I just recycle power because the reset isn't easily accessible. Everything works as expected in battery mode.
Future Improvement- Larger battery and power management - even without WiFi/BLE the runtime on battery is under 30 minutes
- WiFi or BLE communication - not a communicator yet
- Needs better audio interface - maybe an external I2S microphone and speaker (will require modifying the StampS3A to access the I2S signals)
- Lots of opportunity to add features to software
The primary problems with adding hardware improvements is that the current size is already fairly large. I could probably fit the audio elements around the periphery but don't see an easy way to add a larger battery without adding 8-10 mm of height.
Comments