Back to Browse

Build a Scale Speedometer Part 3

1.9K views
Mar 3, 2025
15:52

*Two* *Position* *Switch* *Types* You may encounter any one of four different two position switches, and they each need to be wired differently. Here they are: Single Pole Single Throw (SPST) – This is the simplest switch to wire. It has two contacts; when the switch is in one position, the contacts are connected and when the switch is in the other position, the contacts are isolated. Wire this switch by connecting one contact to the positive battery lead and connecting the other contact to the female connector which will insert on the VIN pin. Single Pole Double Throw (SPDT) – This switch has three contacts; when the switch is in one position, the center contact is connected to one end contact and when the switch is in the other position, the center contact is connected to the other end contact. Wire this switch by ignoring one of the end contacts (leave it unconnected) and wiring the other two contacts as you would an SPST switch. Double Pole Single Throw (DPST) – This switch has four contacts and it provides two independent circuits. In one position, both circuits are on, and in the other position, both circuits are off. (Think of this switch as two SPST switches mounted side by side.) I wire the positive battery lead through one side of the switch and the battery ground through the other side. Each side is wired as with the SPST switch, but the ground connected will connect to the GND pin on the Arduino. Double Pole Double Throw (DPDT) – This switch has six connections. Think of it as two SPDT switches side by side. Wire this switch by ignoring the two contacts on one end, and connecting the positive battery lead on one side and the battery ground on the other side. For more information about connecting and programming the LCD 1602 display, see this article: https://docs.arduino.cc/learn/electronics/lcd-displays/ For Version 2 of the speedometer sketch, and the Gerber production file for the custom printed circuit board, visit my GitHub page: https://github.com/RJW496/DRGW-HO The files you will need are called speedometer_ver_2.ino and LCD1602_Breakout_Board_ver_1.zip. *Ordering* *Your* *Custom* *Printed* *Circuit* *Board* I order my custom PCBs from JLCPCB.com, but there are other companies that offer the same service. Just upload the Gerber production file (LCD1602_Breakout_Board_ver_1.zip) and place your order. You’ll pay just over four dollars for five identical boards (including shipping). *LCD1602* + *I2C* A viewer kindly noted that you can purchase LCD1602 boards with a “piggyback” I2C board. (I2C is also called IIC and it stands for Inter-Integrated Circuit.) These I2C boards simplify the wiring of the LCD1602: you will not need the custom PCB and you will only need four connections to the Arduino. However, you will need to use a diferent library – either LiquidCrystal_I2C or LCD_I2C – and you will need to be sure the settings on the I2C board match the software configuration. Here is a link to a video explaining the process: https://www.youtube.com/watch?v=q9YC_GVHy5A ------------------------------------------------------------------------------------------------------------------------ Normally, I would provide specific links to the products mentioned in this video. However, this project is somewhat different, so instead I am providing a price comparison between two online vendors: Amazon and AliExpress. (Note: Although I have done business with both of these companies, I am *not* endorsing any particular provider, nor am I compensated by or connected to any of the companies mentioned.) I do NOT guarantee that these providers will give you the best available price! Nine volt battery connector: Amazon: $6 for 20 connectors AliExpress: $1 for 10 connectors SPST Toggle Switches: Amazon: $6.50 for 10 switches AliExpress: $2.20 for 5 switches LCD 1602 Display: Amazon: $10 for 2 units AliExpress: $1 each Pin headers: Amazon: $6 for 20 pieces AliExpress: $1 for 10 pieces 10k Ω Potentiometer: Amazon: $9 for 10 potentiometers AliExpress: $1.30 for 10 potentiometers 4-Pin Screw Terminals: Amazon: $9 for 20 terminals AliExpress: $2.50 for 25 terminals Prototyping Board 5 cm by 7 cm: Amazon: $10 for 15 boards AliExpress: $2 for 10 boards If you were to buy everything from Amazon, you’d spend about $45. If you were to buy everything from Ali Express, you’d spend about $10. ------------------------------------------------------------------------------------------------------------------------ This video was edited using Shotcut for Linux. Video footage and still images were recorded using a Galaxy A10e phone and a Nikon D7100 camera. 0:00 Introduction 0:57 Changes to the Original Unit 2:13 Powering the Unit 4:50 Adding the Liquid Crystal Display 8:04 Installing the Software 11:49 Creating Version 2 of the Sketch

Download

0 formats

No download links available.

Build a Scale Speedometer Part 3 | NatokHD