Skip to content

ReDetection/btle-bathroom-scale

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Bathroom scale with Bluetooth Low Energy

Because everything comes better with Bluetooth! 😀

Features

  • Can measure up to 120kg of load
  • LED indicators make it easy to use in the dark
  • Broadcast weight over BTLE (iOS and Android apps available)
  • Automatically turns off after 15 seconds
  • Can live for years on a single coin battery
  • Built on cheap components
  • Geek-porn enabled in my case (easy opt out with any tape or plastic thing)

Result

Schematics

Requirements

Okay, there are some things you have to do to get it working:

  • you definitely need HX711 chip or module to amplify signal from load cells. I used this one but there is variety of other from many stores including sparkfun. Also you need a HX711 library for arduino (I used master branch with fb31428 latest commit)
  • you can optionally supply your scale with seven-segment led indicator, then you need also SevSeg library (I used version 3.1)
  • if you want to send over bluetooth, you need nRF24l01+ module and two libraries: RF24 and BTLE. The former needed to control the chip, the latter mimics BTLE beacon packet format.
  • now you have to decide: either you calibrate you scale right now, or you need two more pins for Serial communication in the future. If you want all above and want to keep Serial port available (like I do), then you out of pins already, so you need to use PB6 & PB7 as additional pins. Check the paragraph below.

Additional pins on PB6 & PB7

Please be aware that this makes impossible to use this sketch with regular Arduino boards because there is an Quarts oscillator connected to these pins. But on the breadbord it's fine to use internal oscillator and free PB6 and PB7 pins.

To do that you have to create a separate pins variant for a standard arduino core: copypaste standard folder inside hardware/arduino/avr/variants/ of your arduino installation directory, I named it standardpb67. Inside of pins_arduino.h file find the digital_pin_to_port_PGM and digital_pin_to_bit_mask_PGM definition and replace them to match this gist.

Also, because I was using atmega8A on a breadboard with this hardware definitions, I needed to modify them as well: edit boards.txt, add following:

# Additional pins 20-21
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

menu.pb67       = Additional pins 20-21
atmega8_diy.menu.pb67.pb67on = PB6 & PB7
atmega8_diy.menu.pb67.pb67on.build.variant=arduino:standardpb67

atmega8_diy.menu.pb67.pb67off = No
atmega8_diy.menu.pb67.pb67off.build.variant=arduino:standard

Remember to choose this checkmark in menu before upload!

Releases

No releases published

Packages

No packages published

Languages

  • Other 100.0%