Professional USB Cable Manufacturer Offering OEM & ODM Service in China

bluetooth wireless interface for mitutoyo calipers and indicators

by:ShunXinda      2019-09-06
There are millions of Sanfeng digital calipers, millimeters, indicators and other devices in the world today.
Many people like me use these devices to collect data directly into the PC.
This eliminates the need to log in and enter hundreds of values at times, but it also raises issues related to the fact that there are laptops in the store that may be discarded or damaged.
This is especially true if the measurements are made on large parts, or if the standard Sanfeng data line is not long enough.
A few years ago, I built a similar device based on HC.
The 05 Bluetooth module and some Arduino micro-controller boards allow me to put my laptop on the table and make measurements in a range of up to 50 feet.
The device works fine, but there are a few problems.
Did not show when the transmitter battery was fully charged, did not show the Bluetooth connection status, and did not show the data transfer was successful.
It\'s big and bulky and looks like a science project!
Even with these restrictions, others in the store prefer to use it instead of using the Sanfeng USB cable.
This project overcomes these limitations of old equipment, adds more features, and is more professional for less than $100.
The interface consists of two parts: transmitter and receiver.
Connect the transmitter to the meter using a data cable permanently connected to the meter and connect the receiver to the PC using a micro USB data cable.
On the transmitter, slide the switch to the cable end and turn on the switch.
On the receiver side, the blue LED initially flashes, indicating that there is no connection, and the LED will stop flashing and continue to turn on when the connection is complete.
The transmitter and receiver are now connected.
Transmitter (
Bottom device in photo)
Connect to the meter and read the original situtoyo data stream every time you press the Data button.
It then formats the data using information in the data stream such as decimal places, symbols, and units.
Then it constructs an ASCII string from this data and passes through HM-
10 Bluetooth modules in the HM-transmitter
On the receiver side.
On the receiver (
Top device in photo)the HM-
10 send ASCII characters sent from send HM-
10 includes measurements of Arduino Pro Micro and then send them to PC via USB cable.
It simulates the keyboard to do this so that the data is injected into the open application, Excel in my example.
After the data is the character that causes the cursor to move to the next line.
A good thing about this is that if you need to input the data into the custom software, you can change it and do whatever you want.
Then, receive direction HM-send request
10 flashing the blue side of the LED on the transmitter, indicating to the operator that the data was received successfully.
The receiver module also removes characters from incoming data streams associated with HM-\'s remote control
There are 10 on the receiver
The charging transmitter is done by plugging in the Micro USB charging or cable of the transmitter USB socket, the LED on the receiver is red when charging, and it is turned off when the charging is complete.
Other features are also introduced later and can be processed to make sure all values are represented in metric or standard units or if you accidentally run /-
Buttons that make all measurements negative.
You can even check the transmitter battery voltage.
In addition to the materials mentioned in this manual, there are a number of other items that can be configured and programmed HM-
10 Bluetooth modules and micro-controllers.
You will need a USB to TTL asynchronous serial adapter to configure the Bluetooth module, Arduino as a programmer for the ATTiny85 micro controller (
Or similar programmer who can work with Arduino IDE)
Of course, jumpers are also needed for configuration and programming.
The ATTiny85 in this manual is programmed using Arduino Nano-clones and 10 uf electrolytic capacitors connected between the RST and GND pins.
It will work if you have other hardware, but you may have to look into the required program changes in this regard.
This Instructable assumes that you are familiar with the Arduino IDE and are a little comfortable using it, otherwise Google and some patience will be required.
Before configuring the Bluetooth module, it is a good idea to read this article Martyn Currey\'s BLE tutorial, which contains information on how to tell the real module from fakes, set the pairing, role, mode, and firmware update information for HM-
10 modules used in this manual.
Take care of the fake HM-
There are 10 in the market.
The link in the BOM provided in this description table is true (
Or at least have real firmware when I bought it last fall).
Getting fake is not a deal breaker, but if you end up getting fake stuff, it takes more steps to get them configured correctly as needed by Instructure.
If you do receive fake firmware, you can flash the real firmware to it using the tutorial below. There are other things about how to flash HM-
Install 10 firmware on the qq41 module (fakes).
The photo in this structure shows the fake module that I have to use HM-flash
10 firmware when building this interface (
This is the 3rd I built).
The real one is about $6 per pair, the fake one is $3 per pair, and it\'s worth buying the real $3.
I highly recommend you buy the real HM-10 modules!
The Sparkfun Arduino Pro Micro and ATTiny85 Micro controllers used in this manual require several definitions that are not included by default in the Arduino IDE.
By adding the following link to the motherboard manager, you can add support for these sections to the Arduino IDE.
For ATTiny85: Sparkfun Arduino Pro Micro: these two entries with commas, as shown in the figure.
In addition, you need a special small size serial library for transmitter module: sendonly software: the board I designed for this Instructable can be ordered from JLCPCB or other websites such as Seedstudio ect, if you use the gerber file that comes with this Instructure.
I designed it with easyeda. com.
Below is a link to the board of easyeda.
If there is enough interest, I may make some PCBs and sell them cheaply on ebay.
This board must be cut into two separate boards (
One for transmitter, one for receiver).
The cut will follow the white profile in the center of the PCB above and a corner of the transmitter board.
These cuts will follow the red line drawn on the PCB picture above.
Be careful when cutting the board, especially at the gap at the corner of the transmitter board.
These cuts are very close to the marks on the plate.
There is a good set of files here.
Most components can be ordered from Digi-
Key or trade of Digi-
The key part number is included in the BOM of the item they have.
Some items I bought on eBay, Amazon or AliExpress.
I have included links to items on these sites as needed in the BOM. The BOM.
PDF files are the easiest to read, and the URL is a clickable link.
It\'s a good idea to get HM.
10 modules, make sure you configure them correctly and work as a pair, as there are a lot of fake modules on the market, a couple of extra steps are required to install the firmware on the real module fake
Only the real HM
10 firmware allows the receiver to remotely flash the LED on the transmitter while pressing the \"data\" button.
Do not upgrade firmware other than v6. 05.
The tutorial by Martyn Currey is very convenient.
You won\'t have any problems if you follow it.
Also, be sure to get the naked honeycomb module like the one on the right side of this step picture.
Weld them to the PCB if needed to help connect temporary wires for configuration.
Do not weld any other components on any PCB before you have a pair of working BLE modules.
Only pin 1, 2, 12-15,21-
25 welding is required.
On the Tx PCB, HM-
10 the following configuration will be required: Pairing: pairing with other HM-10 (
Use the serial monitor to test the data flow between modules when connecting)
Role: external mode: 2 HM-on Rx PCB-
10 the following configuration will be required: Pairing: must be paired with peripheral HM-
Central mode :(
No, only the peripheral has Mode)
Program the Arduino pro micro with a sketch called situtoyo_keyboard. . . above.
Make sure you choose 3.
When uploading to the motherboard, there is a 3 v 8 mhz version of Arduino Pro micro in the motherboard manager of the Arduino IDE.
Also make sure that all referenced libraries are installed.
I used the Sparkfun version of pro micro (red)
But there are also clone products on ebay, just make sure you get 3.
3 v 8 mhz board with Atmel 32U4 micro controller instead of ATMega328P.
There is also a blue one that looks like a red spark in this manual, not black, the black one is too wide to fit the hole pattern on the PCB).
For Tx PCB, Weld other components onto the PCB.
Before other components in this area, it is a good idea to weld the USB connector on the BLE Tx board first.
Finally, it might be a good idea to weld the ICSP head to the BLE Tx Board.
Pay attention to leads on bi
The color LED was \"folded\" and the original idea was to have it go through the side of the shell, but I later decided to use a translucent shell so that the LED doesn\'t have to twist through a hole when assembling.
When the blue part of the LED flashes after the measurement is transmitted, it also adds a good effect. For the bi-
The shortest lead of the color LED is blue, and the middle is co-anode.
At this time, measure the position of the switch, USB connector, and drill holes for these items in the shell.
I found that feeding the data cable from the left side is the best (as pictured)of the box (0.
25 \"holes centered on shell width and height).
Carefully test the mounting PCB and adjust according to the size of the hole until the switch moves freely and the USB connector is plugged into the opening.
Install 2 screws to fix the PCB in place (
However, if the fit is tight, the PCB will be fixed anyway and no screws are actually needed).
On the Rx PCB, weld the Arduino pro micro to the PCB using two 7 pin heads.
Adjust the opening on the USB connector side of the Rx PCB housing so that the PCB is firmly positioned against the inside of the housing.
Please note in the picture of this component that the LED sticks out from the board.
This is to position the PCB firmly inside the box and actually works well with the smaller grommet.
Carefully adjust the lead length of the LED to get close fit after assembly.
The PCB is marked red and blue, the shorter lead on the LED is the blue lead and the center is the common anode.
Break the lid on the Rx housing and finish.
It\'s time to program attiny85.
I used the Arduino Nano clone running the Arduino ISP sample sketch.
The Nano needs to install a 10 uf electrolytic capacitor between GND and RST (-lead to GND)
For programming.
Pin connection details are included in the Arduino ISP sketch.
In this project, the pin name is printed on the ICSP header on the PCB, so the connection should be direct.
Make sure that when uploading to ATTiny85, the ATTiny85, 8kB flash and internal 8 mhz clock options are selected in the motherboard manager, as shown in the figure.
After you have finished, install the large grommet.
8 \"cut off the data cable-
10 \"remove the outer sheath from the end of the instrument revealing the wires in a few inches.
As shown in the figure, leave a shield line of about 1/2 \"from the stripe cover.
I weld the shield of the data line to the switch to enhance its pull-out power in use, although there is also a big hole in the PCB, if you want to go the route.
As shown in the figure, weld a single wire to the PCB, the color of the data line is silk-
Shield at the appropriate holes on the PCB.
Connect the battery as shown in the figure, please be careful with the polarity, because the anti-transfer burns the LiPo charger/manager chip on the PCB in a short time (
Don\'t ask me how I know. . . )
Install the lid now. You\'re done!
All 4 units I have built so far have velcro to connect the transmitter to the instrument and the receiver to the top of the laptop lid.
This is very effective in practice.
Install the Velcro blur (loop)
The side of the top of the laptop cover, rough (hook)
Side of the receiver housing.
Installation blur (loop)
The side of the transmitter and rough housing (hook)
The side on the back of the caliper or indicator.
Doing so allows you to store the transmitter and receiver together when not in use, and there is also a soft and fuzzy side on the laptop cover.
Test the battery charge by connecting the micro USB cable to the USB connector on the Tx module, and if the battery is not fully charged, the LED should light up in red.
Sometimes LiPo is very close to fully charged and the charger IC won\'t charge it, so don\'t worry if the LED doesn\'t light up initially.
Now you can connect the data cable to the calipers or indicators (
Anything that needs the type of cable you use).
Connect the Rx end to the micro USB data cable (
Must be a data line, not just a charging cable)
, And plug in the USB port on the PC.
It may have to install a driver that allows it to act as a keyboard, but it should be automatic.
Turn on the Tx module using the switch.
The LED on the Rx module should flash for a few seconds and then remain on when the connection is established.
Test by pressing the Data button on the cable connecting the clamp to the transmitter module.
You should see the measurement results on the PC screen.
Arduino Pro Micro works as a HID keyboard, it inserts the incoming measurements directly wherever the cursor is on the PC.
Programming in the transmitter module allows options.
You can access this menu by measuring 0 five times in a row.
In menu mode, to select a menu option, measure a negative value starting with the option number in the menu, for example, automatically convert all measurements to a degree value, measure negative values with 1 as the first non-valuezero digit. (-1. xx mm or -0.
1 inch for example).
To return to normal mode, measure 0 five times and then measure a negative value beginning with 3 as the first non-zero digit).
It is programmed this way to avoid accidentally configuring options.
If 0 or any positive values are measured again in menu mode, the menu mode is automatically canceled and normal mode is returned.
The menu options are: when entering the menu mode, any valid options are printed at the top as a reminder of the valid options.
All options are stored in the EEPROM and retained after turning off the device or running out of battery.
The battery life of the equipment I built is about 45 hours of continuous use and it takes about 3 hours to charge from full exhaustion. A non-
The function of recording is to enter menu mode (0 five times)
Then measure the negative value from 6 as the first non
Zero bit, which causes it to measure and print out the current battery voltage as shown in the attached video.
My experience with the 3 units I have built is that in an open store environment, this range is up to about 50 feet.
While at this point you will have a fully available interface that can be used with millions of devices in the world, there is nothing to do in a sense.
Take this approach instead of buying one of the benefits of Sanfeng U.
Wave is, now you have a device that can be customized in many ways.
If your device uses a different cable, you can connect to the transmitter using the other Sanfeng cable, not the one I use for this instruction manual.
The color of the internal wires and signals on all Sanfeng cables should be the same.
Keep in mind that the cable needs a Data button to trigger the measurement, or some other method has been designed to trigger the measurement.
By briefly connecting a green/white wire pair to the ground, a measurement request can be sent to the meter (
Blue wire in meter cable).
This can be done by installing a switch or a 1/8 audio jack in the transmitter box connected to these wires and by connecting it to an external switch.
If you have an indicator installed in the fixture or you do not need to touch the meter, the audio jack method will be ideal.
If you only need serial data (
(Such as TTL, SPI, I2C, etc)
This can be done through code changes on the receiver and directly connect to the pins on the Pro Micro you choose to use to output the data.
Remote control: Another interesting possibility is to connect the transistor between the green/white pair and the blue field from the meter, and the gate is connected to the HM-10 pin 26.
Then on the receiver side, connect the IR remote detector with an output pin of 38 kHz to the receiver Arduino Pro Micro pin 7.
Then modify the code on this micro controller and look for specific commands from any infrared remote control, then a remote call via AT PI031/AT PI030 triggers the transistor installed in the transmitter now the blue LED on the transmitter.
This will enable the ability to trigger a reading from a remote location, which can be very convenient in some cases.
I can design another PCB with built-in features.
I am sure there are many other features that are possible, please comment with suggestions, ideas and ideas.
Now, muittoyo offers a commercial wireless data communication device, but the price is about $800 when I check the price of the system.
The total cost of making this device is about $100 and can be lower, especially if you are using Arduino Pro Micro or have a manutoyo data cable that can be used to connect to the meter, because these are the two most dynamic items in BOM.
I really doubt Sanfeng U-
Wave can add features like this.
I hope you like this structure, this is my first one!
Please leave comments, questions, feedback, ideas and suggestions!
If you like, please vote for it in the PCB contest! Thanks! ! ! !
Custom message
Chat Online 编辑模式下无法使用
Chat Online inputting...