Tuesday, July 28, 2009

SD/MMC Card interfacing with Microcontroller Circuit Project

SD/MMC Card interfacing with MUC with AVR Microcontrollers
Interfacing with ATMega 162:

It is easy to interface a MMC (Multimedia Card) with an Atmel ATmega162 (AVR series) via the SPI (Serial Port Interface). The MMC is connected to the SPI pins of the ATmega16 via simple resistor voltage dividers to transform the +5V high levels to about 3.3V used by the MMC. If the Atmega-162 is working on 3.3 V power supply then all the MMC pins can be directly connected to Microcontroller (as in this design). The data-out pin from the MMC goes directly to the ATmega162, because 3.3V is high for the ATmega162 anyway. The schematic of the MMC interfacing is given below.


http://devusb.googlepages.com/sdmmcinterfacing

Microcontroller board with Ethernet, MMC/SD card interface and USB
Hardware components already integrated on the reference design include:
• Atmel ATmega128 RISC microcontroller with standard 10-pin ISP header
• 64 kByte of external SRAM
• USB <-> RS232 interface
• SD/MMC socket
• Ethernet interface with ENC28J60 (IEEE 802.3, 10Base-T)
The hardware design is expandable by connecting additional components to the existing pin header. Several digitial I/Os, A/D inputs as well as the standard SPI and I2C (TWI) serial interfaces are available for user-defined purposes.
The curcuit board is designed as a two-layer board of size 100mm x 80mm. Most components use SMD packages.


http://www.roland-riegel.de/mega-eth/index.html

SD/MMC Interface Integration Guidelines
SD/MMC cards provide a low cost solution for data logging and storage applications
for embedded systems. SD/MMC cards can be easily interfaced with a
Microcontroller using an SPI interface and between one and three control lines. While
the electrical interface is relatively straight forward, successfully implementing a
solution can be time consuming for the initial implementation. This document looks at
some of the common pitfalls encountered. The document assumes the developer is
implementing Brush Electronics SD/MMC File System drivers or Utilities with a
Microchip PIC Microcontroller however the principles apply to other implementations.

http://www.smallridge.com.au/download/SD-MMC%20Integration.pdf


MMC/SD Card interfacing and FAT16 Filesystem with 8051/8052

Content

# Interface to Chan’s Library of functions

# Target development platform

# Setting up the SPI port during startup.A51

# Global type definitions and variables

# Basic SPI function

1. Transferring & Receiving single byte over SPI Bus
2. SPI Chip Select
3. Setting frequency for SPI Clock
4. Sending command to SD Card
5. Reading response from SD Card
6. Delay and Time function

# SD Card Initialization

1. Setting up the card for SPI Communication

# Reading and Writing a single sector

# Working with diskio.c

# Pulling it all together

http://www.8051projects.net/mmc-sd-interface-fat16/MMC-SD-Card-interfacing-and-FAT16-Filesystem.pdf

Saturday, July 18, 2009

H-Bridge Motor Driver Circuit

H-Bridge
This circuit drives small DC motors up to about 100 watts or 5 amps or 40 volts, whichever comes first. Using bigger parts could make it more powerful. Using a real H-bridge IC makes sense for this size of motor, but hobbyists love to do it themselves, and I thought it was about time to show a tested H-bridge motor driver that didn't use exotic parts.



http://www.bobblick.com/techref/projects/hbridge/hbridge.html

H-bridge using P and N channel FETs
This H-bridge uses MOSFETs for one main reason - to improve the efficiency of the bridge. When BJT transistors (normal transistors) were used, they had a saturation voltage of approximately 1V across the collector emitter junction when turned on. My power supply was 10V and I was consuming 2V across the two transistor required to control the direction of the motor. 20% of my power was eaten up by the transistors. I tried darlingtons etc... nothing worked. The transistors also would get quite hot - no room for heatsinks.


http://www.armory.com/~rstevew/Public/Motors/H-Bridges/Blanchard/h-bridge.htm


N-Channel H-bridge Motor Drive
In low voltage motor drives, it is common practice to use
complementary MOSFET half-bridges to simplify the gate
drive design. However, the P-channel FET within the
half-bridge usually has a higher on resistance or is larger
and more expensive than the N-channel FET. The alternative
solution is to design in an N-channel half-bridge.


http://www.eetkorea.com/ARTICLES/2004MAY/2004MAY18_BD_MSD_PD_AN.PDF

Comparator Controlled H-Bridge Circuits (LM311)
The next two circuits are simple Bi-Polar H-Bridge circuits. The bridges are controlled by a pair of LM311 voltage Comparators.
The LM311 Voltage Comparator has several unique features, one of which is an output transistor with an open emitter as well as the typical open collector. This allows the output transistor of the comparator to sit between the bases of the power transistors.


http://home.cogeco.ca/~rpaisley4/HBridge.html

Robot Motor control
In order to control the speed/torque of a motor, a so called H-bridge can be used. I built/designed one myself, using 4 MOSFETs.


http://www.iwhat.nl/rienatmarobi/bots/Wheeley/motor/index.html

Bidirectional operation (H-bridge circuit)
We have achieved speed control and have made a powerful drive circuit. However in robotic work we also usually want to be able to drive a motor either clockwise or counterclockwise. Before we discuss the use of transistors to solve this problem


http://www.mech.uwa.edu.au/NWS/How_to_do_stuff/micro_crash_course/pwm/