A preview of the next steps 8051 series for the STC89C52 series. This post will outline the next steps for interfacing
the real world with that microcontroller. As a good case study, we will look through a low-cost Chinese-made electro
muscle stimulation (EMS) unit designed around that microcontroller. Luckily, that microcontroller is socketed by the
manufacturer enabling an easy pathway to hack that unit, possibly upgrading it to the latest research of EMS waveforms
or adding a remote management interface via Bluetooth. One more post that intersects sports training with
retro-computing. Here we go the internals of the TingMay TM-502 Internals.
What is EMS?
EMS has been around in the physiotherapy segment for decades.
In the last few years, EMS also made an entry into
athletics for recovery and conditioning support. In a nutshell, electrical pulses mimic the nerve activation of
specific muscle groups. Depending on the shape and placement of the electrodes, it will activate muscles that are
not typically used in regular conditioning. Some gyms use this in support of weight training, where a “puppet master”
will zap your muscle groups while you engage them with weights at the same time, allegedly tripling your workout
intensity. Well-suited EMS machines used for this typically retail in the thousands. Such units tend to have advanced
envelope- and adaptive-feedback control. Historic and cheap units, such as this one, lack advanced envelope control,
limiting their use to muscle toning or post-workout recovery. With all fancy things, moderation seems to be warranted. CAASN reports that EMS can produce elevated levels of Creatine Kinase and there are limited reports that Rhabdomyolysis can be caused by extensive full-body EMS sessions. Aside from the medical considerations, there is also the electrical
safety aspect of actually using a unit that doesn’t seem to make any claims to conform to EN 60601-2-10 or UL ANSI AAMI 60601-1. So there is a reason why these units can be sourced in bulk for such a low price.
Interestingly, a lot of EMS, toning units and other health devices seem to have the same front-plate design as the
TM-502. The markings on the PCB indicate a design date around 2003, as with other things this circuit seems to be a
platform in China.
Breaking down the Peripherals
The development kit we saw in the first series also has similar peripherals allowing us to look at each of these in
isolation before putting it together for the final hack on the EMS unit. As part of this we will be looking at:
- Button debouncing
- IO multiplexing with 7400-series logic ICs
- 7-segment interfacing
- Soft-SPI and Soft-I2C implementations
- Serial Bluetooth modules
- Classic 8051 timer peripherals
- External ADC interfacing
Then I also have an entire box of sensors and other commonly used modules to round up the series.
Published: 2022-09-29
Updated : 2025-10-04
Not a spam bot? Want to leave comments or provide editorial guidance? Please click any
of the social links below and make an effort to connect. I promise I read all messages and
will respond at my choosing.