IrmaKrantz
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # IoT Scale **Irma Krantz Golinski, ik222qv** How to build a scale is the goal of this Internet of Things project. The scale can measure up to 1kg and the hardwear that we are using are Raspberry Pi 3+, weight sensor HX711 and a load cell. Time esimation is depending on previous experience with IoT, programming and the hardwear but i would say but around 5-10 hours with everything. ### Objective The project was choosen because I did not have any previous experience of working with Rasperberry Pie and sensors. I choose something I thought would be on a good level for myself. A friend of mine had some of the equipment I needed fot the project so that was also a reson why I chosse this project. Scale is something we use in all kinds of areas and I thought it be interesting to know how it works, understand one of the most useful tools we have. It will give me insights how a scale works, how to us a Raspberry Pi and how to work with sensors. ### Material | Image | Item | From | Price | Description | | -------- | -------- | -------- | -------- | -------- | | ![](https://i.imgur.com/VfEQCa9.png "title" =100x60)[]()| Raspberry Pi B 3+ | Borrowed| - | Credit-card sized computer that plugs into a computer monitor and uses a standard keyboard and mouse.| | ![](https://i.imgur.com/8V5LKiC.png "title" =100x60)[]() | HX711 | m.nu | 69 kr | Is used to read load cells used in electronic scales connected through a wheatstone bridge. | | ![](https://i.imgur.com/8TOfhg1.png "title" =100x60)[]() | Load Cell | Borrowed | - | The load cell is built up as a wheatstone bridge and can measure the applied pressure. | | ![](https://i.imgur.com/oHQ7BlY.png "title" =100x60)[]() | Female/Female Jumper Wires | m.nu | 59 kr | Connect the sensor to the Load cell and Raspberry Pi| ### Computer setup The Raspberry Pi was borrowed from a friend who had installed the editor Thonny. Since it works perfect with Python I choose to work with Thonny. I installed the IoT platform Blynk so I could display the data. No computer was needed for this project so I didn't have to install anything there nor upload any code since I wrote the program on the Raspberry Pi. ### Putting everything together ![](https://i.imgur.com/JlHTmOB.png) The Raspberry Pi, weight sensor (HX711) and load cell are connected with jumper wires (female-female). Pin 2 (5V) on the Raspberry Pi is connected to VCC on the weight sensor, pin 6 (GND) is connected to GND, pin 29 (GPIO 5) is connected to DT and pin 31 (GPIO 6) is connected to SCK. The four wires on the load cell are connected to the weight sensor. The red wire is connected to E+, black to E-, green to A- and white to A+. Finally the Raspberry Pi is connected to a screen, mouse, a keyboard and a micro-usb that ends with a power socket. ### Platform The platform I choose to use is Blynk since it work very well with the Raspberry Pi and a good application for the phone. Blynk is easy to connect through WiFi, it works with any hardware, it has drag-n-drop editors for both webb and mobile apps. I didn´t try different platforms so unfoutrunately I don´t have anything to compare with but I´m satisfied with the Watson platform. The platform is cloudbased and I got to try out a free trial for this project. ### The code The main file can be seen below were some packages are imported to be able to controll the GIPO on the Raspberry Pi. The weight sensor HX711 is set up and the scale is calibrated. I used a known weight to calibrate and the vaule I first got was 28 250 and the obejct on the scale was 250 g. So I calculated 28 250/250 and got the parameter 113. ``` import time import sys import RPi.GPIO as GPIO from hx711 import HX711 hx = HX711(5, 6) hx.set_reading_format("MSB", "MSB") hx.set_reference_unit(113) hx.reset() hx.tare() print("Tare done") val = hx.get_weight(5) print(val) hx.power_down() hx.power_up() ``` Get the weight from the scale is done from the code below where get_value_A(times) returns the median value of the read values. ``` def get_weight(self, times=3): return self.get_weight_A(times) def get_weight_A(self, times=3): value = self.get_value_A(times) value = value / self.REFERENCE_UNIT return value ``` ### Transmitting the data / connectivity Everytime there is an impact on the scale, data is sent over WiFi to Blynk but somehow the WiFi has been struggeling a bit since I ve been trying to share it from my phone. When I´ve used WiFi from a router there hasn´t been any problems. Blynk uses a transport layer security protocol, TSL, that relies on industy standards. ### Presenting the data Blynk IoT Platform was used to present the data from the scale. Blynk presents the most recent data on the screen and updates everytime there is an impact on the scale. ![](https://i.imgur.com/ZhKB4jc.png) ### Finalizing the design I think the project went very well since I didn't have any experience of this before I started the course. I feel like I've learned alot but I of course see that there is much to learn and experience. I'm satisfied with the result and look forward to learn more within this area. ![](https://i.imgur.com/FURi0nk.jpg)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully