Thermocouple Amplifier with OP07C Op-Amp

Recently I created a soldering station based on Arduino Pro mini. It involves reading temperature data from thermocouple within soldering iron. Thermocouple produce a very little voltage, around up to 30 Milli volts for soldering irons. So, soldering station uses an op-amp based circuit to amplify those small signals from thermocouple to signal high enough for microcontroller’s ADC channel can detect. I noticed many DIY makers on Internet uses LM358 as the op-amp for those amplifier circuit, 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.

Continue reading “Thermocouple Amplifier with OP07C Op-Amp”

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.

Continue reading “PWM with STM8S”

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.

Continue reading “Bootloader-less Programming Arduino Pro Mini”

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).

Continue reading “STM8S: Timer 2 with Overflow Interrupt”

STM8S: Use Timer 2 as Simple Counter to Blink LED (without Interrupt)

Timers inside MCUs are very useful and essential peripherals for timing applications. In this article I will show Timer 2 in an STM8S (specifically STM8S103F3) can be used to blink an LED.

Continue reading “STM8S: Use Timer 2 as Simple Counter to Blink LED (without Interrupt)”

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.

Continue reading “Program STM8S Development Board with ST-Link v2”

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.

Continue reading “Program AVR Microcontroller with USBTinyISP and Eclipse IDE”

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.

Continue reading “One Channel Relay Module”

Program Arduino Pro Mini with CP2102 USB to TTL Coverter 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.

Continue reading “Program Arduino Pro Mini with CP2102 USB to TTL Coverter module”