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

Saturday, April 11, 2009

WIDER POSITION SENSING CIRCUIT


To go from 45° to 90° requires two HMC1501
sensors or a single HMC1512 dual sensor part. By
using two bridges with 45° displacement from each
other, the two linear slopes can be used additively.
Figure 8 shows a typical configuration.
From Figure 8, as the shaft rotates around, magnetic
flux from a magnet placed at the end of the shaft exits
the north pole and returns to the south pole. With a
HMC1512 placed on the shaft axis, just above the
magnet, the flux passing through the sensor bridges
will retain the orientation of the magnet. From this
rotation, the output of the two bridges will create sine
and cosine waveforms as shown in Figure 9.



Because the sine (sensor bridge A) and cosine
(sensor bridge B) will match after the offset error
voltages are subtracted, the ratio of bridge A to bridge
B creates a tangent 2O function and the amplitude A
values cancel. Thus the angle theta is described
as:

However because there are some trigonometric
nuances with the arctangent function when gets
close to _45° and beyond, these special cases apply:


Because most trigonometric functions are performed
as memory maps in microcontroller integrated circuits,
these kinds of special case conditions are easily dealt
with. The resultant angle theta is the relative
position of the magnetic field with respect to the
sensor. It should be noted that if rotation is permitted
beyond _90°, the theta calculation will replicate again
with postive and negative 90° readings jumping at the
end points. Further performance to 360° or _180° can
be mapped into a microcontroller by using this circuit
plus a Hall Effect sensor to determine which side of
the shaft is being positionally measured via magnetic
polarity detection. Figure 10 shows the basic circuit
interface for the HMC1512.




Source
http://www.ssec.honeywell.com/magnetic/datasheets/an211.pdf

HMC1501 / HMC1512
Linear / Angular / Rotary
Displacement Sensors
High resolution, low power MR sensor capable of measuring the angle
direction of a magnetic field from a magnet with <0.07>

Thursday, April 9, 2009

Snubber Circuit Design


Mosfet RCD Snubber Circuit Design

Design the MOSFET RCD snubber circuit

Push-Pull Snubber Circuit

Mosfet Snubber Circuit in Flyback Converter Circuit

Switch Protection Design - Fast-Recovery Diodes



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.

Sunday, April 5, 2009

Switch-Mode Battery Charger Circuit


Fast, High Effi ciency, Standalone NiMH/NiCd Battery
Charging Circuit


Figure 1 shows a fast, 2A charger featuring the
high effi ciency LTC4011 550kHz synchronous buck
converter. The LTC4011 simplifi es charger design by
integrating all of the features needed to charge Ni-based
batteries, including constant current control circuitry,
charge termination, automatic trickle and top off
charge, automatic recharge, programmable timer,
PowerPath control and multiple status outputs. Such a
high level of integration lowers the component count,
enabling a complete charger to occupy less than 4cm2
of board area.
more


Battery Charger Delivers 2.5A With >96% Efficiency
Battery chargers are usually designed without regard for
efficiency, but the heat generated by low-efficiency
chargers can present a problem. For those applications,
the charger of Figure 1 delivers 2.5A with efficiency as
high as 96%. It can charge a battery of one to six cells
while operating from a car battery.



Figure 1. Modified feedback paths transform this switch-mode
power-supply circuit for notebook computers into a
high-efficiency battery charger.
more pdf