What if your scale ruler converted into a protractor?
This project is all about turning an ordinary ruler in to smart ruler with an extra feature for measuring angles.
Now, make a list of which electronic components or other helpful tools are required:
- Arduino Pro Mini -- $2.62
- OLED display (0.96 inch, 128 * 64) -- $2.77
- MPU-6050 (Gyroscope - GY521) -- $0.89
- TP4056 (Standalone Battery Charger) -- $0.31
- Lippo 3.7v battery -- $1.79
- 3 * Pushbutton -- $2.87
- 1* 3 Pin Toggle Swich -- $0.68
- Arduino Uno (use as a Programmer for PROMINI)
Approximate cost : $13
Laptop with Arudino IDE, install other important tools:
- Ruler scale (On which whole Circitry is Fixed)
- Plastic box (In Which whole Circuitry is Fixed)
- Hookup wire
- Soldering iron
- Soldering wire
- Male to female wire
- Doublesided tap
- Glue gun
- Wire cutter
- Wire stripper
That's all for components. Now, we are ready to build the digital protector.
- Heart of this module here is an Arduino Pro Mini, which handles all external peripherals like button panel, OLED display and gyroscope (MPU-6050).
- To power up this module, here we use 3.7v LiPo Battery which is capable of delivering up to 180mAH. To charge battery, a TP4056 module is used via 3pin toggle switch.
- Here gyroscope sends raw data to the Pro Mini. By mathematical calculation, the Arduino Pro Mini finds yaw angle from it based on movement of scale (ruler) on which this module is stuck.
- OLED display here used to display current angle with respected to taken refrence using button_2.
- OLED and gyrscope (MPU-6050) use I2C Protocol to interface with Arduino Pro Mini.
Let's understand button function:
Button_1 : Press to enter into angle mode to measure angle.
Button_2 : for taking reference form which you have to measure angle.
Button_3: for calibration of module (in case of temperature and humidty variation).
For better understanding, see video of Working of Digital_Protector.
Toggle switch has two mode ON and OFF mode.
ON mode: To turn on module and measure angle.
OFF mode : 1) To turn off module.
2) To charge module.
[NOTE: Don't use ON mode for charging - it may damage your hardware.]
- All circuit diagram is attached with EAGLE PCB deisgn files.
- I got one amazing site called jlcpcb for ordering our PCBs online. You can design the PCB online too at easyeda.com and then just download the gerber file format of the PCB from there.
- After that, upload that Gerber file on jlcpcb and you can get the PCBs right at your door steps.
- The price is reasonable. 10 PCBs for $2.
- One more thing, your first order will be delivered for free. So give it a try once.
Uploading code requires:
1) Host computer with ArduinoIDE installed.
2) Arduino Uno as a programmer.
3) u8lib library for OLED display handling.
(After downloding u8lib library, unzip it and put it into your arduino library folder.)
4) Hardware module of digital protector on which code will be uploded.
Now we are ready to upload our firmware to Arduino Pro Mini.
Code Uploading Step:
> Take Arduino UNO and remove its controller from the board.
> Make a connection between UNO and Pro Mini as described in photo.
> Connect Arduino UNO to host computer.
> Open Sketchbook of firmware in Arduino IDE.
> Select COM port.
> Upload code and play with digital protector.
[Note: Keep all files in one folder as a sketchbook in order to sucessfully code uploading.]
- Limitation: First and main limitation is it can measure angle in two dimensions only. Second limitation is surface, Surface on which you will draw an angle is must be an static until whole drawing is not completed.T hird limitation is environmental condition, due to change in environmental condition it may affect reading. Fourth is body. For body, we used an ordinary plastic box which can be cracked so it can be handle very carefully.
- Future plan: Future plan is to make a 3Design d of this module so it can resists environmental change and cracking of body and also it can measure angle in 3D.
Thanks @Ravi Butani for guide this awesome project and to help make it sucessful!
Thank for reading my first tutorial. Hope you enjoyed it!
Nirav & Krushal