Owner: Scienceprog - Embedded Related Info URL:http://www.scienceprog.com Join Date: Thu, 31 May 2007 02:24:58 -0500 Rating:0 Site Description: Site is loaded with AVR, ARM microcontroller related information. Many projects including UV exposure box manufacturing, AVR signal generator, DTMF decoder.
Site statistics:Click here
How to solder SMD at home even better-Part two 2007-05-23 06:36:42 This is continue of part one. Following advises are for how to solder SMD parts with improved technology.
Oven isolation
As isolation material there can glass insulation be used. In this case glass insulation was packed in aluminum foil:
Inspected improvement in heating speed:
0.95% without isolation;
1.50% with isolation only inside oven;
1.72% full isolation.
Preparing the mask for applying solder
Using the mask for applying solder paster may improve solder quality and board may look more professional.
As mask material is plastic plate of 0.2mm used. Mask also can be etched as usual circuit board.
If circuit design is made by using Eagle CAD software, then for making mask go to Tools->DRC->Masks. In the field CREAM choose minimum 0, maximum10mil. In the field % valuescan be corrected.
In order to expose negative of SMD plates in Eagle select layer tCream:
File->CAM Processor;
Select layer Dimensions and tCream;
Select in Devices opt Read more:better
How to solder SMD at home-Part one 2007-05-23 05:38:38 Soldering SMD parts isn’t hard task and there are many methods of doing this. Lets go through several SMD soldering methods and examples.
Method 1
For this you will need:
Good eyes or magnifying glass. Better one and another;
Soldering iron with small tip ~10W;
solder wire with diameter about 0.6mm
Steps to follow:
cut solder wire in pieces in length of element width:
Put SMD element on circuit bord where it has to be soldered:
Put solder wire piece next to SMD:
While holding SMD component with pincet solder part to the board by applying iron to the solder;
Once one end is soldered repeat same procedure with another end of SMD element:
Method 2: soldering SMD in the oven
This method is handy when you need to solder SMD packages like LQFP, TQFP64 and so on. If you don’t have special oven for soldering SMD then you can use one that you find at home. Of course take all safety precautions while working with ovens
Very simple IR detector that controls relay 2007-05-23 03:59:17 The circuit of this Infrared(IR) detector circuit is a simple light relay which triggers when infrared light is applied to phototransistor Q1. This device can be used in control systems. When infrared light is OFF, Q1 transistor and relay K1 are normally closed.
When IR diode is transmitting IR light phototransistor Q1 opens and thus relay K1 triggers because current starts flowing through Q2 transistor. Construction can easily be modified when circuit output is connected to microcontroller or other device. Sensitivity so the distance can be controlled by changing IR diode D1, using more sensitive phototransistor Q1 and adjusting R2 resistor.
Original source: http://cxem.net
Quality music sound in the car 2007-05-23 03:34:57 It is obvious that for most of drivers car is more than transportation vehicle. Sometimes people spend hours in the car everyday and listens not only news radio broadcast, but also listens music. To have good quality music sound in the car require more than good speakers and power amps, but also some smart solutions are needed to make it sound better.
In the current time there are plenty publications on how DIY good car sound system at home. But again even best power amplifier do not guarantee that car music will sound as Hi-Fi class. Main problem is bard installation of audio-system inside the vehicle. In many cases speakers are installed where ever they fit in the car. But there is also no clear answer where it is the best place to install speakers and how. The most common mistake is to place powerful high quality speakers in the rear shelf while in front position por speaker are installed or not at all. Such audio system installation gives a feeling line he is sitting back to scene. Read more:Quality
How PCB files are transfered to circuit boards 2007-05-21 10:20:57 When you are done with “clean” period of task – designing, drawing a circuit and tracing a PCB, you need to transfer a design to a real board. Here starts what I call a “messy” part of design. When designing at home there are several options - to use prototyping boards or make PCB by yourself. In second option you have to transfer PCB image to board with copper layer. There are several methods of doing this: direct transfer with glossy paper where image is printed with laser printer or use more advanced ultraviolet exposure. This way PCB image is printed on paper or film directly from program window without keeping in mind about pcb file formats. Different situation iswhen fabricating professional PCB’s. Each company which fabricates PCB boards always announce what type of file formats they support. So if you are going to order a PCB better check with them in order to save your time.
The most common and standard format is so called Gerber file format. Almost all layout Read more:files
PCB routing considerations 2007-05-21 09:36:31 One of hardest tasks when fabricating PCB’s is Printed Circuit Board(PCB) routing. There is no unified rules on how properly board should be routed and it would be impossible to write them as situation on each board is different. One of general rules are that the shortest routes are the best because longer routes tend to generate more noises or pick them up from different sources. It is obvious that every conducting material acts as an antenna no exception with PCB routes. No secret that each route acts as small transmitting and receiving antenna. So one thing is to keep in mid when routing PCB is to route short as possible.
Another concerning area is a cross-talk or cross-coupling between routes. This effect appears when two traces run along each other and energy from one trace route couples to another. This effect is obvious in high frequency digital and analog circuits. This effect can make device dis-functional because only of crosscoupling effect. These defects are hard to d
Microcontroller Simulators and emulators 2007-05-18 10:07:03 Sometimes you just haven’t ability to flash microcontroller in order to test program functionality in development phase. For this there may be many reasons like you don’t have a prototype ready or you need to test parts of code and so on. For this there are software simulators used which simulates microcontroller work without microcontroller itself. Simulators usually don’t have connection to real world all operations are simulated in software. Microcontroller
simulator is a program model which imitates its work. Modern simulators now simulates not only arithmetic operations but also I/O operations and even peripherals like timers, ADC, USART, I2C and so on. In many cases there is possible to prepare whole project jus using simulator and then burn compiled code to real microcontroller.
Simulators usually allow:
debugging at source code level;
follow operation time in slow motion but with real world values;
connect stimulus signals like they are real world sign
Protect you car from rusting using cathode protection 2007-05-16 04:36:32 Who has a car know that smal scratch may cause a rusting which will expand even under painted areas. And fight rusting id pretty hard tas. And so there are lots of methods that car keepers using. Ones are using anti-rust coating… but it has shortcomings – succes depends on how good it have been done. Area needs to be cleaned with care and sometimes requires to to pieces a car. So such operation requires decent amount of time and requires constant control. Besides this car is always in stressed environment: cold, salt, water, vibrations, stones and so on. There is always a chance of damaging surface coating. Because of this there came a device which requires only one installation which protects from rust.
Cathode rusting protection isn’t new thing. It has ben used for protecting various object on and under ground. Even ships are using cathode protection. The idea is to use special protector who melts in sour water instead of protected metal. Water piping companies who use Read more:Protect
How does tri-state buffers work 2007-05-04 09:58:07 Those who work with microcontrollers probably know about data buses. Only one device(memory, peripherals), that are connected to bus can work at one moment. So only one unit can have direct connection to bus besides CPU which usually is a host. So decoding circuit determines the desired unit and connects it to bus. Other devices are effectively disconnected so that they wouldn’t have any affect to bus operations. They are carried out by tri-state buffers.
Tristate buffers allow to isolate circuits from data bus. This means that circuit is switched to high impedance state. Usually we know dual state circuits that can have two logical levels “0” and “1”. But there is also widely used tristate logic, where is ability to switch I/O to high impedance state.
Tristate logic can simply be made by two transistors:
Using such circuit we can have following output results according to input variations:
Q1 Q2 Output
OFF OFF High Impedance
OFF ON
Using Gray code for rotary encoders 2007-05-04 09:39:56 Gray code is well known and widely used in angular movement systems where angular positions has to be known. Gray code encoder can be constructed pretty easily by masked wheel where tracks are read with photocells.
Did you look at the picture and thought for yourself that gray code is same binary code. Well no… main problem with binary system that using binary code in tracks there are many positions where several tracks change state at same time. This may result in error. Actually in gray code only one track can change at same time during rotation. So then if error occur, the resulting erro will be only one bit. Gray code is easy to convert to binary this task can be done by any microcontroller using a lookup table:
Also you can convert Gray code to binary analytically. To convert from binary to Gray, start at the MSB and compare it to 0. If MSB is equal to0, then write 0 as the MSB for the Gray coded number, otherwise write 1. Next compare the next MSB and com
32 bit microcontrollers from ATMEL with ARM7 core 2007-06-06 04:23:02 Somehow I’ve been sticked to NXP LPC2xxx series microcontrollers and left other brands behind. There are many major manufacturers of ARM microcontrollers. One of them that is worth to pay attention is Atmel with its AT91SAM7 (Smart ARM7) series. SAM7 series of microcontrollers have built in Flash memory and data memory as well. Core is powered with 1.8V while peripherals need 3.3V. Core voltage is converted inside the chip so you don’t have to bother about this and only apply stabile 3.3V voltage. SAM7 microcontrollers are based on ARM7 core so they have very good performance characteristics. SAM7 microcontrollers differ from other brands with their ability to access memory directly (DMA), so each microcontroller peripheral have distinct two channel controller. LPC series only have AMBA bridge between AHB and LHB.
Main characteristics of AT91SAM7 series:
very good ratio between performance and poer consumption;
performance up to 60MIPS;
ARM/THUM command support;
New ARM7 Microcontrollers from NXP with LCD support 2007-06-06 03:32:30 New microcontroller LPC2478 from NXP company is based on ARM7 core with built in Flash memory and have built in LCD interface. LPC2470 has no Flash memory.
LPC24 series have two high speed buses AHB to ensure independent work of peripherals like LCD, 10/100 Ethernet, USB and two channels of CAN. LPC24xx have reasonable low prices that allow these MCU to be used in industries like various gadgets, home appliances, medical equipment where LCD is required and also connection to the internet.
LCD displays are part of our life starting from cell phones, media players and car navigation systems GPS. LCD takes important part in medical environment. Where visual information may be critical. So LPC2478 and LPC2470 goes in front of non expensive and low requirements for LCD interfacing.
LPC2478 and LPC2470 supports most of statical LCD displays up to 1024×768 pixels monochrome with fifteen gray levels and color 24bit/pixel TFT panels. Designers of embedded systems have to program L
What is DebugWire interface 2007-06-05 03:34:59 Debug wire is an interface which enables debugging AVR microcontrollers by using one wire. All new AVR microcontrollers with less than 16kByte memory have built in one wire bidirectional debugging interface which allows debugging devices at the real time.
Like JTAG interface DebugWIRE can handle full execution and program flow control. It also supports unlimited number of breakpoints, adjusting memory contents. Good thing is that interface doesn’t require additional pins as only RESET pin is used for debugging purposes.
To enable debugwire interface DWEN fuse has to be programmed also lock bits has to be un-programmed. Then RESET port pin is activated as open-drain bi directional I/O pin with pullup enabled. Reset pin becomes communication gateway between target and emulator. When debugging external reset circuitry should be disconnected – so no external reset source will be present during debugging.
Debug wire adapter-debugger communicates through one data register DWD
Major programmer types for 8 bit AVR microcontrollers 2007-06-04 09:42:27 AVR microcontrollers have many ways to be programmed. One type adapters are used only to
program AVR memory other are used to program and debug.
AVRISP
Most known and common programming adapter is AVRISP, which is the basic tool and can be used to program Flash, EEPROM memory, most of fuses, lock-bits for probably all 8bit AVR MCU’s.
Programmer connects to a computer via RS232 serial interface and is powered from target board with no need additional power supply. Programmer connects to target board via one of two headers – 6 or 10pin. AVRISP from Atmel corporation is designed to work from AVRStudio as front end software and is upgradable. However AVRISP is discontinued due to newer adapter appearance – AVRISP MKII. There are cheep third party clones available. But most of them aren’t compatible with AVRStudio, but works well with programs like PonyProg or AVRDUDE.
AVRISP MKII
AVRISP MKII is more advanced programmer which is fully supported by Atmel. Adapter conn Read more:Major
, types
Circular buffers in DSP processors 2007-06-12 10:06:31 I am not going to analyse what DSP processors are different from regular microcontrollers as there are many differences that allow to boost performance in many specific tasks like filtering, FFT, etc. One thing is obvious that DSP processors have to perform mathematical calculations rapidly enough to get predictive results. Better result we want – more processing power wee need. We know that MCU are performing two main tasks: data manipulation and mathematical operations. But fact is that it has to be done really fast. General purpose microcontrollers aren’t optimised to perform these tasks effectively as microcontroller has to as much universal as possible to fit in many areas. In other words flexibility reduces performance.
DSP processors are more specialized microprocessors that ara optimised for tas that they usually do – multiplication and addition. Lets take most common DSP routine FIR digital filter implementation. It takes several samples of signal x[] and produces ou Read more:Circular
Automated electronic CAD systems overview 2007-06-11 07:10:27 More and more design operations become automated. These changes give many benefits like effectiveness, minimal errors and less routine operations to designers. Modern electronic equipment require very precise planning as devices shrink to minimal sizes, operation power increases and also have to fit to it external design requirement. So designing is a very complex task where without smart CAD software would be almost impossible to do.
When designing a new electronic device you have to deal with several areas that is necessary to make device reliable and attractive device. All of these areas usually are done on particular CAD system. Most common CAD based electronic specific task are:
Mixed Analog-digital device modeling;
Programmable Logic modelling and synthesis;
HF circuits and electromagnetic modeling;
Functional modeling;
PCB Design;
Thermal modeling;
Chip topology modeling.
Each of these modeling and designing processes require different skills and knowledge.
Le Read more:Automated
Chemical effects of electricity 2007-06-29 05:59:12 Electronics depend on chemistry more than you can imagine. In order to generate electricity
there are many methods used, one of them is chemical. Remember batteries, where electricity is generated because of chemical reactions inside cell. Also in conductors like liquids and gases electricity is carried not by electrons as it is in solid constructions(copper, aluminum, etc.), but by ions – molecules with electric charges. Even non distiled water contain enough ions to be conductive. Lets go through several chemical effects of electricity.
Electrolysis
Electrolysis is a decomposition of liquid compound by passing electric current through liquid called electrolyte(salt water, copper sulphate, sulphuric acid). Electrolysis is used very widely in industry like electroplating of metals, refining of copper and extraction of aluminum from ore. To make electrolysis happen there are two conductors used cathode(-) and anode(-).
Electrolysis is one of simplest ways to produce hydroge
What is worst-case timing analysis 2007-07-09 04:44:26 Probably many of you PC hardware people have faced similar problems when assembling computer from different parts and it seemed to work properly. But under some circumstances system just crashes without any known reason. Even in my practice I had a sound-card that that works well, but time at the time it just crashes and then computer hangs. Of course I can blame drivers or operating system, but there is another probability that there can some timing failures occur.
There are lots of complex production around us that may have a number of undefined failures due to lack of timing worst-case analysis. Failures may occur due to power supply fluctuations, thermal changes or other conditions.
Worst-case analysis encounter all available information of condition variations that can affect performance of components. Worst-case analysis shows if electronic design meets specifications under variable conditions like temperature, voltage or other variables. Only detailed analysis can prove if desig
Electronic design and development process 2007-07-09 04:36:20 There are so many ways of design
ing and developing of electronic devices, that it is hard to think which would fit your needs and desires. But there are common steps that probably fit in most cases that allow to implement the electronic system from top to bottom:
1) Defining the requirements of electronic system;
2) Collecting information on components to be used;
3) Evaluate the components with respect to the requirements;
4) Block diagram of preliminary design;
5) Do a preliminary timing and load analysis;
6) Define functionality logic;
7) Draw schematic using CAD software;
8) Do device design and simulation;
9) Perform detailed timing analysis and simulation and adjusting the design;
10) Double-check signal loadings, buffering as needed;
11) Document the design and generate a net list and bill of materials;
12) Generate layout of a printed circuit board;
13) Prototype design;
14) Program the memories and programmable logic for testing.
15) Debug and verify operations using oscillosc Read more:Electronic
Non-linear adaptive filtering using neural networks 2007-07-14 14:40:06 Neural network signal filters are more adaptive filters than Wiener filters where resulting signal is a product of minimisation mean-square error, Wiener filter is linear filter which is adapted for some specific environment. But linear adaptive filters are limited when noise has Gaussian process pattern. So if significant Gaussian noise is present then there is need to use non-linear filters, which can deal with such noise. Also non-linear filters do not need mathematical analysis in order to calculate reference frame signal, what is not always ease to do. Non-linear adaptive filters may deal with this in two ways: improving learning efficiency and a broadening of application areas.
A neural network is a massively parallel distributed processor that has a natural propensity for storing experiential knowledge and making it available for use. It resembles the brain in two respects:
Knowledge is acquired by the network through a learning process.
Interconnection strengths known as
Adaptive ECG artefact noise cancelling using accelerometer 2007-07-13 16:34:51 Electro-cardiographic examination may be performed not only from patients who is laying or sitting down peacefully, but also under stress conditions as some deceases may be detected when patient isn’t in the rest. For this ECG should be measured when patient is actively moving. We know that ECH signal is very weak among various artefacts. Motion artefacts are ones who is hard to filter out using regular methods. Various researches show that motion artefacts may be extracted by using accelerometers. Accelerometer reads motion pattern which is simultaneously analysed and filtered out from ECG using adaptive filtering algorithms including Least Mean Squares (LMS), Recursive Least Squares (RLS)
As we mentioned - motion artefacts disturb the ECG signal so that it is almost impossible to recognize ECG pattern. And it is really hard to eliminate it and extract valuable information because artefact spectrum overlaps with ECG spectrum. And worse – noise spectrum changes all the time a Read more:Adaptive
Controlling graphical 128×64 LCD based on KS0108 2007-07-20 10:50:14 HQM1286404 is pretty old graphical LCD module but it is still popular. This LCD is controlled by KS0108 lcd controller via two segment drivers. LCD backlight color is yellow-green. I think this is good choice for many projects where graphical information needed because of several reasons – you can find libraries around the internet to start working in just a few minutes, also there are several tools that can be used to generate character arrays and graphics.
Hardest thing for me was to find correct wiring as datasheet I have was for next PCB revision (HQM1286405) as mine are HQM1286404 so done be mistaken as I did. Here is the correct pin-out of LCD:
1 Vcc
2 GND
3 Vee
4-11 DB0-DB7
12 CS2
13 CS1
14 RESET
15 R/W
16 D/I
17 EN
18 Read more:Controlling
What are MEMS 2007-07-31 05:49:39 Today MEMS is common acronym among engineers. Therm MEMS stands for micro-electro-mechanical system and was started to use in 1980sin USA. MEMS are called system because they are not only sensors bu also contain electronic circuitry inside which conditions sensor signal. Simply speaking MEMS is usually a chip device which integrates mechanical elements, sensors, actuators and electronics. Most interesting and important partis mechanical. Miniaturisation of mechanical part using micro-machining technologu when selectively parts are etched away, it became possible to create mechanical structures on silicon base together with electronic devices.
MEMS devices are used everywhere today including automotive, industrial even computer hard drives have MEMS sensors for shock protection. Ability to integrate mechanical sensors inside chip made possible to design compact accelerometers, gyroscopes, pressure sensors, sensors with integrated RF, and meny more. Also technology enables to in
Updated USBspi bridge adapter 2007-08-02 16:15:59 USBspi is a general purpose SPI bridge
for USB designed by ChaN. Adapted have been updated from older one by replacing older MCU to Attiny2313 and instead COM port there is USB adapter attached which works through FT232RQ USB to RS232 bridge. So writing time is faster now.
Also adapter board is placed in small box because of Attiny2313 MLF package is used. Earlier version looks like this.
Circuit diagram
In this version the power supply can be selected “From target” or “To the target” from USB port.
The serial to SPI bridge has two different operating modes, Cooked Mode and Through Mode. The operation mode can be changed by ER (DTR) signal at any time.
In Through Mode (ER on) - When ER goes on, serial to SPI bridge enters the Through Mode. In this mode, the data signals are passed through the bridge. This enables to communicate between PC and target with any generic terminal program in software implemented UART. It will be useful for debugging and mainte
Simulate KS0108 graphical LCD with Proteus simulator 2007-08-02 05:47:05 Today it is very popular to use various circuit and microcontroller simulators when developing programs. Using simulators you have several benefits comparing to real prototype boards like you don’t have to connect any hardware to test a piece of code, you don’t have to be in same place when working – you can have simulator software in Laptop and work where ever you want and of course you can see more parameters within simulator like register values, memory, signals in convenient form.
So controlling graphical LCD on simulator software like Proteus is easy task.
Working with simulator is easier because you don’t have to wary much about additional pins, like MCU power pins, crystals or other protection circuits. You just need to connect control lines and LCD power pins. Thats it. Define microcontroller Clock frequency in Atmega8 symbol and load program file(.hex) by browsing to it in same component meny. And then you can run program. Proteus simulator have KS0
Reliable soldering with fluxes 2007-08-01 08:10:14 Reliable soldering can be achieved by soldering clean surfaces. Usually surfaces are cleaned with abrasives and solvents, but after surface is cleaned surface immediately oxides especially when heated. During oxidation surface is covered by thin oxide film which prevents solder from contacting to metal. This is why flux is used in soldering process. In order to remove/deoxidize surface flux must be applied during soldering. Flux chemically removes surface oxide when heated and makes good metal to solder contact.
(Image source: http://www.tpub.com/neets/book4/12o.htm)
There are several categories of soldering fluxes:
Acid Flux (or commonly known fluxes: Zinc chloride, hydrochloric, ammoniac);
Organic Flux;
Rosin Flux.
Each flux has their own specifics and may be used for different soldering technologies.
Acid Flux
Acid Flux is most active of the group. It is effective on almos all metals excluding aluminum and magnesium. But Acid(chloride) flux has several significant d Read more:Reliable
AVR based TDA7313 Audio processor control 2007-08-08 16:10:10 Introduction
TDA7313 audio processor
have been used for more than ten years in the industry because of its simplicity, functionality and good parameters like low distortion, low noise. Chip is based on BIPOLAR/CMOS technology and can be used in various applications including car radios, Hi-FI, simple mixers.
TDA7313 chip has 3 external stereo inputs, that allows to multiplex three incoming sound sources, volume control with steps of 0.25dB, Treble and BASS control, Laudness function, Each of four outputs have distinct control that allows to balance outputs. Chip can be controlled via I2C (TWI) interface.
Description
The idea of this project was to construct independent audio processor which can be embedded in any audio system with ability to control settings with simple button interface with menu preview in LCD.
The intent was to cover all audio-processor functionality within LCD menu.
Circuit and PCB
Circuit diagram is pretty the same as in datasheet plus Atmega8 control circu Read more:Audio
Oscilloscope probes for accurate signal measurements 2007-08-15 14:07:02 Oscilloscope Probes
Measuring signal
s with oscilloscopes may be challenging task especially high frequency ones. Without proper oscilloscope probes correct measurement of high speed time domain signals wouldn’t be possible. For high speed measurement you should consider signal parameters like amplitude, source impedance, rise time and bandwidth.
There is a wide variety of probes available – passive, active, current-measurement, optical, high voltage and differential. But let’s narrow discussion to probes that are used to measure signals with wide bandwidth and short rise times. There are also many variations on what probe is proper. As probes are potential load to measured circuit, it is important to know its sensitivity to resistive, capacitive or inductive loading. Incorrectly chosen probe (like high capacitance) can distort fast rising signal. Some circuits may not tolerate probes at all (high speed amplifiers).
(more…)
DIY USB to RS232 adapter 2007-08-27 03:53:32 Sometimes you just need to connect some device to COM port, but computer don’t have one especially laptop. There are two ways – go and buy USB – COM adapter or build one. So if you decided to build USB to COM(RS232) adapter, there is one of solutions.
This adapter is very easy to build as there is single chip USB to UART bridge (CP2102) used. This chip from Silicon Labs support USB2.0 full speed, has internal Resistors required for USB interface, integrated clock, internal 1024 -byte EEPROM for vendor ID, Product ID serial number, power descriptor and other information. SP2102 USART part support almost all standard features of RS232 communication including handshaking, Databits (5, 6, 7 and 8); 1 or 2 stop bits; odd, even, mark, space and no parities; baud rate from 300bps to 1Mbits.
(more…)
How to describe embedded software design using diagrams and pseudo-code 2007-09-25 17:31:49 When design
ing embedded
hardware you probably want to visually express what embedded software will be performing and how different functions depend on each other. How to make software documentation simple clear and informative. If you are developer, you may want to explain your ideas understandably without loads of code text. So depending on what level information has to be provided you may choose any of following.
Data Flow Diagram
Data flow diagrams are used when you need to see the processes and what data is transferred between different functions. This way each process or function is expressed as block (or any other shape) while lines shows what information passes between processes.
As you can see in example figure simple data flow diagram is presented. Without program code it is easy to read how program operates:
(more…)