Tag Archives: Microcontroller

Therm: a Tiny PID Controller

therm-2-600x399

by Ethan Zonca @ protofusion.org:

Therm is a very small PID controller with an OLED display, thermocouple interface, and USB port. It can switch an external solid-state relay for driving large loads, or a transistor for driving small loads. When attached to a computer, it enumerates as a USB serial port for easy control and logging of data. The design is based around a STM32F0 microcontroller and the MAX31855 thermocouple-to-digital IC (note: an RTD version of therm is in the works).

Therm: a Tiny PID Controller – [Link]

How to control LM2596 buck-converter with microcontroller

by hugatry @ hackvlog.com:

Every now and then someone asks on different forums if there is an way to control cheap LM2596 modules with an Arduino or another microcontroller. I decided to demonstrate one solution that might be basic electronics for some, but still many don’t know about.

Those buck converters will change the output voltage to make the feedback pin, connected to the output via a voltage divider, become 1.25V or so. If feedback is higher, output gets lower and vice versa. If one changes the ratio of resistors in voltage divider, output voltage will change. This is usually done by turning a trimmer resistor with a screwdriver. That is good enough for many applications where voltage will be set only once, but sometimes there is a need to adjust the output voltage more frequently.

How to control LM2596 buck-converter with microcontroller – [Link]

PIC18 Development Board with Ethernet and USB

FMTEZZDID77M637.MEDIUM

by magkopian @ instructables.com:

The development board is based on a PIC18LF4553 microcontroller. The microcontroller features a Full Speed USB 2.0 (12Mbit/s) interface without the need for any external components. Also, it has 32KB of program memory, 2KB of RAM and it supports an external clock up to 48MHz, which is optional because it also has an 8MHz internal clock.

The ENC28J60 Ethernet controller is used to provide Ethernet connectivity to the microcontroller thought the SPI interface. The ENC28J60 has an integrated MAC and a 10Base-T PHY, 8KB of buffer RAM, supports both Full and Half-Duplex modes and it is fully compatible with 10/100/1000Base-T networks.

PIC18 Development Board with Ethernet and USB – [Link]

Using Efficient SPI Peripherals for Low-Cost MCU-Based IoT Designs

article-2015july-using-efficient-spi-fig1

by Warren Miller @ digikey.com:

Efficient Internet of Things (IoT) designs must balance a host of requirements that often work against each other. Low cost is important, but often supporting all the key features required by the application increases MCU pin count and memory size—two things that work against low cost. Low power is also important for IoT applications where battery operation is a must. Adding features and improving performance can up the power requirement, however. Clearly finding the right balance between all these requirements can be a problem, but that’s just the type of challenge engineers expect from cutting-edge designs.

Using Efficient SPI Peripherals for Low-Cost MCU-Based IoT Designs – [Link]

Externally clocking (and overclocking) AVR MCUs

KXO44Mhz

by nerdralph.blogspot.ca:

People familiar with AVR boards such as Arduinos likely know most AVR MCUs can be clocked from an external crystal connected to 2 of the pins. When the AVR does not need to run at a precise clock frequency, it is also common to clock them from the internal 8Mhz oscillator. Before CPUs were made with internal oscillators or inverting amplifiers for external crystals, they were clocked by an external circuit. Although you won’t see many AVR projects doing this, every AVR I have used supports an external clock option.

Externally clocking (and overclocking) AVR MCUs – [Link]

ATMEGA16/32 DEVELOPMENT BOARD

C032_1

ATmega16/32 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 40-pin ATmega series AVR microcontroller from ATMEL
  • All the four ports available to the user via standard 10 pin box header connector with supply of 5 VDC for interfacing circuits
  • Onboard reset switch for easy reset of the microcontroller

ATMEGA16/32 DEVELOPMENT BOARD – [Link]

Designing a PIC24 development board

top-view2-600x366

Brian Dorey has designed and built a PIC24 development board, that is available at GitHub:

One problem we found was trying to prototype code using this microcontroller as unlike Arduino and any ARM microcontrollers there isn’t a small easy to use prototyping board available for the PIC24 chip. Microchip make an Explorer 16 Development Board which is designed to work with the PIC24 microcontrollers but it is large and fairly expensive and is designed to work best with other Microchip addon cards.

With this problem in mind we decided to design and build a small prototyping board that would work with the PIC24FJ128GC006 as well as one of Microchips DSPIC33EP256MU806 dsPIC series microcontrollers. The prototyping board was designed with removable daughter boards for the microcontroller.

Designing a PIC24 development board – [Link]

Read multiple switches using ADC

DI5495f3

by Les Hughson @ edn.com:

The ATMega168 is a great general purpose 8-bit AVR microcontroller from Atmel. It has 23 GPIO pins, but sometimes (as I have found) you can run out of I/O pins as your design grows. This happened to me recently when, of the 23 GPIO pins available, 2 were taken up by an external ceramic resonator, 1 for the reset line, 3 for serial coms, 14 for the LCD, and 3 for RGB LED control. This used all 23 GPIO pins, with none left for the four buttons I needed. What to do? This Design Idea has the solution.

A close look at the ATMega168 data sheet revealed that the I/O pins available on the 28-pin DIP package and on the 32-pin TQFP package are not all the same. On the TQFP package, there are an additional pair of VCC & GND pins and an additional two ADC input pins on top of the advertised 23 GPIOs. So if I could read my 4 buttons with these extra ADC inputs, all would be OK and the design would be saved.

Read multiple switches using ADC – [Link]

Automatic Pet Feeder

This project is an automatic pet feeding system using NXP Semiconductors’ PCA8565. The PCA8565 is a CMOS1 real time clock and calendar optimized for low power consumption. A programmable clock output, interrupt output and voltage-low detector are also provided. All address and data are transferred serially via a two-line bidirectional I2C-bus with a maximum bus speed of 400kbps. The built-in word address register is incremented automatically after each written or read data byte. It provides a year, month, day, weekday, hours, minutes and seconds based on a 32.768kHz quartz crystal. It features alarm and timer functions, low current, and extended operating temperature range of -40 degrees Celsius to +125 degrees Celsius. It further contains an 8-bit year register that can hold values from 00 to 99 in BCD format. It also compensates for leap years, thus leap year correction is automatic.

The electronic part of the device is just an alarm clock based on NXP PCA8565. The alarm initiates an interrupt that awakes the microcontroller. The later one sends a signal to the motor to control its forward and reverse mechanism. The dc motor must make a full turn and stop in the initial position to be ready for the next loading. This is achieved by an opto-interrupter OBP625, which provides a feedback to the microcontroller to stop powering the motor. The motor itself is controlled by PWM based on the timer IC in order to slow it down to a practical speed. The current time and the alarm time are displayed by a 4-digit LED display combined from two HDSP-521E 2-digit displays. Time to display is selected by a 3-state slider connected to pins RA0 and RA1 of PIC16F684. In the middle position of this switch both inputs are pulled up (internally). Two buttons at inputs RA4 and RA5 accomplish time setting and alarm setting. The LED display is controlled by SAA1064. The controller and PIC communicate via the I2C interface. The display is turned OFF after 10 seconds upon release of any button. This is achieved by simply turning OFF the controller and display power by a MOSFET IRLML6402 when the voltage on pin RC2 of PIC becomes 5V.

Food and water are two essential elements for keeping pets happy and healthy. But what happens if you have to work all day, can you imagine that starving look when you come home? As a pet owner, you have to find a way that your pet is fed on time. Keep your pet well fed when you’re away using the automatic pet feeder. You never have to worry about rushing home or working late. It ensures that your pets never miss a meal and maintain their regular eating schedule.

Automatic Pet Feeder – [Link]

Basic Temperature Control for Refrigerators

This design is a basic temperature control for refrigerators that has an electromechanical circuit. It specifically uses MC9RS08KA4CWJR microcontroller which has an 8-bit RS08 central processing unit, 254 bytes RAM, 8Kbytes flash, two 8-bit modulo timers, 2-channel 16-bit Timer/PWM, inter-integrated circuit BUS module, keyboard interrupt, and analog comparator. This project effectively controls temperature of any device using resistors and capacitors.

The refrigerator temperature control is a basic RC network connected to an I/O pin. A variable resistor (potentiometer) is used to modify the time the capacitor takes to reach VIH and adjusting its resistance varies that time. A basic voltage divider with one resistor and one thermistor is used to implement the temperature sensor. The thermistor resistance depends on the temperature. For each temperature, we have a different voltage in the divider. This value is effectively measured with the Analog-to-Digital Converter (ADC) implemented by software that uses one resistor, one capacitor, and the analog comparator. In addition, VDD and VSS are the primary power supply pins for the MCU. This voltage source supplies power to all I/O buffer circuitry and to an internal voltage regulator. The internal voltage regulator provides a regulated lower-voltage source to the CPU and other MCU internal circuitry.

This temperature control will not only be applicable to refrigerators but also to electronic devices that need temperature monitoring. It is a low cost device that may be integrated to appliances, medical and industrial equipment.

Basic Temperature Control for Refrigerators – [Link]