Showing posts with label Microcontroller. Show all posts
Showing posts with label Microcontroller. Show all posts

Sunday, September 5, 2010

digital clock / calendar / thermometer


Here is a finely made digital clock with calendar and thermometer.

It is based on Microchip PIC16F628 (or PIC16F84) microcontroller and DS18S20 or DS18B20 temperature sensor from Maxim-IC. The hardware is pretty easy because it contains only a PIC microcontroller, DS18S20/DS18B20 sensor, 4x7 segment LED display with common anode, four 2N3906 transistors and several resistors.

The project site can also be found and the project: a digital thermostat.

digital clock / calendar / thermometer


Here is a finely made digital clock with calendar and thermometer.

It is based on Microchip PIC16F628 (or PIC16F84) microcontroller and DS18S20 or DS18B20 temperature sensor from Maxim-IC. The hardware is pretty easy because it contains only a PIC microcontroller, DS18S20/DS18B20 sensor, 4x7 segment LED display with common anode, four 2N3906 transistors and several resistors.

The project site can also be found and the project: a digital thermostat.

Connect The Thermal Printer to Microcontroller

This is how to actually only the head of thermal printer and the printer does not complete. Management of the whole printer would be much easier, just send a couple of AT commands and it starts to print the desired information. In this case, the author had to make a "font" in the firmware, to control two servo motors and warming elements on the print head.

Microcontroller that is used with the Atmel AVR Arduino bootloader-om. Warming elements are controlled with a ULN2801A Darlington transistors that are again controlled by SN74164 shift register to preserve a lot of IO pins. See the video printer in action.

Connect The Thermal Printer to Microcontroller

This is how to actually only the head of thermal printer and the printer does not complete. Management of the whole printer would be much easier, just send a couple of AT commands and it starts to print the desired information. In this case, the author had to make a "font" in the firmware, to control two servo motors and warming elements on the print head.

Microcontroller that is used with the Atmel AVR Arduino bootloader-om. Warming elements are controlled with a ULN2801A Darlington transistors that are again controlled by SN74164 shift register to preserve a lot of IO pins. See the video printer in action.

Tuesday, November 10, 2009

CAN BUS Interface With Microcontroller by SPI Circuit



SYSTEM IMPLEMENTATION



MCP2515
Description
Microchip Technology’s MCP2515 is a stand-alone
Controller Area Network (CAN) controller that implements
the CAN specification, version 2.0B. It is capable
of transmitting and receiving both standard and
extended data and remote frames. The MCP2515 has
two acceptance masks and six acceptance filters that
are used to filter out unwanted messages, thereby
reducing the host MCUs overhead. The MCP2515
interfaces with microcontrollers (MCUs) via an industry
standard Serial Peripheral Interface (SPI).

Features
• Implements CAN V2.0B at 1 Mb/s:
- 0 – 8 byte length in the data field
- Standard and extended data and remote
frames
• Receive buffers, masks and filters:
- Two receive buffers with prioritized message
storage
- Six 29-bit filters
- Two 29-bit masks
• Data byte filtering on the first two data bytes
(applies to standard data frames)
• Three transmit buffers with prioritizaton and abort
features
• High-speed SPI™ Interface (10 MHz):
- SPI modes 0,0 and 1,1
• One-shot mode ensures message transmission is
attempted only one time
• Clock out pin with programmable prescaler:
- Can be used as a clock source for other
device(s)
• Start-of-Frame (SOF) signal is available for
monitoring the SOF signal:
- Can be used for time-slot-based protocols
and/or bus diagnostics to detect early bus
degredation
• Interrupt output pin with selectable enables
• Buffer Full output pins configurable as:
- Interrupt output for each receive buffer
- General purpose output
• Request-to-Send (RTS) input pins individually
configurable as:
- Control pins to request transmission for each
transmit buffer
- General purpose inputs
• Low-power CMOS technology:
- Operates from 2.7V – 5.5V
- 5 mA active current (typical)
- 1 µA standby current (typical) (Sleep mode)
• Temperature ranges supported:
- Industrial (I): -40°C to +85°C
- Extended (E): -40°C to +125°C

http://ww1.microchip.com/downloads/en/DeviceDoc/21801d.pdf

Monday, October 19, 2009

USB Keyboard by Microcontroller with Embedded Hub Circuit

The Atmel sample version of the AT43USB326 contains firmware
that supports customization of the Vendor ID, Product ID,
String Descriptor and the keyboard matrix. This information
is stored in an external AT24C02A serial EEPROM.



The Atmel AT43USB326 is an 8-bit microcontroller based on the
AVR RISC architecture. By executing powerful instructions in
a single clock cycle, the AT43USB326 achieves throughputs
approaching 12 MIPS. The AVR core combines a rich instruction
set with 32 general-purpose working registers. All 32 registers
are directly connected to the ALU allowing two independent
registers to be accessed in one single instruction executed in
one clock cycle. The resulting architecture is more code efficient
while achieving throughputs up to ten times faster than
conventional CISC microcontrollers.

Features
• AVR® 8-bit RISC Microcontroller with 83 ns Instruction Cycle Time
• USB Hub with One Attached and Two External Ports
• USB Keyboard Function with Three Programmable Endpoints
• 16 KB Program Memory, 512 Bytes Data SRAM
• 32 x 8 General-purpose Working Registers
• 32 Programmable I/O Port Pins
• Support for 18 x 8 Keyboard Matrix
• Keyboard Scan Inputs with Pull-up Resistor
• Four LED Driver Outputs
• One 8-bit Timer/Counter with Separate Pre-scaler
• External and Internal Interrupt Sources
• Programmable Watchdog Timer
• 6 MHz Oscillator with On-chip PLL
• 5V Operation with On-chip 3.3V Power Supply
• 48-lead LQFP Package

http://www.atmel.com/dyn/resources/prod_documents/doc3313.pdf

Tuesday, August 11, 2009

Inductive Touch Sensing Keyboard Circuit

Figure shows an example for a 4-key Inductive Touch Sensing keyboard
with key controlled by the IO pins of the PIC® MCU.



The PIC® microcontroller is used to generate a squarewave signal and
to do all the necessary operations forproper detection of the key press event.

Then, RIN-CIN filter converts the square wave output ofthe PWM into
a quasi-triangular waveform.

To calculate the amplitude of the triangular signal, thestandard charging
time equation for an RC network willbe used

MCP2036
DescriptionThe MCP2036 Inductive Sensor Analog Front End(AFE)
combines all the necessary analog functions fora complete inductance
measurement system.The device includes :• High-frequency,
current-mode coil driver forexciting the sensor coil.• Synchronous detector
for converting AC sensevoltages into DC levels.• Output amplifier/filter to
improve resolution andlimit noise.• Virtual ground reference generator for
singlesupply operation.

Features
• Complete Inductance Measurement System:
- Low-Impedance Current Driver
- Sensor/Reference Coil Multiplexer
- High-Frequency Detector
• Operating Voltage: 2.7 to 5.5V
• Low-Power Standby Mode
• Gain and Frequency set by external passivecomponents


MCP2036 Datasheet pdf
http://ww1.microchip.com/downloads/en/DeviceDoc/22186A.pdf

Introduction to Inductive Touch Sensing Vedio

Introduction to mTouch Inductive Touch Sensing Part 1



Introduction to mTouch Inductive Touch Sensing Part 2

Wednesday, April 15, 2009

Microcontroller to USB Serial Interface Circuit


Microcontroller to USB UART Interface Circuit



Figure 7.4 USB to MCU Serial Interface
An example of using the FT232R as a USB to Microcontroller
(MCU) UART interface is shown in Figure 7.4. In this application
the FT232R uses TXD and RXD for transmission and reception of
data, and RTS# / CTS# signals for hardware handshaking. Also
in this example CBUS0 has been configured as a 12MHz output to
clock the MCU. Optionally, RI# could be connected to another I/O
pin on the MCU and used to wake up the USB host controller from
suspend mode. If the MCU is handling power management functions,
then a CBUS pin can be configured as PWREN# and would also be
connected to an I/O pin of the MCU.

FT245BM datasheet pdf


Implementation USB to microcontroller (AVR)

Purpose of this article is to inform readers about implementation
USB interface into singlechip microcontroller, which this interface
directly not supports. Simply: implementation USB interface on
firmware level (similar as emulation of RS232 Serial interface in
microcontrollers, which not have RS232 Serial support). This project
includes development of firmware on microcontroller side, driver
development on computer side (for Windows operating system) ,
development of DLL library for functions calling from another
programs (programmers level) and development of demo program
(users level), which shows all functions of this device. Device is
named IgorPlug-USB (AVR) (as successor of my previous device
for computer remote control
IgorPlug - serial port version).


Universal USB interface
more

Thursday, April 9, 2009

Magnetic Rotary Encoder to Microcontroller Circuit


AS5145
12-Bit Programmable Magnetic Rotary Encoder

The AS5145 is a contact less magnetic rotary encoder for
accurate angular measurement over a full turn of 360 degrees.
It is a system-on-chip, combining integrated Hall elements,
analog front end and digital signal processing in a single device.
To measure the angle, only a simple two-pole magnet, rotating
over the center of the chip, is required. The magnet may be
placed above or below the IC.The absolute angle measurement
provides instant indication of the magnet’s angular position with
a resolution of 0.0879º = 4096 positions per revolution. This
digital data is available as a serial bit stream and as a PWM
signal.An internal voltage regulator allows the AS5145 to
operate at either 3.3V or 5V supplies.

Typical magnet (6x3mm) and magnetic field distribution



Daisy Chain Mode

The Daisy Chain mode allows connection of several
AS5145’s in series, while still keeping just one digital input
for data transfer (see “Data IN” in Figure 9). This mode is
accomplished by connecting the data output (DO; pin 9) to
the data input (PDIO; pin 8) of the subsequent device. The
serial data of all connected devices is read from the DO pin
of the first device in the chain. The length of the serial bit
stream increases with every connected device,
it is n * (18+1) bits: n= number of devices. e.g. 38 bit for two
devices, 57 bit for three devices, etcetc.

Tuesday, April 7, 2009

Microcontroller Switch-Mode Battery Charger Circuit


Microcontroller Battery Charger Circuit



In applications where a microcontroller is available, the
MAX1640/MAX1641 can be used as a low-cost battery
charger (Figure 5). The controller takes over fast
charge, pulse-trickle charge, charge termination, and
other smart functions. By monitoring the output voltage
at VOUT, the controller initiates fast charge (set D0 and
D1 high), terminates fast charge and initiates top-off
(set D0 high and D1 low), enters trickle charge (set D0
low and D1 high), or shuts off and terminates current
flow (set D0 and D1 low).
more pdf


MAX846A Li+ charger with charge timer and LED-status
outputs, controlled by an 8-pin Microcontroller



In this example, a small external µP enhances the MAX846A,
forming a complete desktop-charger system that includes
user-interface functions such as the LEDs in Figure (to indicate
the charge process and status). The MAX846A is designed for
this type of operation. Its auxiliary linear regulator and µP-reset
circuit (to support the external µC) reduces the cost of a typical
desktop-charger application.