This credit card sized PCB can SAVE YOUR LIFE! (Shrinkify your projects with a 4 Layer PCB)

The Life-Saving Box: A Guide to Creating a Miniature GPS and GSM Project

This box can save your life, I said during a previous project video because as soon as you press its big red button, it either calls your phone to get you out of awkward conversations or if you select SMS mode, it will send its GPS coordinates as an SMS to a contact of your liking in case you are in an emergency situation. In my opinion, it is a pretty useful box and that is also what lots of people said underneath the original project video which you should definitely check out.

The only problem I have with it is that it is a bit too big to carry around comfortably, and not noticeable. The reason for this is of course that the electronic system is made up of separate breakout boards that need to get connected to one another, and that obviously takes up space. So what I did to solve this problem was creating this almost credit card-sized PCB onto which all components should snugly fit and hopefully still work well together.

In this video, we will explore how to create a miniature GPS and GSM project using a small PCB. We will go through the steps of designing the PCB, populating it with components, and testing it for functionality.

Designing the PCB

To start with, we need to design the PCB. I quickly realized that I didn't have time on my hand to route all the copper traces by myself, so I did the unthinkable and used the autorouter. While it made some questionable choices regarding the power wiring, I was OK with the rest. The autorouter saved me a lot of time and effort.

After designing the PCB, we need to populate it with components. This includes the GPS module, GSM module, microcontroller, and other essential components. We also need to solder the components onto the PCB using hot air.

Populating the PCB

Once we have designed the PCB, we can start populating it with components. The first component we need to add is the GPS module. After soldering it onto the PCB, we use hot air to melt the solder and secure all the components in place.

The next component we need to add is the GSM module. This requires a bit more work than the GPS module, as we need to carefully route the copper traces and make sure that there are no shorts between the SMD pins and all solder connections look good.

After populating both modules, we can move on to the through-hole components which were a walk in the part in comparison to the SMD stuff. These include resistors, capacitors, and other essential components.

Testing the PCB

Once we have populated the PCB with all the necessary components, it's time to test it for functionality. We start by adding test wires and powering the PCB with my lab bench power supply which to my delight didn't let anything explode.

However, the current consumption seemed a bit low, and thus I was a bit scared to check whether the GPS and GSM module were working properly. After checking the voltages on the original breakout board and comparing that to my PCB version while also reverse engineering the original breakout board circuit, guess what; these two resistors were the problem that tie the power key pin and interrupt pin to the supply voltage which I thought is required according to the datasheet.

But apparently, connecting the power pin to GND through a 10kohm resistor is the way to go. Just like that, the GSM status indicator LED came to life, and it seems like all problems were solved.

Programming the Microcontroller

After solving the issues with the GSM module, we can move on to programming the microcontroller. This involves loading the necessary firmware and configuration files onto the microcontroller.

Once the firmware is loaded, we need to program the system outside using a mobile phone or a computer. After positioning the system outside, we can see the GPS indicator LED blinking, and thus sending the GPS location was also no problem.

A New Enclosure

Finally, as a final touch, I also designed a new enclosure for the project which I then 3D printed and through the help of the M3 holes in the corners of the PCB it was all very easy to put together.

And there you have it; a really useful project that is now a lot smaller and thus easier to carry around. With that being said, I hope you enjoyed this video and maybe learned a thing or two along the way. If so, consider supporting me through Patreon. As always, don't forget to like, share, subscribe, and hit the notification bell. Stay creative, and I will see you next time.

WEBVTTKind: captionsLanguage: enThis box can save your life is what I saidduring a previous project video because assoon as you press its big red button it eithercalls your phone to get you out of awkwardconversations or if you select SMS mode itwill send its GPS coordinates as an SMS toa contact of your liking in case you are inan emergency situation.In my opinion it is a pretty useful box andthat is also what lots of people said underneaththe original project video which you shoulddefinitely check out.The only problem I have with it is that itis a bit too big to carry around comfortablyand or unnoticeable.The reason is of course that the electronicssystem is made up of separate breakout boardsthat need to get connected to one anotherand that obviously takes up space.So what I did to solve this problem was creatingthis almost credit card sized PCB onto whichall components should snugly fit and hopefullystill work well together.So in this video we will not only find outwhether this PCB does its job just fine butI will also tell you a bit more about howI designed it because this PCB is a 4 layerPCB and thus a bit more special than the 2layer PCBs I usually use.Let's get startedThis video is sponsored by JLCPCB which isthe PCB manufacturer that produced the 4 layerPCBs for this project.But they do not just make excellent qualityPCBs nowadays, they also offer a 3D printingservice in case you do not have a 3D printerat home and they also offer an SMD assemblyservice in case you are not into hand solderingor want to speed up your PCB assembling process.So feel free to have a look at their websiteand be amazed what they can all do for verylittle money.When starting this project I initially thoughtthat it will be easy finding the main chipsof the GSM and GPS board online but probablydue to the semiconductor shortage that wasnot possible at all.And that is why I was very thankful to havesome spare boards lying around.So the basic idea is removing the main chipsof those boards, placing them onto a customPCB with all the required complementary componentsthey need and then adding an Arduino Pro minias the microcontroller and a TP4056 IC asthe charge circuit for the LiPo battery.And at first that sounded simple enough butas soon as I realized that the used A6 GSMmodule and Neo-6M GPS module both came withdatasheets that didn't feature a typical applicationschematic, I knew it wouldn't be super easy.But luckily there are sites around with moredetails and eventually I even found a schematicaround the GSM module as well as around theGPS module.So I was time to find both of those modulesin EasyEDA, place them in the schematic andmake the necessary connections to their requiredcomplementary components and voltages.And after I decided on a suitable uFL connectorfor the antennas, an EEPROM for the GPS board,a SIM card holder and an ESD protection ICwhich sits between the GSM module and SIMcard holder and basically prevents electrostaticdischarges, I finished the schematic aroundthose modules and moved on to the TP4056 LiPocharging IC.Its datasheet actually comes with a very simpleexample circuit and since I worked with itbefore it was no problem implementing it.And last but not least I added an ArduinoPro Mini board around which I positioned andwired up pretty much the same components asshown in the previous iteration of this projectexcept that this time they were mostly SMDversions of the components.And just like that I had some faith that thisschematic could work but more about the schematicsproblems later.Because now it was time to convert this schematicto a PCB and for that I started off by simplyplacing the outlines of the components ontothe front and bottom layer how I thought itwould make sense.Here is the final result with the Arduino,GPS and interface stuff on the top and theGSM and LiPo charging components on the back.And that was the moment I clicked on my layermanager and switched from 2 copper layersto 4 and the reason for that is quite obviousbecause with 4 layers you simple have morecopper layers for routing your signal andvoltage lines and thus you can squeeze yourcomponents tighter together.Of course there are more professional reasonslike EMC problems but let's keep it simplefor now and as an example have a look at this2 layer design I created before.As you can see on the real life board andin the design I used traces to connect thesignal and voltage lanes of the componentspins to one another on the top and bottomside.By the way to connect the top with the bottomyou utilize so called vias which look likethis on the board.But anyway at the end I then always use thecopper area tool to create one big solid copperarea on the top and bottom that features asmall clearance to all the other traces whileconnecting all the GND pins of the components.This method of course works just fine butby going 4 layers we can set one inner layeras the GND layer and the other one as theVCC or supply voltage layer.This way we can simply set a via next to avoltage pin to jump to one of the inner layersand are therefore left with the complete frontand bottom side for all the other signalswhich gives you so much more space and freedomto design.I highly recommend trying that out but formy design I quickly realized that I didn'thave time on my hand to route all the coppertraces by myself.So I did the unthinkable and used the autorouterwhich is a crime to some but I think whileit did made some questionable choices regardingthe power wiring, I was OK with the rest andthus quickly ordered the boards from JLCPCBfor a great price along with of course a stencilfor both sides.And as soon as the PCBs and stencil arrivedalong with all the other components, it wasfinally time to use some hot air in orderto free the GPS and GSM modules from theirPCBs.Afterwards I used the stencil in order toevenly spread the solder paste onto the firstside of the PCB and that worked out prettygreat.So I placed all the components on this sideand once again use hot air to melt the solderand thus basically secured all the componentsin place.After then using some isopropanol for cleaning,I moved on to the other side which honestlyspeaking was pretty much the same thing asbefore and thus not very hard to do.And after double checking that there wereno shorts between the SMD pins and all solderconnections looked good, it was time to moveon to the through hole components which werea walk in the part in comparison to the SMDstuff.And just like that the assembly was completeand I continued by adding test wires and poweringthe PCB with my lab bench power supply whichto my delight didn't let anything explode.But the current consumption seemed a bit lowand thus I was a bit scared to check whetherthe GPS and GSM module were working properly.And as you can see the GPS module did workwhile the GSM module was sadly not respondingto my commands.So it was time for troubleshooting which Idid by checking the voltages on the originalbreakout board and then comparing that tomy PCB version while also reverse engineeringthe original breakout board circuit.And guess what; these two resistors were theproblem that tie the power key pin and interruptpin to the supply voltage which I thoughtis required according to the datasheet.But apparently connecting the power pin toGND through a 10kohm resistor is the way togo.And just like that the GSM status indicatorLED came to life and it seems like all problemswere solved.So I hooked up a LiPo battery to test whethercharging works which it did and then hookedup the antennas and inserted the SIM cardbefore finally programming the microcontroller.And as you can see the call mode works withouta problem and after positioning the systemoutside we can see the GPS indicator LED blinkingand thus sending the GPS location was alsono problem.Of course as a final touch I also designeda new enclosure for the project which I then3D printed and through the help of the M3holes in the corners of the PCB it was allvery easy to put together.And there you have it; a really useful projectthat is now a lot smaller and thus easierto carry around.With that being said I hope you enjoyed thisvideo and maybe learned a thing or two alongthe way.If so consider supporting me through Patreon.As always don't forget to like, share, subscribeand hit the notification bell.Stay creative and I will see you next time.