Blog

Nginx Configuration for WordPress with HTTPS Enabled

Few days back I switched back to WordPress from static site generator Hugo. On my server I am using Nginx as web-server though I am more familiar with Apache Web Server (Now I can't remember exactly why I switched to Nginx?!). I am using LetsEncrypt SSL certificates and always redirect regular HTTP traffic to HTTPS.

So, here is the Nginx configuration I used for my WordPress installation. It redirects all non-HTTPS to HTTP. Please replace <webroot> and <domain> in this template with your corresponding values.

Thermocouple Amplifier with OP07C Op-Amp

Recently I created a soldering station based on Arduino Pro mini. It has to read temperature data from a thermocouple within the soldering iron. Thermocouple produces a very little voltage, around up to 30 Milli volts for soldering irons. So, the soldering station uses an op-amp based circuit to amplify those small signals from the thermocouple to a signal high enough for the microcontroller's ADC channel can detect. I noticed many DIY makers on Internet use LM358 as the op-amp for those amplifier circuits, while researching on the topic. I learned LM358 is not a good choice for the purpose because it has relatively high off-set voltage, a voltage op-amp gives in output when input voltage is 0. Then I researched many many designs and finally settled to use OP07C op-amp IC.

Switched to Hugo

I switched to Hugo as static site generator for my blog on last Sunday. I was using Stagen, a static site generator wrote myself in Node.js, from March of 2016.

PWM with STM8S

PWM is a great way to control brightness of LEDs, speed of motors, etc. Most microcontrollers including STM8S has built in ability to generate PWM signals. In this article I share simple code to generate PWM signal in STM8S microcontroller. However, I don't write anything about PWM theory other than basic calculation to get required frequency and duty cycle.

Bootloader-less Programming Arduino Pro Mini

Recently I was creating a configurable timer circuit based Arduino Pro Mini. The circuit has a momentary push button which user can press to turn ON the device. The device will turn OFF itself once the time is elapsed. On starting, Arduino has to turn on a relay to get permanent connection to power source, so it will get power when user released the push button. One issue I faced was that Arduino takes around 3 seconds to start executing the program because of the presence of the bootloader. So, user would have to keep push button pressed for around 3 seconds to get the device started. I wanted to get rid of bootloader so Arduino will start executing the program soon we press the push button for a moment.

STM8S: Timer 2 with Overflow Interrupt

In previous post I showed how we can use Timer 2 as simple counter. In this post I am going to show how we can program to have interrupt when its value overflow. As simple experiment, we will toggle an LED in each second within the interrupt handler (also called ISR, Interrupt Service Routine).

Program STM8S Development Board with ST-Link v2

I successfully programmed development board having STM8S103F3P6. It is quite simple to make it blink LED. For me, it was second easiest after Arduino Uno to get started. I used SDCC as the C compiler, ST-Link v2 clone as programmer, and stm8flash to flash the binary file through ST-Link.

Program AVR Microcontroller with USBTinyISP and Eclipse IDE

In this post I will detail out how we can program an AVR microcontroller, specifically ATTiny13a, with USBTinyISP and Eclipse IDE in Linux environment. I am using Ubuntu 16.04 LTS. I hope it will work in other distributions with little or no modifications.

One Channel Relay Module

Here is the schematic and details for creating one channel relay module. It would be capable of driving both DC and AC current when appropriate relay is used. We can connect output pin of most of microcontrollers including Arduino to control it.

Program Arduino Pro Mini with CP2102 USB to TTL Converter module

I like Arduino Pro Mini boards more than other Arduino boards. Mainly because of its minimalist design. But Arduino Pro Mini does not have built in USB interface to program it directly like we do in Arduino Uno. However we can program a Arduino Pro Mini easily using a cheap CP2102 USB to TTL converter module.

We just need to connect Arduino Pro Mini and CP2102 in following way:

Cheap Dual Voltage Regulator

Here is the schematic design to create a dual voltage regulator to power our Arduino and other small circuits. It is built around AMS1117 low drop out voltage regulators.

Install Driver for TP-Link TL-WN823N in Raspberry Pi 2 Model B

Recently I brought TP-Link TL-WN823N wireless USB adapter to connect my Raspberry Pi over wireless network. Mine is Raspberry Pi 2 Model B, so not having built in wireless capability. I chose TP-Link TL-WN823N over Edimax EW-7811Un because of its 300 Mbps speed, both were available on amazon.in with similar price.

It did not get detected out of box when plugged into my laptop running Ubuntu 16.04. The driver available at TP-Link website could not be installed because it was for older version of kernel. However, I could easily find driver over Googling and it worked fine.

കീമാൻ

വിക്കിപീഡിയയിലും കീമാജിക്കിലും ഉപയോഗിച്ച അതേ മലയാളം മൊഴി രീതിയിലുള്ള കീബോർഡ് കീമാനിനു വേണ്ടിയും തയ്യാറാക്കി. അതിന്റെ കൂടുതൽ വിശദാംശങ്ങളിലേക്ക് കടക്കുന്നതിനുമുൻപ് കീമാനിനെ കുറിച്ച് ചെറിയൊരു ആമുഖം നൽകാം.

കീമാജിക്ക് 2

കീമാജിക്ക് 2.0 ന്റെ പ്രിവ്യൂ പതിപ്പ് ഇറങ്ങിയിട്ട് കുറച്ച് നാളായി. വിസ്റ്റ മുതൽ 10 വരെയുള്ള വിൻഡോസുകളിൽ മറ്റ് പോഗ്രാമുകൾ ഇൻസ്റ്റാൾ ചെയ്യാതെ തന്നെ കീമാജിക്ക് ഉപയോഗിക്കാം എന്ന മെച്ചമുണ്ട്. കൂടാതെ, മുൻപുള്ളതിൽ നിന്നും വ്യത്യസ്തമായി 32 ബിറ്റിനും 64 ബിറ്റിനും ഒരേ കീമാജിക്ക് തന്നെ മതി. മുൻപ് അത് സാധ്യമല്ലായിരുന്നു.

പുതിയ കീമാജിക്ക് ഇവിടെനിന്നും ഡൗൺലോഡ് ചെയ്യാം. KeyMagic-v2.0Pre-4 ആൺ നിലവിൽ ലഭ്യമായിരിക്കുന്നത്. കൂടുതൽ മെച്ചപ്പെടുത്തുലുകൾ നടക്കുന്ന് മുറയ്ക്ക് പുതിയ പതിപ്പുകൾ ഇറങ്ങും.

Keymagic Malayalam on Mac OS

Recently I am being receiving many queries regarding using Keymagic to write Malayalam on Mac OS systems. This is the post I write as help for those people, also to help myself to avoid writing separate instructions in each reply.

I do not have any experience or access to Mac OS based system now. So, my writing here may not have enough details. However, I assume it will be useful. Please let me know things I need to improve in this post as well.

2016 കേരള അസംബ്ലി തിരഞ്ഞെടുപ്പിന്റെ ഫലം ശേഖരിക്കാനുപയോഗിച്ച പൈത്തൺ സ്ക്രിപ്റ്റ്

കഴിഞ്ഞ "2016 ലെ കേരള അസംബ്ലി തിരഞ്ഞെടുപ്പ് ഫലം" എന്ന പോസ്റ്റിൽ തിരഞ്ഞെടുപ്പ് ഫലം ശേഖരിക്കാനുപയോഗിച്ചെന്നു സൂചിപ്പിച്ച പൈത്തൺ സ്ക്രിപ്റ്റ് ഇവിടെ നൽകുന്നു. http://trend.kerala.gov.in/ വെബ്സൈറ്റിൽ നിന്നുമാണ് ഇത് ഫലം ശേഖരിക്കുന്നത്.

തിരഞ്ഞെടുപ്പ് ഫലം ഡാറ്റ ഫയലുകൾ ഇതിനകം തന്നെ ശേഖരിച്ച് മുകളിൽ പറഞ്ഞ പോസ്റ്റിൽ നൽകിയിട്ടുണ്ട്. അതോടെ സ്ക്രിപ്റ്റിന്റെ ഉപയോഗം കഴിഞ്ഞു.കൂടാതെ, http://trend.kerala.gov.in/ സൈറ്റിലെ വിവരങ്ങൾ ഒരോ തിരഞ്ഞെടുപ്പിനു ശേഷവും മാറ്റുന്നുണ്ടെന്നാണ് എനിക്ക് തോന്നുന്നത്. അതായത്, അടുത്ത തിരഞ്ഞെടുപ്പോടെ സ്ക്രിപ്റ്റ് റൺ ചെയ്യാതെ വരും.

2016 ലെ കേരള അസംബ്ലി തിരഞ്ഞെടുപ്പ് ഫലം

കുറച്ച് ദിവസങ്ങൾക്ക് മുൻപ് 2016 ലെ കേരള നിയമസഭ തിരഞ്ഞെടുപ്പ് ഫലം ഏതെങ്കിലും വിധത്തിലുള്ള കമ്പ്യൂട്ടർ ഡാറ്റ ഫയലായി ലഭ്യമാണോ എന്ന് തിരഞ്ഞപ്പോൾ കിട്ടിയില്ല. എന്നാൽ അത് വെബ് പേജിൽ ലഭ്യമായിടത്ത് നിന്നും ശേഖരിച്ച് പങ്കുവയ്ക്കാമെന്ന് വിചാരിച്ചു. അങ്ങനെ ഒരു പൈത്തൺ സ്ക്രിപ്റ്റെഴുതി ശേഖരിച്ച ഡാറ്റ ഇവിടെ പങ്കുവെയ്ക്കുന്നു. സ്പ്രെഡ്ഷീറ്റ്, JSON ഫോർമാറ്റുകളിലുള്ള ഫയലുകൾ താഴെ കാണാം.