Close
0%
0%

Simple, Compact Wireless Measurement

Measure, probe, and monitor voltage and current remotely!

Similar projects worth following
I work with wireless devices, and field testing is annoying because I have to get up every few minutes to measure a voltage of a battery, or to monitor the current draw every few minutes to ensure that it is correct.

I designed a compact BLE device to do the same basic measurements that I would be doing with a multimeter. Wireless measurements is a feature that you'll usually only see in more expensive equipment. The goal is to enable simple monitoring of other devices that I am prototyping.

To operate it is simple: just plug it in and it will start streaming data over BLE immediately. No need to set up servers or anything.

I kept it minimalistic to allow others to replicate and improve on the design. It is extensible in almost every way: add pin toggling to trigger the circuit, output PWM signals, change the MCU to one that you like... the possibilities are endless!

It is also super beginner-friendly: the entire design can be breadboarded and used as-is.

Assemble it with off the shelf parts

Most aspiring hobbyists don't have a full SMT workstation. I didn't when I started out. I only had a crappy soldering iron. Since the goal is to allow everyone to be able to build one themselves, I made sure that the design is completely breadboard-able. The caveat is that the overall build will be bigger. Hopefully this can be a launching point for an interest in building things - by building something cool that helps you to build the next thing better.

If you already have some prototyping skills, this project serves as a good challenge for you to build up your other skills: program a new MCU in Arduino/Other SDKs, learn how to do PCB/PCBA assembly by modifying the KiCAD files, or write data collection interfaces using the Python scripts/Flutter code as a starting point. Extend it further!

If you are already an expert, perhaps this device will be useful for you to have - measure and collect data from multiple points wirelessly to see how your device performs in the field.

Requirements

1. Soldering iron (optional)

2. Solder (optional)

3. A phone or computer with Bluetooth to connect to the device to see the data.

Use

Connect wires from the voltage or current measurement outputs. When the device is powered, the MCU will automatically start measuring voltages and pushing the converted values to the Bluetooth chip. The converted values are in the format "[voltage_1],[voltage_2],[current_1],[current_2]"

If you are using the provided App or script, it should print out directly to your screen.

Assembly

Manufacture the board using the zipped KiCAD assembly and solder the components on (purchased from the BOM list). If you prefer, you can also breadboard it using the devices I have listed below.


Wireless

The JDY-08/HM-11 forms the wireless core of this project. It is an extremely cheap (<$2) Bluetooth BLE module that already has a complete set of AT-like commands preprogrammed. The key usefulness of this module is that it already has a transparent mode included as part of the application, which allows us to send arbitary sets of data to and from the IC.

I wanted to use Bluetooth because it is low-powered so that the entire project can be powered off a single AA battery. It is also simpler to stream the data over Bluetooth.

MCU
To make it easily programmable, is paired with ATMega-328P, the 'Arduino' chip. This also means that you don't need a special board to use it. Breadboard a breakout for an Arduino Uno, wire it to a Teensy, or build your own board as I have done here.

Alternatively, use SiLab's Laser Bee MCU that is specifically designed to collect analog data and work at 3.3V.

Power
To make it usable and safe, it can take either an AA rechargeable or standard alkaline non-rechargeable battery. I think this provides better flexibility in power options - you can get batteries at a gas station, but it is unlikely you can do the same with a LiPo. I use a single battery here to minimize bulk, with a step-up voltage boost regulator to get it to 3.3V for the MCU and wireless device.

Since it is low powered, I expect a non-rechargable battery to last about a week of continuous data collection or half that for a non-recharable bettery.

Additional advanced functionality includes:

1. uA current measurement

2. Sleep mode

3. Graphing App

4. Record data in App (in development)

5. Pin toggling (in development)


Obtaining Data

To retrieve data very simple. simply use nRF connect app to scan for "JDY-" device. Once connected, first service will output the data from the wireless measurement.

For remote data collection, you can also a Raspberry Pi 4's Bluetooth, or your computer's, and use the provided script to scan and connect to the device. With this method you can SSH into a remove Rpi to collect sensor data about your device.

You can also use the dedicated App to scan for and connect to devices, which will then display and graph the information from...

Read more »

main.py

Python Code

x-python - 1.28 kB - 08/02/2021 at 14:05

Download

simple_wireless_measurement.ino

Updated to only send data when it is connected

- 1.95 kB - 07/22/2021 at 00:23

Download

x-zip-compressed - 21.38 kB - 07/21/2021 at 23:49

Download

breakout.sch

Eagle SCH

sch - 114.96 kB - 07/21/2021 at 23:49

Download

breakout.brd

Eagle BRD

brd - 60.44 kB - 07/21/2021 at 23:49

Download

View all 11 components

  • Going nano

    Ben Lim10/01/2021 at 18:53 0 comments

    The next version of the board is a 17mm x 30mm board that has the following improvements:

    1. Precision voltage reference - no matter what the input, there will be a reliable reference
    2. Change of current measurement IC - now it can measure from -0.1V to 30V.
    3. Addition of Hall Effect sensor

    The Hall effect sensor is meant as a tool to wake the device - since it is so small now, it can easily be used as a monitoring device for another circuit in a semi-permanent or permanent installation. With the Hall sensor, it can be used to wake the device remotely for measurements on a as-needed basis. Since the addition of the High Voltage Element, I've not found a reason to use it, so I might remove it for something else.

    Do you have any ideas about what other features that might be interesting to add? Let me know!


  • Low Power features

    Ben Lim09/17/2021 at 17:25 0 comments

    As part of the ongoing development, I wrote some lines of code that enables low power features to extend the run time of the device.

    Hall Effect Sensor - this is good as a wireless button to trigger the module

    EFM8 Snooze Mode - When the EFM8 goes into Snooze mode, it stops code execution and turns off all clocks - this drops power consumption from about 5mA to 30uA.

    Bluetooth Module Sleep Mode - When the Bluetooth module goes into sleep mode, it draws 830uA, down from an average of 9mA @3.3V

    This cuts down power draw from 14mA to 1mA, approximately 14 times less, which extends the runtime of the embedded device.

    This is just the low-hanging fruit however. Further energy savings can be gained from the Bluetooth module by putting a transistor in-line with the power supply, the BLE unit can be turned off completely. This means that the device can be put on standby for 180 days on a coin cell.

    Finally, if the Hall effect sensor circuit is designed so that it cuts off power from the coin cell completely, then the device can be on standby for a long period of time.

    Ref: https://usermanual.wiki/City-Hong-Teng-Yu-Da-Electronic-Technology/JDY-08/html

  • Precision voltage reference

    Ben Lim09/10/2021 at 04:07 0 comments

    Now that you have your whole analog system set up, what do you actually reference to when taking measurements?

    Previously I didn't really care about how I was taking measurements because the ADC reading was always good enough - but now when it is actually used to convert into an actual voltage reading, precision and accuracy is incredibly important.

    For the EFM8, by default it takes the VIO as the reference. This is great if you have a clean consistent voltage each time, but in this circuit, it is coming off a step-up voltage regulator, it can vary from 3.28 to 3.34 volts. Now that is problematic because the ADC uses this as reference voltage.

    So for example if your reference is 10V, and you get 10 counts, then it is 1V/count. But if you set the reference to 9V, then it is 0.9V/count. But since you only get counts in your firmware code, so the same count would report a different voltage.

    While trying to determine if I could control the output, I realized that this was a solved problem for EFM8 - just use the precision voltage reference!

    It works superbly, but the only problem is that because I don't have it broken out, I need to solder a tiny bodge wire to a QFN pad....


    A pretty masterful job if I do say so myself!

  • Power for the Mini Version

    Ben Lim08/27/2021 at 04:08 0 comments

    The next version is in development!


    To really realize the dream of being able to make these throwable micro-multimeters, it should be able to run off a tiny tiny power supply. That for me would be a CR2032 battery.

    At 3V there is a a peaky spike of 25mA, if we want to be really pessimistic, we would only be able to get 40% capacity out of the 225mAh battery, which is 90mAh, which works out to 3 hours under constant load.


    But the average draw is 13mA, which works out to about 75% of the rated capacity, 170mAh, which works out to approximately 10 hours. The actual time of running this device should then fall between 3 to 10 hours.

    One way to extend this is to include a hall-effect sensor that can be used to wake up and sleep the module - this would be useful when you have no access to the module - think about when it is in an enclosure.

    Reference

    https://www.embedded.com/how-much-energy-can-you-really-get-from-a-coin-cell/

  • Power consumption

    Ben Lim08/24/2021 at 21:34 0 comments

    For power consumption, the device draws 48mA on average at 1.2V and 15mA on average at 3.3V

    For a small AAA battery that is rated for 1000mAh, that means that it can last about 20 hours on continuous broadcast. I think that's pretty respectable especially if you can turn it on and off.

    We could put a fuel gauge in-line as well.

  • Schematic and IC reference documents

    Ben Lim08/17/2021 at 03:27 0 comments

    Pinout for the EFM8 QFN32 IC
    Pinout available on the debug adapterConnection reference
    Schematic reference

  • New Part Day

    Ben Lim08/17/2021 at 03:14 0 comments

    The parts are here and testing has begun! Unfortunately I made a mistake and it took me a few hours to figure out why my part was not responding: I didn't connect VIO to power - so that's what you see with the little botch wire there.

    Unfortunately I'm still having trouble with programming the EFM8, and I think that has something to do with my rework, even though it looks good to me. As far as I know, the EFM8 only requires power and debug to be connected in order for it to be programmed.

  • Test of the Current Sensor

    Ben Lim08/03/2021 at 13:08 0 comments



    This is a MAX9938 NanoPower Op Amp being tested. Because I didn't want to make a whole new circuit just to test this, I decided to use a breakout board for an SOT23 footprint, and then soldered a 0805 5R6 resistor across the terminals. It is put in series with a 1k resistor, and the output was 0.923V. I measured the resistance across the terminals of the current sense resistor and it was 5.7 ohms. The voltage is scaled by 50.

    Calculations

    V = 0.923 V / 50  = 0.01846 V

    V = IR

    I = 0.01846 / 5.7 = 0.003296A

    Given that voltage is 3.3V, and measured resistance is 983

    Vb = 3.3 - 0.01846 = 3.28154V

    R = 983 ohms

    I = 0.003338A

    Percentage error = (0.003338 - 0.003296) / 0.003338 =  1%

    Conclusion

    It is not a fantastic result, but it does work for our simple measurement purposes.

  • Scanning script is up!

    Ben Lim07/31/2021 at 14:41 0 comments

    The script to scan for the device is up! What it does is that it reads the characteristic that is outputting the value and parses it.

    Remember to change the MAC address used in the script to match your device!

    The script is hosted at the project's Github

  • Android App first look

    Ben Lim07/27/2021 at 15:19 0 comments

    Here is a first look of the Android app. At this point it has not connected to a device yet, so no data is being displayed. It is written in flutter, so I expect that it can be converted to iOS and Android once I am done with it.

    I think it makes sense to go with a phone app to display the data because it is a screen that we carry with us at all times anyway.

    The next step is to show it working remotely over an SSH connection.

View all 16 project logs

  • 1
    Buy BOM items

    Insert the JDY-08 breakout board into the breadboard. Connect the TX, RX, 3.3V, and GND lines.

  • 2
    Breadboard devices

    Connect the circuit as indicated above. The inputs to the system are Voltage 1 and Voltage 2, (Cin,Cout), and (Cin2,Cout2).
  • 3
    Solder the Current Sense Amplifiers / Connect the current sense module

    Solder the current sense amplifiers onto the breakout board and the male headers

View all 8 instructions

Enjoy this project?

Share

Discussions

nodemcu12ecanada wrote 07/31/2021 at 16:24 point

You can also monitor, record and control from anywhere using MQTT and NodeMCU.

Creating a HMI with gauges and graphs takes seconds.

https://sites.google.com/site/nodemcu12e/#h.bagvjtiwx7l3

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates