Skip to main content

Posts

PCB Manufacturing, Prototyping & R&D in the Maldives

Custom ESP32-S3 development board — professionally manufactured by JLCPCB. A far cry from where it all started. It Started in a School Science Lab — Around 1998 Most people who get into electronics start with a kit, a tutorial, maybe a breadboard and some LEDs. I started by sneaking ferric chloride out of a school science lab to etch my first PCB. That was around 1998. I was living in the Maldives — a small island nation in the Indian Ocean — where there was no electronics supply chain, no maker community, no local PCB fab. Just a chemistry cabinet at school, a copper-clad board from somewhere, and a lot of curiosity. This post is about what the next 25+ years of PCB prototyping looked like from there. The early wins with proper chemicals, the years of improvisation when those chemicals disappeared, the real injuries, the failed boards, and finally — the moment JLCPCB changed ever...

Python scrip to get public_url from ngrok using API.

First of all what is ngrok?  ngrok exposes local servers behind NATs and firewalls to the public internet over secure tunnels. This can be used by developers who want to run webhooks with https if you dont have a local ssl certificate. For example telegram, Facebook etc use webhook but they only allow ssl. If you want to know more about the ngrok , <---- please click this link for more information. The script after setup the ngrok in the local machine you can run the ngrok command to start the tunnel. in my case i run the ngrok as a service which i have explained in my previous post . After the service is running you can run the python script or your preferred to fetch the public_url from ngrok which can be use to automate the process. For example Telegram Bot with webhook enable only communicates with https urls so from this method you can get the randomly generated https url to use in such scenarios. In case if you have a doubt about usage of ngrok and automation ...

TIPS#01: How to run a script as a Linux service?

If you want to run your own script for example a shell script, python etc as a Linux service, please follow this guide. I have tested and already using this methods and this works perfectly. In this example i am using an Ubuntu Linux and a shell script (which will run ngrok as service) if you want to know more about ngrok check out there website. STEP#1: Prepare you script file that you want to run as a service. once you are done with editing save and exit STEP#2: Prepare the service Go to "/etc/systemd/system" and create a file with your naming preferences but should end with a ".service" for example my file name was ngrok.service This how the file should look like. ExecStart is where you define the script that you want to run. Once you done editing save the file and follow the commands as follows. To enable the service  systemctl enable ngrok.service Reload the deamon systemctl daemon-reload Test the service if you run ...

Space is my second hobby

I love exploring and when it comes to technology and bit of rocket science, my interest goes towards SpaceX by Elon musk. There dragon capsule entered earth atmosphere today after successful test mission to ISS. Please enjoy the video.

Converting/Calculating GPS cordinate ddmm.mmm format to decimal degrees

Here is a thing that i have faced few times when it comes to GPS data. Below is the GPGGA string from NMEA data receives from GPS. I have highlighted the latitude and longitude from the string. $GPGGA,081902.00, 0412.75469 ,N, 07332.48758 ,E,1,08,0.97,10.7,M,-93.5,M,,*41 Latitude =  0412.75469 Longitude =  07332.48758 If you want to plot this in google maps or any other platform you need to convert this data to decimal degrees, which will be easy to point the location rather than using raw data. In order to do that please follow these steps and write your own math function for this. For my purpose i am using my own function to handle the conversions. First lets start with latitude. Get rid of the zero first. rawdate = 4 12.75469   in this case 4 is the degrees which is in blue color and minutes in green Formula: degrees = 4 minutes = rawdate - (100*degrees) minutes =  412.75469 - (100*4) minutes = 12.75469 So to find out the decimal ...

GPS hooked up to Raspberry pi - P2

In previous post you have seen the data format which Pi receives from GPS. Its in bytes and here is some raw data. Note: In order to get GPS position data i have placed the unit out of my lab where it can see clear sky. b'$GPGGA,092543.00,,,,,0,00,99.99,,,,,,*6F\r\n' b'$GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30\r\n' b'$GPGSV,3,1,11,02,14,038,,05,37,025,22,12,69,190,,13,32,112,*74\r\n' b'$GPGSV,3,2,11,15,41,162,,19,09,112,,20,17,227,,21,10,283,*77\r\n' b'$GPGSV,3,3,11,24,21,189,,25,52,299,,29,19,339,18*4D\r\n' b'$GPGLL,,,,,092543.00,V,N*43\r\n' b'$GPRMC,092544.00,V,,,,,,,260718,,,N*79\r\n' b'$GPVTG,,,,,,,,,N*30\r\n' b'$GPGGA,092544.00,,,,,0,00,99.99,,,,,,*68\r\n' b'$GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30\r\n' b'$GPGSV,3,1,11,02,14,038,,05,37,025,22,12,69,190,,13,32,112,*74\r\n' b'$GPGSV,3,2,11,15,41,162,,19,09,112,,20,17,227,,21,10,283,*77\r\n' b'$GPGSV,3,3,11,24,21,...

GPS hooked up to Raspberry pi - P1

Its been a while that haven't publish anything. I have been using Raspberry Pi for long time since it was released and the old pi hangs around doing nothing. So i thought of  hooking up an GPS to raspberry pi so that viewers out there who has interest in electronics and programming will know how it can be done. Note: Raspberry Pi inputs or outputs supports 3.3v so the RX and TX pins also support 3.3v. So be careful about handling the voltages with the pi and devices interfacing. I have a ublox GPS but it supports 5v so i need to do level conversion. If you want to know about level conversion please checkout my YouTube channel or the old blog posts. First have to disable pi console in order to use the UART. If not it will get terminated. For more information Google for disabling console. import serial  gpsport = serial.Serial("/dev/ttyAMA0", baudrate=9600, timeout=0.2) while True:      rxgps = gpsport.readline()     if...