I have 2 young sons (6 and 8 years old) that go to school and take the bus home everyday. One day the bus did not arrive at home on time and I was worried. They were safe, but the bus had been in a minor traffic accident and they were stuck on the bus waiting for the police to arrive.
I needed a way for them to get in contact with me but I did not want to give my oldest a cell phone because it would become a constant distraction (games, internet, etc). What I needed was a simplified cell phone built for the sole purpose of calling me in an emergency. So I set out to build one.
TLDR: If you are just looking for the code: https://github.com/contractorwolf/SIM7600Phone
Finding a Cellular BoardI had worked on previous personal projects using embedded SIM IOT devices that used cellular, but this project needed actual voice communication. I needed something that I could control via a simple Arduino-type of microcontroller using serial commands. I finally settled on the Waveshare SIM7600x 4g HAT. Specifically the SIM7600A-H because I am in the United States (the "A" stands for "Americas", buy the one for your area).
This device comes standard with a header for connecting directly on top of a Raspberry Pi (which I didnt need), but it had something that I specifically needed: the 3.5mm earphone and mic jack. It had the hardware needed for a cell phone that can call or text and I could control it using Serial commands (aka AT commands) via an Arduino.
This device was much thicker than I wanted, so I first tested that it worked by connecting to it via USB (using the USB to UART micro connection) and confirming that it responded to AT commands. Using AT commands and a terminal interface (like Putty) you can control the device, ask it information and even tell it to send SMS or make a phone call.
The full list of AT commands is available here: SIM7600_Series_AT_Command_Manual_V3.00.pdf
After confirming that the AT commands worked and testing the standard commands to 1) call a number and 2) send a text message I got to work minimizing the Waveshare SIM7600x 4g HAT to be the form factor I needed.
Modifying the Waveshare SIM7600 HATI carefully cut off all of the headers with snips and stripped off all the plastic to make the board as thin as possible. I know I was going to use a very chunky on/off switch and I wanted the switch to be the thickest part of the entire device. The Waveshare board and the battery would have to be stacked on top of each other, so all the headers had to go. The image below is the final result of what I had done slimming down the board.
I next decided to test control of the device with a microcontroller using the AT commands that previously tested with Putty over USB. I did some temporary wiring on a breadboard to confirm that it could be controlled via an Arduino by wiring it up to the Seeduino Xiao board and connecting it to the Waveshare 7600 HAT serial (TX/RX) lines. After I proved that I could use the AT commands with from the Arduino over Serial (TX/RX) I got to work making a small carrier board that would hold the Arduino (Seeeduino Xiao), the buttons and have a 4 pin connector to the Waveshare board.
JUMPER NOTE: The image above shows important yellow jumpers that I later replaced by soldering the pins on the underside of the SIM7600 board so I could trim off the jumpers and pins. You can see that the B and C pins are jumpered together in parallel which allows for serial connection on the TX/RX lines from the Arduino. The 3v and power pins are also jumpered allowing the 3v SIM7600 to operate using the incoming 5v power line. You can see the solder blobs on the closeup of the board below.
The green carrier board shown in the left of the above image is just to house the Seeduino Xiao board, to wire the serial connections, and power lines to the same position as they are on the SIM7600. It also gave me spots to wire in the 2 buttons: The yellow "Call" button and the blue "Text GPS" buttons. The wires for the buttons have pull-down resistors that I connected under the Xiao board.
Here is the initial design for the carrier board and how it is wired to the SIM7600 board:
With the carrier board you will have the Xiao (basically a tiny Arduino) wired for a Serial connection (Serial1) to the SIM7600. It is also wired for 2 buttons on D2 and D3 with pulldown resistors. I passed the 5v and ground pin to the SIM7600 as well so that the cellular board has a 5v power supply either through the Arduino USB power or a battery.
Below is another image of the carrier board I made. There were several iterations of rework on the left side as I changed the charging control and moved the switch from the carrier board to the charging circuit. The right side of the board never changed. Check the diagram above for the best understanding of what you need. The only difference from the diagram above is that the 5v and Ground pins have a JST connector to the charging circuit.
You can also see how the buttons and original charging/battery circuit were originally setup in this photo below.
I later reworked the charging circuit and replaced it with one that I could mount the large switch directly to which allowed me to charge it while it was off and just plug the power into the carrier board.The new charging circuit looks like this and has the switch connected to the charging circuit board. I switched to the Sparkfun Lipo charger/booster because the switch on the board meant that I could easily charge while the unit was off.
I ended up using Ting as my cellular carrier for this project. The service costs me only $10 a month with unlimited talk and text. If you want to use my referral code and get a free $25 worth of Ting service here is my referral link: https://zq6htr31jna.ting.com/
Look for the shopping section when you click the link above to buy the SIM cards (just $1) and then sign up for the Flex service for the $10 a month pay-as-you-go plan.
OperationThe device is made to be simple for a child to use. It has a large on/off switch that has a satisfying "click". When the switch is turned on all 3 internal boards have LED status lights so you can tell what they are doing. The first thing that happens is that the Waveshare SIM7600 attempts to connect. When the SIM7600 has connected the status LED will flash about once per second.
The Arduino is set (as default) to poll the SIM7600 board every 30 seconds for a GPS position. Once it has obtained a GPS position it will immediately text that GPS position (as a formatted Google Map link) to the default number hardcoded in the code. After that, the device just waits on the buttons being pressed.
The yellow button will call the default number (set in code) and the blue button will send additional Google Map positions if needed. To keep the device simple it uses a 3.5mm headphone jack for calls. My son has a nice headphone set with a mic that he used for remote school and gaming and the headphones go into school with him every day.
The GPS needs a separate antenna and that is what you see as the TAOGLAS sticker in some of the final shots. It takes about 5 minutes after startup before the GPS signal is been established. Because of that, I have the button setting a flag that waits until the GPS is solid before sending the GPS Map text link.
The main point of having such a simple device is that it is super-utilitarian. It works when it is needed, stays off most the time and won't be a distraction at school. So far we have tested it several times on the bus coming home and it worked great. The battery is 820mah which is about half of what a normal cell phone is, so it should last ~6 hours in the on position, and it doesn't use any power when it is off. I usually charge it every few days to be sure it is ready, if needed.
The 3d Printed CaseI custom designed and printed a 3d case for the phone. The case has holes for 3 M2.5 x 25 button head socket cap screws that hold it together. There are open spots for the 2 buttons, the switch, a slot for the headphone jack, the Xiao USB C, the USB Micro (for the charging circuit) and even an additional USB Micro for direct USB Serial communication with the SIM7600. You can also see several holes have been left open for the LED's that are on the Xiao (arduino), the SIM7600 and the charging circuit so that you can tell the status from all of the boards.
I have provided the STL file for 3D printing the case and the top.
I was trying to make it as small and tight as I could. Plus it had to be structurally strong to stand up to the wear and tear that a 7 year old may subject it to.
The CodeI have stood on the shoulders of giants all my life working with Arduinos and Raspberry Pi's. There were always examples and other peoples projects online that I have benefitted from. I believe that sharing what you have been able to figure out will benefit others down the line, if you can clearly document what you did.
In that thought I have shared the code I wrote for this project in the hopes that someone in the future could use it to build one of these devices for themselves. Maybe even build something better!
Anyways, here is the basic Github repo that I commented as much as I could in the hopes that it will help you get it up and running: https://github.com/contractorwolf/SIM7600Phone
The most important part of the code for you to change is the outgoing number that should be called when the button is pressed here:
There are several other spots that are commented as not required and lots of Serial.print() debugging statements that could be removed. NOTE: Just dont delete the Serial1.print() statements that go from the Arduino to the SIM7600. Those are required communications and NOT debugging, FYI.
Thanks for reading my post. Feel free to ask any questions in the comments and I will try and help out any way I can.
Comments