Arduino Simple Phone for Education
by dauthanhtrung in Circuits > Arduino
9006 Views, 122 Favorites, 0 Comments
Arduino Simple Phone for Education
Today we will make a programmable mobile phone for beginners to learn about microcontrollers.
A simple way to get started with Arduino.
Objectives:
- Programing basic features
- Communicate and display LCD screen with Arduino
- Communicate and get data from SIM module to make calls and send messages
- Use matrix keys
- Schematic circuit power and charging for battery
- Learn how to design PCB circuit
Supplies
Supplies:
- Arduino Pro Mini 3V3: Here
- SIM800C or A7680C module: Here
- Nokia 5110 LCD display: Here
- 4x4 matrix keypad: Here
- TP4056 charging circuit: Here
- MT3608 3V3 voltage regulator circuit: Here
- CH340 code loading circuit: Here
- Need some resistors, wires and test board,..
In my country everything is really much cheaper (I am from Vietnam). The prices from Amazon above is for reference only. It only cost me more than 10$ to buy all of them.
Overview:
Power block: use a thin 3.7V power battery for mobile applications. We need a common charging module like TP4056 to charge and manage the battery voltage. And we need a 3V3 power supply for the entire circuit to operate. We use the MT3608 ic - a type of boost converter ic to convert the voltage from the battery to 3V3. Note that the battery voltage will change from 3.2V when the battery is low and 4.2V when fully charged.
MicroController block: Use the ATMEGA328P 3V3 ic from Arduino Pro Mini or Arduino Nano, very simple for beginners to start programming.
SIM block: use the SIM800C module to connect to the GSM system to make calls and send messages. I chose this type of sim module simply because it is extremely cheap and easy to solder by hand. However, in many countries, 2G waves have been disconnected, but there is a solution without changing the hardware, which is to use SIMCOM's 4G module, the A7680C module, whose pinout is completely compatible to replace it.
Display block: use Nokia 5110 LCD display, which makes this phone look like Nokia phones in the 2000s :v. But that's not important! The important thing is that it is available, very cheap and easy to program. Can use Oled screen for better display.
IO block: use 4x4 matrix keys to enter data and control the device.
Buzzer and LED light can be controlled as a flashlight and notify when there is an incoming call.
I have an idea that we can replace the LED light with an infrared light, enter the IR command learned from the television remote control or air conditioner. This makes our phone usable as a remote. There are so many ideas you can come up with with it.
Don't attempt to connect everything at once, it can get confusing. However, it's not too difficult. Simply read the datasheet and library, and follow the instructions step by step!
Programming the First Program
Like all developers in the world, the first thing they do to program is “Hello World”. We will also have the first thing for every microcontroller is “Blink Led”.
Use the code uploader and open the Arduino IDE to create the first project for Arduino Pro Mini.
Link instructions and example code here:
- How to program Arduino Pro Mini using CH340 Module: Link
Testing With Module Sim
Programming the SIM module requires proficiency in handling strings, as communication with the module is conducted through AT commands, and the SIM responds with corresponding strings. Your task is to process these strings and produce the desired outcome.
The process begins with sending a text message to a phone number.
Upon receiving a message from another party, we must analyze the string to extract the sender's phone number, the date, and the main content of the message.
Additionally, we handle the aspects of making calls, receiving calls, and terminating calls.
Connect Arduino with Module SIM800: SIM_TX to pin 3, SIM_RX to pin 2:
Link instructions and example code here:
- Send Receive SMS & Call with SIM800L GSM Module & Arduino: Link
Programming With Nokia LCD5110 Display
Utilize libraries and tools to showcase whatever you display on this screen, such as logos, images, and news updates, to customize your phone to your liking.
This part of the project is the most time-consuming. It's crucial to have a thorough understanding of the LCD display to program it according to your preferences.
Connect Arduino with Module LCD5110:
Link instructions and example code here:
Testing With Matrix Keypad 4x4
Use a 4X4 keypad with 16 buttons and 8 pins on the microcontroller. Programing to receive buttons to perform functions or receive data such as numbers to call, text messages.
Connect 4X4 Keypad to Arduino: C1-14 to A0-A3 and H1-H4 to Pin 9-12.
Link instructions and example code here:
- Interfacing Arduino with 4×4 Matrix: Link
Complete Version 1.0?
Add a battery and a charging module for it.
Assembling everything into a mini box, we now have a basic mobile version 1.0.
Done?
No, of course not. We need this project to be professional and easy to develop for any newbie.
Start Pcb Design
Start designing everything with professional design software such as Altium Designer, Kicad, Eagle, EasyEDA,...
Here I use Altium Designer Software: Link
Build a schematic from the components, modules used before and edit to suit the requirements. You may need to look at the datasheets from the manufacturer to know how to build a standard circuit.
Import the PCB and start the layout.
Arrange the components and place them in the appropriate positions, proceed to wire. Follow the rules for 2-layer circuits and the PCB manufacturer of your choice.
Place the PCB oder: JLCPCB - Link
The Gerber file I left below can be ready to send to the PCB manufacturer. Send them and they will make pcb for you, can choose the color you like: black, white, blue,...
Choose Base Material FR-4, 2 Layers, PCB Qty 5, PCB Thickness 1.6mm, PCB Color,...
Add items to your cart, proceed to checkout, and then wait.
Download Gerber File: Link here
Below is the schematic diagram I have created.
Downloads
Soldering Components to the PCB
First, ensure that all the components listed in the Excel BOM are prepared, along with the soldering iron, heat blower, and all required tools.
Begin by soldering and testing the circuit sample, where your determination, alongside you soldering expertise, is crucial. We're working with tiny 0603 components, so if the budget allows, you could use a stencil to apply solder paste. After then using the heat table or heat blower with temperature about 240 - 350 °C to solder components. However, I believe it's entirely possible to solder by hand using soldering Iron. It's a time-intensive process, but it's also quite interesting.
Download Bill of Material (BOM): Link
Final Check
Inspect the solder joints once more. Before plugging in the power, we need to test the power source to confirm it meets the 3V3 standard, any discrepancy could immediately damage the microcontroller.
Disconnect the 0R resistor from the 3V3 power, install the battery, and conduct a test to ensure the TP4056 battery charger operates consistently with 5V power from the MicroUSB port. Use a multimeter to check the battery voltage and other voltages. Next, examine the MT3608 block, measuring both the input and output to verify they are at the correct 3V3 level; if not, the Feedback resistor might need recalibration. Additionally, it's crucial to measure the circuit to avoid potential short circuits caused by PCB or soldering faults. After these checks, reconnect the 0R resistor, and the phone should be operational.
Implement all ideas in your code, program it, and begin uploading the software to the phone via the MicroUSB cable.
Below is my code, which may be challenging for beginners. This is provided for your reference. Should you have any questions, feel free to send me an email, I can make some time to assist you.
Download Main Code here: Link
Downloads
Final Done!
Completed! You are now ready to make your first call with the mobile phone you've assembled yourself!
Download everything from my Github: Link
https://github.com/dauthanhtrung/Arduino-Simple-Phone
The Next Project
In the next project, I will guide everyone through creating a touch phone with a Nextion screen.