Digital Scale Using Ultrasonic Sensor ( in Freeform )

by MissionCritical in Circuits > Arduino

12504 Views, 96 Favorites, 0 Comments

Digital Scale Using Ultrasonic Sensor ( in Freeform )

instruc_Thumbnail.jpg

Today we are going to make a simple portable Ultrasonic based Digital Scale, but there is a small twist in it, we are going to make this project in Free-Form, without using jumpers or pcb, instead we will use thick copper rods, so let’s get started!

Supplies

Watch the Video!

How It Works??

vlcsnap-00001.jpg
vlcsnap-00002.jpg
vlcsnap-00003.jpg
vlcsnap-00004.jpg

Let’s understand how this project works, first of all we will measure the distance using Ultrasonic sensor, which acts as an input, next Arduino will do the computation and display the results on an I2C OLED display.

also, for Ultrasonic Tutorial, refer this post which explains all the basics of Ultrasonic, like "how to set up", "how to calculate distance", etc

similarly, we have a tutorial on OLED display, which would be very helpful for begineers, so click here !

Let's Connect It!

1.jpg
2.jpg
3.jpg
Untitled Sketch 2_bb-1.png

Since this project and entire process of free-form electronics is complicated, let’s write the code and test everything on jumper wires before we start soldering. for which, we will follow these connections:

UltraSonic:

GND - D2

ECHO - D3

TRIG - D4

VCC - D5

I2C OLED:

Vcc - 5v

Gnd - Gnd

SDA - A4

SCL - A5

you can refer to the circuit diagram and Fritizing file attached in this step for better understanding.

Press the Upload Button.

4.jpg
vlcsnap-00010.jpg
vlcsnap-00011.jpg

First we include the libraries of SPI, Adafruit GFX,Adafruit ssd1306,Then, initialize the OLED, define the Trigger and Echo pins, define variables,Then in pin mode, necessary definitions were added, along with a sweet start-up animation message saying “Electronic scale by Mission Critical” Next in loop section, we did the calculations of Distance in centimeter, which we discussed in Ultrasonic sensor tutorial ( link attached in previous step), next we saved the distance data in “distance” variable and extended it to appropriate cursor locations, and then we are done! Simply upload this code to Arduino nano.

( if you don't understand code, its alright, simply download the code attached here and upload it on your board, and wire everything as shown in previous diagram and we should be good to go! )

Prepare the Plans of Design

5.jpg
6.jpg
7.jpg

honestly, this is my first free-form electronics project, so i tried to make a rough sketch of the design idea on a notebook ( my notebook has grid lines thanks to instructables :P), later i used ruler scale to measure the dimensions of the modules and later i used Fusion 360 from autodesk to make a CAD diagram and rendered out how my project should look!

Straighten the Wire

8.jpg
9.jpg
10.jpg

since the wires come in a roll or you might tangle it while handling, it won't look good for free-form, neither it looks professional, so we nee to straighten up these wire before proceeding further, so follow the steps below:

  1. cut the wire to approx 10 cm length ( to avoid slipping of wire from chuck use longer lengths ).
  2. open the drill chuck.
  3. make a small bend at the first end of wire ( which goes to drill chuck).
  4. tighten the drill chuck.
  5. hold the opposite end with pliers at slightly angled manner ( create tension).
  6. trigger the drill at slow rpm.

PLEASE BE CAREFUL WHILE DRILLING ( if you are not comfortable handling drill don't hesitate to ask for parents help)

Solder the Base

11.jpg
12.jpg

first we decided the footprint of our project by measuring components and referring to CAD diagram, to start we need a solid base, we will use 18 gauge wire to do this structural step.

our Base is a Rectangle of 52mm X 34mm, so we will cut 2 pieces of each 52mm and 34mm of straight copper wire using Pliers ( BE CAREFUL WHILE CUTTING ). once done, we will use Solder iron to solder these joints with visually perpendicular (90°).

Solder the Ultrasonic Sensor

13.jpg
14.jpg

once the base was ready, we will next solder the Ultrasonic Sensor to Arduino since that will determine our vertical height of, so we will simply push the Ultrasonic into Arduino Board, such that " GND - D2 : ECHO - D3 : TRIG - D4 : VCC - D5 " these connections are made and simply solder it with arduino ( make sure it too make a 90° angle).

Prison the Arduino Nano

15.jpg
16.jpg
17.jpg

once the ultrasonic sensor is packed, we get our height room, which comes to around 24mm. so let's cut 4 pieces of 24mm for height, and solder it at 90° angle from the base. next, we will use arduino nano's onboard Holes to prison it around the base structure. use 28mm wire and bend it at 24mm to prison it around the walls and finally solder the structure.

Add the Screen

18.jpg
19.jpg
20.jpg

finally, its turn to add a Screen, for which we will need 4 wires of approximately 36mm length, which will be folded in parts according to Connecting Pads on Arduino, if you remember from Connections step, we have to Connect " Vcc to 5v : Gnd to Gnd : SDA to A4 : SCL to A5 " so simply bend your wire according to connection pad location.

( take your time don't rush here OLED is very delicate, i already broke one when it dropped during this project :P but don't worry just make sure you don't drop it )

once the pads are connected, solder the connector pins and it should easily hold up as shown in pictures attached to this step!

Add "personal Touch"

21.jpg

since free-form electronics is not only about circuit, but its an ART in itself, just feel free to add your own touch to it, like i added Arms to make it look like a Robot, you can try crazy fits to make it like you like ( just don't ADD a tail to it, because if your pets wont like it, this might end up in their stomach XD ).

Prevention Is Better Than Cure

22.jpg
23.jpg
24.jpg

we used copper wire for this build, which can be replaced with brass rods ( which isn't easily available in every country ) to make it weather resistant. but since we made it vulnerable to corrosion, let's add a Coat of "clear nail polish " to this entire structure, which will prevent the contact of copper to air and adds a little shine to our project.

Support Our Work :)

25.jpg

if you followed up this post, and liked it, make sure to check out our other work on youtube, you can also support us for following Mission Critical on social media or becoming our patreon.

Patreon - https://www.patreon.com/missioncritical

Twitter @ akshaymomaya1

Instagram @officialmissioncritical

Facebook https://www.facebook.com/officialmissioncritical/