My Bluetooth Repeater Build (Works with Tilts)

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk:

garzlok

Supporting Member
HBT Supporter
Joined
Aug 19, 2012
Messages
465
Reaction score
372
Location
Dacula
As an owner of multiple Tilts and an individual that has implemented Fermentrack and TiltBridge, I have occasionally run into issues where TiltBridge does not pick-up the signal of my Tilt causing me to miss out on fermentation trends.

I ferment in Stainless Steel, inside a modified Beverage Cooler. Though my TiltBridge and Tilt are only 1.5 - 2 feet away at any given time, my signal strength can reside in the -85 to -95 dBm range, which is a pretty weak signal strength for Bluetooth Low Energy.

A quick search of the interwebs leads you to this:

Some further searching on the Tilt Hydrometer Web Site leads you to this:

DIY challenge excepted!

B.O.M.
MDBT42Q Breakout
5V Power Supply
Single Row Male 2.54 Breakable Pin Header PCB JST Connector Strip
Dupont Line 30CM Female to Female Jumper Wire Dupont Cable
5"x7" Aluminum Step Flashing
Trim Lok Edge Trim
Electrical Tape
Cable Tie
Grommet
Container To hold Device (I used a Tube that stored Epoxy Putty.)
Avery 8257 Address Labels

Step 1 (Prepping the MDBT42Q)

To deliver Power and gain quick access to the Tx and Rx pins, I soldered on male headers that run from D11 to GND. (this is optional and you can choose what best suits your needs to connect to the breakout board.)

IMG_1905.jpg


This is by far the most challenging step of the process and you will need specific flashing tools. If you buy the MDBT42Q that I linked, it will come preloaded with Firmware and ready to use. In fact, in a brief chat with Noah Baron, they use the 2v01 firmware due to its lower power consumption. I am using a dedicated power source, so power consumption was not a major concern for me. If you choose to flash the device to the newest Firmware (2v06) or to the 2v01, you will need to use specific tools.

First, use this Web Site as your primary source for all things Espruino MDBT42Q!
All the MDBT42Q Firmware can be found HERE.

The directions say to upload and install the new firmware, you need to use their Online Web IDE. To use their Online Web IDE you will need to use the Chrome Browser and your computer needs to be Bluetooth capable. The Online Web IDE will also be the way you flash the MDBT42Q with the JavaScript to make your device a Bluetooth Repeater.

When I tried flashing the newest firmware using the Online Web IDE...it hung-up, and I thought I bricked my device. After some searching, I learned that the Online Web IDE can be hit or miss with firmware updates. Instead, I used the nRF Connect App on my iPad, and successfully loaded the new firmware onto my MDBT42Q. This is the nRF Connect for Desktop version.

Step 2 (Installing the repeater JavaScript)

The kind folks at Baronbrew have made the repeater code Open Source and that code can be found on their GitHub Page.
Near the middle of the GitHub page is a Green Button that says 'Code'. Click the button and download the Zip file.
Once downloaded, unzip the package.
Open up your Online Web IDE, in the upper left corner is a Connect Icon. Connect your MDBT42Q to the Online IDE program.
Through the IDE, open the file of the Baronbrew JavaScript you just downloaded and extracted.
Choose the file named: espruino_repeater.js
Underneath the 'Send to Espruino" icon found in the middle of the IDE page, you'll see RAM with a down arrow. Click the down arrow and choose, Flash. Doing his will "save on send" and commit the code to the flash memory.

Step 3 (Building Enclosure to house MDBT42Q)

In all honesty, I built this with scraps laying around from other projects. The commercialized version is in a waterproof container. I did not go this route and I used a Tube that held Epoxy Putty. All that matters is that you have a container that protects and holds the MDBT42Q. Because you may want to turn off the the repeater or switch it to work with a different color tilt, you may need to gain access to the repeater. I decided to stick close to the commercial product and build a sled for easy access.

For the sled, I used some Aluminum flashing cut to size, Trim Lok to protect from sharp edges, and electrical tape to cover the flashing and attach the "MDBT42Q Seat" to the "Sled".

First I cut some aluminum to build a seat that will firmly hold the MDBT42Q. Dimensions were roughly 18mm x 48mm. On the ends, I placed some Trim Lok and bent the ends of the flashing to a 90deg angle. I then wrapped the aluminum flashing in electrical tape.
IMG_1854.jpg


IMG_1855.jpg


Next, I built a sled. For me, this piece was 18mm x 80mm, but your dimensions may be different. On the back end of the sled, I placed a piece of Trim Lok and bent the flashing 90 degrees. On the other end of the flashing, I put on a piece of Trim Lok without bending the flashing. Wrapped the sled in electrical tape.

IMG_1857.jpg


IMG_1859.jpg


Finally, I attached the Seat to the Sled. I just did this with electrical tape. I also used a piece of electrical tape on the flat end to use as a flexible tab to help pull the sled out of the plastic tube.

IMG_1861.jpg


On the Tube Cap, I drilled a large enough hole to accept a grommet so I can pass my wires through.
I used Avery 8257 Address Labels to print out the button cycle for the repeater. (I used avery.com for printing templates)
You're welcome to use my icons if you choose:

tilt_repeater_icons.png


IMG_1862.jpg


Step 4 (putting it all together)
I choose not to use a battery operated device. Instead, I'm delivering power with a 5V 2A Wall Power Supply that will be fed into my fermentation chamber.

Attach Female DuPont wires to GND and Vin male headers on the MDBT42Q. Cut opposite end of DuPont wires to expose copper wires and use as a pig tail.
Place the MDBT42Q into the seat on the sled.
Slide the Sled into your container
Run DuPont wires through the grommet on the cap.
Use cable tie near female terminals to hold wires in place.
Close Cap
Affix label with the button cycle icons.

IMG_1853.jpg


Voila! A Bluetooth repeater that works with your Tilts and will strengthen your BT signal. REMEMBER this is NOT to be placed in liquid! This just needs to be placed outside your fermenter to help with signal strength. For me, this repeater gave me a 30 dBm increase in signal strength. For power, I cut off the micro USB end of my 5v 2A power supply, exposed the wires, and connected to my pig tails accordingly.

If you are using Tilts and TiltBridge, this is a drop-in addition. Your TiltBridge will not have any issues picking up the signals and nothing additional needs to be done.

If you are using iSpindles, I suspect you would need to develop and implement your own JavaScript code for the MDBT42Q.
 
Last edited:
OP
OP
garzlok

garzlok

Supporting Member
HBT Supporter
Joined
Aug 19, 2012
Messages
465
Reaction score
372
Location
Dacula
Love this! How did I miss it when you posted it originally? I feel like I'm being left out. :p

Thanks and Thanks! I am now a perfect 2 for 2, where the first reply on one of my build threads was, “how did I miss this?”. 😂
 

HarlemBrewDoug

Supporting Member
HBT Supporter
Joined
May 5, 2016
Messages
151
Reaction score
84
Location
Philadelphia
Gotta say, after reading through the Tilt Bridge info and then your repeater build this morning (work, what's work?), your setup would be best for "in chamber" needs. Definitely going to give it a go!
 
OP
OP
garzlok

garzlok

Supporting Member
HBT Supporter
Joined
Aug 19, 2012
Messages
465
Reaction score
372
Location
Dacula
Gotta say, after reading through the Tilt Bridge info and then your repeater build this morning (work, what's work?), your setup would be best for "in chamber" needs. Definitely going to give it a go!

I’m only about a month in with my repeaters, but I’m very happy I decided to build them. You’ll notice that I said ”them”. The downside to the repeater is it can only repeat the signal of 1 Tilt. I often times have two beers fermenting at a time, so I use 2 Tilts. Therefore I built 2 repeaters to go into a dedicated chamber/Tilt Color.

TiltBridge on the other hand is able to repeat (via WiFi) the Tilt Signal from all 8 Tilts. The Caveat, signal strength from the Tilt must be strong enough to reach the TiltBridge. The TiltBridge is also less expensive compared to the Repeater.

I will say this, the repeater is strong! I saw a 30 dBm improvement in signal strength. I can easily pick-up the signal from anywhere in my house. That developmental Fermentrack Pi that I mentioned in the other thread...well, I moved it to it’s normal location which is about 60ft and 3 rooms away, and it can pick-up the Repeater signal.

in theory, I no longer need to utilize TiltBridge. However, I prefer to look at my control panel and see where the gravity of my beers reside.
 
Joined
Jan 19, 2013
Messages
3,759
Reaction score
1,590
Location
Rural Kansas
Not the right thread, but related - I like having a Tiltbrdge even though it's strapped to my Pi so basically not needed. It's a ready display as I walk by which is nice.

The BT repeater, well, thanks for bringing that to our attention. I think I can expand upon that for other things.
 

aeviaanah

Well-Known Member
Joined
Jul 1, 2012
Messages
1,626
Reaction score
182
Thanks for sharing, what's your cost estimate for the build?
 
OP
OP
garzlok

garzlok

Supporting Member
HBT Supporter
Joined
Aug 19, 2012
Messages
465
Reaction score
372
Location
Dacula
For me, it came out to $34 USD/repeater. I had to purchase the MDBT42Q and a 5V wall wart for a power supply. Luckily I already had all the other ancillary parts.
 

aeviaanah

Well-Known Member
Joined
Jul 1, 2012
Messages
1,626
Reaction score
182
For me, it came out to $34 USD/repeater. I had to purchase the MDBT42Q and a 5V wall wart for a power supply. Luckily I already had all the other ancillary parts.
Any idea if none of the parts are on hand plus or minus a few?
 
OP
OP
garzlok

garzlok

Supporting Member
HBT Supporter
Joined
Aug 19, 2012
Messages
465
Reaction score
372
Location
Dacula
Any idea if none of the parts are on hand plus or minus a few?
In all honesty, no....again, this thing can be cobbled together....but if you absolutely have nothing...like no soldering iron...no wires, nothing....I could see you having to drop $25-30 dollars more....but then you would be able to build a fleet of the repeaters.
 

aeviaanah

Well-Known Member
Joined
Jul 1, 2012
Messages
1,626
Reaction score
182
In all honesty, no....again, this thing can be cobbled together....but if you absolutely have nothing...like no soldering iron...no wires, nothing....I could see you having to drop $25-30 dollars more....but then you would be able to build a fleet of the repeaters.
I have a soldering iron silly. I'm not asking you to calculate the power bill etc.. just the parts in the build. Looks like it's around $50 in parts. Thanks again!
 
OP
OP
garzlok

garzlok

Supporting Member
HBT Supporter
Joined
Aug 19, 2012
Messages
465
Reaction score
372
Location
Dacula
I have a soldering iron silly. I'm not asking you to calculate the power bill etc.. just the parts in the build. Looks like it's around $50 in parts. Thanks again!
:D Hey! When I started my first project, I had nothing and all those little things add up.

Aluminum Flashing = less than a $1 (this would be in the gutter/roofing section of a home improvement store)
Electrical Tape = less than $3
2K Epoxy Putty in a tube = less than $5
Package of 30cm Female DuPont Wires = $10
Roll of Trim Lok = $25
Package of grommets = $5

...all that adds up really fast, but one doesn’t need my exact BOM. You could use a small plastic container laying around the house (ie.Tupperware). Maybe you have an old charging cable laying around the house that doesn’t get used anymore. Strip that of the wires and solder the leads to the MDBT Directly...in the end, you can make this repeater pretty inexpensively with stuff laying around the house.
 

neoresin

Member
Joined
Oct 27, 2020
Messages
10
Reaction score
4
This tutorial definitely started me off on the right track. Thank you so, so much for this. So, so, so much. I had to fight my environment to get even a method of flashing new firmware to the espruino working, but now I'm on to writing the javascript to the little guy. A couple of questions:

Is there a reason why you're not using the espruino_repeater_2.03.js and instead want to use espruino_repeater.js?
Do you have to press the button every time your power goes out, say? That would wear out real fast so I'm trying to work it into the javascript to start on my Tilt's color so I don't have to press the button to select it each time.

A couple of suggestions to future readers that kept me on the right track (I'm using Arch Linux):
1. Index of /binaries - the place to download the firmware binaries - current version https://www.espruino.com/binaries/espruino_2v10_mdbt42q.zip specifically for the breakout board.
2. I was having a lot of trouble connecting the espruino through bluetooth so I used an FTDI232 I had lying around ($6 on Amazon) and wired up the espruino breakout board (after soldering on those header pins like you suggested garzlok). If readers go this route, I suggest using the web IDE directly from the desktop, using GitHub - espruino/EspruinoWebIDE: The Espruino Web IDE - A Chrome Web App for programming Espruino using npm since I couldn't see what was going on in the background, YMMV. Hook the FTDI232 using some of those female to female Dupont wires (see OP), hook up RX to TX, TX to RX, VCC and ground, switch the jumper on the FTDI232 to 3.3V, plug it into USB port on computer, and install GitHub - espruino/EspruinoTools: JavaScript library of tools for Espruino - used for the Web IDE, CLI, etc. to start the web IDE with 'sudo espruino --port /dev/ttyUSB0 --config WEB_SERIAL=true --ide' (sudo because you need permissions to /dev/ttyUSB0) once you have it all hooked up. Open up Chrome/Chromium, navigate to http://localhost:8080, hit the connect button in the top left corner, select 'local/Connected Device' when asked to 'SELECT A PORT...', and it should connect without an issue (unless your setup is different than mine). Made my life so much easier to actually see and have hands on what was going on.
3. Even having said and done all that, you can also flash firmware using the command-line tools, though I continued to use the nRF Connect app on Android after seeing (video is for the Puck.js, but it works pretty much the same) to flash firmware because it was just... easier once it was in bootloader mode (hold the button on the espruino when connecting the USB power cable to get to the bootloader, for any future readers).
4. Quick Start (Bluetooth LE) - Espruino helped too for getting situated.

Wanted to just get that out if anyone else is planning on attempting this.
 
OP
OP
garzlok

garzlok

Supporting Member
HBT Supporter
Joined
Aug 19, 2012
Messages
465
Reaction score
372
Location
Dacula
Is there a reason why you're not using the espruino_repeater_2.03.js and instead want to use espruino_repeater.js?
Do you have to press the button every time your power goes out, say?

I believe my choice was based off a brief discussion with Noah and the JS he recommended that I use.

luckily, I haven’t lost power while in the middle of fermentation, but if the power did go out, yes, I would have to cycle to my tilt color.

I’m glad you found the tutorial beneficial and we’re able to help add your experiences.
 

neoresin

Member
Joined
Oct 27, 2020
Messages
10
Reaction score
4
So I ended up modifying the espruino_repeater_2.03.js and I'm able to boot up with the orange tilt as the default tilt! The counting just picks up from there and resets at 9, so the functionality to change it is always there. Made some other modifications that felt right, so it feels like a small victory for me since I'm new to the espruino. Javascript ain't so bad! :cool:

Anyway, thanks again for your tutelage!
 
Top