Tag Archives: Microcontroller

Electronic Live Capture Mousetrap

A mousetrap is a type of animal trap specialize to catch small animals, particularly rodents like rats, mice, hamsters, etc. This project is a kind of mousetrap that is intended to keep a captured animal alive. In this way, the hunter can release the captured animal later to the wild.

The PIC12F683 microcontroller acts as the heart of the project; it is programmed to meet function of the design. The sensor used in this project is a pair of infrared transmitter and receiver. An infrared LED connected to the GP2 pin of the PIC12F683 transmits continuous infrared signal to the TSOP1138 infrared receiver connected to the GP1 pin of the PIC12F683. To avoid the effect of ambient light, the generated signal at GP2 pin to the infrared LED is modulated at 38kHz frequency. Once the infrared beam is broken, the GP1 input changes, thus, the PIC12F683 reacts by triggering the GP4 pin connected to the BS170 MOSFET that act as a switch of the relay. The relay switch is set to shut the door when triggered. A push button connected at GP3 pin of the PIC12F683 is used for reset.

This project has a simple concept; the trap is built on a box fitted for a rodent to enter. The bait is placed inside the box to lure the rodent in. A sensor will be triggered once the rodent is inside the box, then a single door will shut lock behind the captured rodent.

Electronic Live Capture Mousetrap – [Link]

Humidity sensor using 8051


by circuitstoday.com:

This project is about a simple humidity sensor based on 8051 microcontroller. Humidity sensor is also called hygrometer. This circuit can sense relative humidity (RH) from 20% to 95% at an accuracy of 5%. The humidity information is displayed on a 16×2 LCD display. A relay is also provided which is set to be active when the humidity crosses a certain trip point. The circuit is mains operated and it is very easy to install. DHT11 is the humidity sensor used here. The details and working of the DHT11 humidity sensor is given below.

Humidity sensor using 8051 – [Link]

18 PIN PIC Development Board


The PIC 18 PIN (DIP) Development / Evaluations Board demonstrates the capabilities of Microchip’s 8-bit microcontrollers, specifically, 18 Pin PIC16F1847. It can be used as a standalone demonstration board with a programmed part. With this board you can develop and prototype with all Microchip’s 18 PIN PIC microcontrollers. The board has a Reset switch and status LEDs. On board 3.3 V and 5V DC regulators allows using 3V and 5V PICs, This board support both 3.3V low power and normal 5V operation. All I/O Pins out with 2 x female headers

Development Board Features:

  • 16 I/O Ports
  • Onboard 5V and 3.3V Supply
  • 3.3V or 5V Supply selection by jumper
  • Dual line I/O
  • On board Power Indication
  • On-board ICSP Port (PICKIT2 Standard Programming Port)
  • Well labeled legends
  • All outputs has provision for LEDs for output indication
  • Replaceable PIC Microcontroller,
  • Crystal and capacitor mounting under the PCB

18 PIN PIC Development Board – [Link]

AC energy metering board using an Atmel 90E24 energy metering chip


Steve Rodgers writes:

Here’s my latest project. Its an AC energy metering board using an Atmel 90E24 energy metering chip. The board can either take an ESP8266-12 and run a native C application, or the ESP8266-12 can be omitted, and an external microcontroller can be used to talk to the Atmel 90E24 energy metering chip. I have firmware to support both the AVR and the ESP8266. I built a really nice energy monitoring box using the AVR and a 12864 display.

AC energy metering board using an Atmel 90E24 energy metering chip – [Link]

Transparent ESP8266 WiFi-to-Serial Bridge


jeelabs @ github.com has written a firmware for ESP8266 that enables it to talk to RS232 of your mcu via WiFi and also programm your mcu via WiFi. He writes:

This firmware connects an attached micro-controller to the internet using a ESP8266 Wifi module. It implements a number of features:

  • transparent bridge between Wifi and serial, useful for debugging or inputting into a uC
  • flash-programming attached Arduino/AVR microcontrollers as well as LPC800-series and other ARM microcontrollers via Wifi
  • outbound TCP (and thus HTTP) connections from the attached micro-controller to the internet
  • outbound REST HTTP requests from the attached micro-controller to the internet, protocol based on espduino and compatible with tuanpmt/espduino

The firmware includes a tiny HTTP server based on esphttpd with a simple web interface, many thanks to Jeroen Domburg for making it available! Many thanks to https://github.com/brunnels for contributions around the espduino functionality.

Transparent ESP8266 WiFi-to-Serial Bridge – [Link]

HCS08 VGA Output

This reference design is a simple VGA signal generation that uses the Freescale’s MC9S08SH16VTJR, which is an 8-bit microcontroller that has Central Processor Unit (CPU) speed of 40MHz with a maximum bus frequency of 20MHz. It has an internal clock source module containing a Frequency-Locked Loop (FLL) controlled by internal or external reference. Its precision trimming of internal reference allows 0.2% resolution and 2% deviation over temperature and voltage with 1.5% deviation using internal temperature compensation. The simplest instructions such as NOP take 1 bus cycle, the other instructions take more cycles, and for example RTS takes 6 bus cycles.

The VGA signal has 5 components that include horizontal synchronization, vertical synchronization and three analog color signals. The analog color signal range is 0-0.7V with 75Ω impedance and sync signals are TTL signals. The device has a refresh rate of 60Hz with 640 x 480 resolutions, and the pixel clock is 25.175MHz. The display refresh rate is therefore slightly lower, somewhere around 57Hz. The implementation for video signal generation is in the form of an infinite loop where one loop cycle is equal to one video frame. During every frame the video signal is generated line by line. A subroutine was created that draws multiple lines, where the number of lines is expected in the A register. Every line is divided into 16 parts. Colors of these parts are stored in RAM. Pointer to this array is expected in the HX register. Each of the 3 color channels is 1 bit only having 8 available basic colors.

The device is very simple that adds character to an ordinary static image displayed in an old CRT display. This can be easily reprogrammed as desired by the user. A scrolling strip may be added that is implemented as a rotating buffer. The circuit can be easily constructed using only an MCU, crystal oscillator, VGA connector and few capacitors.

HCS08 VGA Output – [Link]

Basic Automotive Lighting Control with MCU

The electronics trend in automotive is continuously rising due to the demand in the market. The technological developments are now into embedded system in which the manufacturers are developing products that suits to the needs of the people. In this design, it features a automotive lighting control using an MCU with S12 CPU core, 25 MHz bus and up to 240 KB on-chip flash with Error Correction Code (ECC). The timer interface module (TIM) supports up to eight channels that provide a range of 16-bit input capture, output compare, counter and pulse accumulator functions. The on-chip SRAM is up to 12KB while 240KB for flash and 4KB for EEPROM.

The design is comprised of S9S12G240F0CLF 16-bit microcontrollers that serves as the host of the automotive lighting control. It directly communicates with MC10XS6325EK high side driver for the halogen lamps and LEDs that are used in the automotive lighting module. The capacitors connected to VBAT improve emission and immunity performances the same case on VCC while the one connected to CP is charge pump tank capacitor. The capacitor that are connected to OUT1 to OUT5 are for sustaining ESG gun and fast transient pulses that improve emission and immunity performances while the one connected to OUT6 is for sustaining reverse battery voltage. The resistors closed to CSNS pin are for output current sensing and low pass filter removing noise while the ones connected to SYNCB and smart power CSNS are pull-up resistors for the synchronization of A/D conversion. The watchdog timer IN1 to IN4 resistors helps to withstand high voltage. The 20V zener diode and a regular diode are used for the protection of the entire system from possible voltage transients with load or no load while the 5V zener diode is used to ensure 5V supply for the MCU and other components that operates within that range of voltage.

This design is also applicable to space-constrained applications, body controllers, door modules, HVAC, smart actuators, and some related industrial controlling applications with only few external components needed for modifications. It is also a good choice for automotive technological developments and experiments. Since it is targeted generic automotive applications and some intensive applications, therefore it is durable compared to a regular MCUs.

Basic Automotive Lighting Control with MCU – [Link]

Atmega8 Development Board


Atmega8 Development Board provides a very simple and cost effective platform for prototyping solution.  The compact design provides connection to all the pins of the microcontroller for the user.

  • Prototyping solution available for 28-pin ATmega series AVR microcontroller from ATMEL
  • All the three ports available to the user via standard 10 pin box header with supply of 5 VDC for interfacing circuits
  • Onboard reset switch for easy reset of the microcontroller
  • ISP (In circuit Serial Programming) connector available for chips with ISP support
  • 8 MHz crystal on board
  • UART level shifter circuit using MAX232 IC, on board for easy connection of the board to the RS232 devices

Atmega8 Development Board – [Link]

Generation of Sound Using Microcontroller

This project illustrates the use of a microcontroller(MCU) to generate different types of sound. The device uses SST89E54RDA-40-C-PIEMCU, an 8-bit 8051-compatible MCU with embedded SuperFlash memory.The device comes with 24/40KByte of on-chip flash EEPROM program memory which is partitioned into two independent program memory blocks. The primary block 0 occupies 16/32KByte of internal program memory space while the secondary block 1 occupies 8KByte of internal program memory space.

Sound is a function of frequency. This concept has been used to generate sound from the microcontroller. Varying the frequency can produce different types of sounds especially with the use of timer 1 of the MCU to produce different frequencies. Timer is used to produce exact delays and by toggling the output pin, it will generate the desired frequencies. These frequencies are then fed to pin 0 of port 1 which is connected to the speaker. By combining frequencies of different values, different tones will be produced.

The circuit is a basic sound generator that has wide applications such as used in cars that produce sound while reversing. In addition, it supports electronic piano to generate different tones, or in electronic toys to generate sounds. Thus, this device is an effective sound generator that produces an audible sound as preferred by the user.

Generation of Sound Using Microcontroller – [Link]

Delay using 8051 Timer

The major component of this circuit is Microchip’s SST89E54RDA-40-C-PIE, which is a pin-for-pin compatible with typical 8051 microcontroller devices. It has a built-in timer used to produce accurate time delay. The light emitting diode (LED) is connected through the 330Ω resistor to indicate the time delay. The blinking LED switches ON for 1ms and switches OFF for 1ms that indicates toggling from LOW to HIGH and HIGH to LOW. Output PIN P2.2 can be connected to an oscilloscope to generate a square wave.

SST89E58RDA-40-C-PIE comes with 72 Kbyte of on-chip flash EEPROM program memory that is partitioned into 2 independent program memory blocks. The primary Block 0 occupies 64 Kbyte of internal program memory space and the secondary Block 1 occupies 8 Kbyte of internal program memory space. The 8-Kbyte secondary blocks can be mapped to the lowest location of the 64 Kbyte address space; it can also be hidden from the program counter and used as an independent EEPROM-like data memory. In addition to the 72 Kbyte of EEPROM program memory on-chip and 1024 x8 bits of on-chip RAM, the devices can address up to 64 Kbyte of external program memory and up to 64 Kbyte of external RAM.

This design integrating Microchip’s SST89E54RDA-40-C-PIE would be used if high-accuracy, precision and timing resolution of timed events are required to activate or deactivate control outputs based on programmed time intervals. Time delay applications include pump control, food processing, and packaging control where precise ON/OFF control is necessary.

Delay using 8051 Timer – [Link]