Showing posts with label voltage. Show all posts
Showing posts with label voltage. Show all posts

Tuesday, May 26, 2015

BROKEN YOUR AVR CHIP?

While working the avr for the first time it is always confusing while programing the fuse bits as wrong configuration of this can damage the chip or may be lock the chip so you cannot program it normally.

If your making a bare bone arduino or burning arduino boot loader the fuse bits if programmed wrong can lock the device. This often happens due to some of the following fuse bits.
A. First thing you are being greedy of that single reset pin to use it as gpio. But you will be programming it only once as after that fuse setting to use reset as gpio avr can't be programmed using ISP as ISP programming requires external reset operations . so you need to do the high voltage programming either serial or parallel.
For the he high voltage programming you can consult the avr data sheet where it is described crystal clear and also there are many tutorials available online for this problem.




Also choosing external clock source can also result avr to not work using ISP in this case high voltage programming can be used or a external TTL clock should be used for the programming.

Heres the line copied from datasheet of high voltage programming. 

The following algorithm puts the device in Parallel (High-voltage) Programming mode:

1. Set Prog_enable pins listed in Table 28-12 on page 290 to “0000”, RESET pin to 0V and
VCC to 0V.

2. Apply 4.5V - 5.5V between VCC and GND.
Ensure that VCC reaches at least 1.8V within the next 20μs.

3. Wait 20μs - 60μs, and apply 11.5V - 12.5V to RESET.

4. Keep the Prog_enable pins unchanged for at least 10μs after the High-voltage has been
applied to ensure the Prog_enable Signature has been latched.

5. Wait at least 300μs before giving any parallel programming commands.

6. Exit Programming mode by power the device down or by bringing RESET pin to 0V.

If the rise time of the VCC is unable to fulfill the requirements listed above, the following alternative
algorithm can be used.

1. Set Prog_enable pins listed in Table 28-12 on page 290 to “0000”, RESET pin to 0V and
VCC to 0V.

2. Apply 4.5V - 5.5V between VCC and GND.

3. Monitor VCC, and as soon as VCC reaches 0.9V - 1.1V, apply 11.5V - 12.5V to RESET.

4. Keep the Prog_enable pins unchanged for at least 10μs after the High-voltage has been
applied to ensure the Prog_enable Signature has been latched.

5. Wait until VCC actually reaches 4.5V - 5.5V before giving any parallel programming
commands.

6. Exit Programming mode by power the device down or by bringing RESET pin to 0V.



Wednesday, September 24, 2014

A SIMPLE DUAL POWER SUPPLY CIRCUIT #22

Dual power supplies are required mainly in signal purposes mainly in opamps and in amplifiers.
Amplifiers need high current supply and high voltages for delivering very high watt power to the speaker.
A very simple dual power supply can be make just using capacitor and resistor divider.


Here connecting B+ voltage will give output of +B/2 and - B/2 with respect to PGND on the terminal.
This circuit is used in SINGLE POWER SUPPLY CLASS D AMPLIFER of International Rectifiers' IR4301 and works real good.Here's the link of the IR's amplfier's circuit.
http://www.irf.com/technical-info/refdesigns/iraudamp17.pdf
Besides classical transformer based dual power supply will always works nice and fine.


Thursday, September 11, 2014

SELECTING YOUR VOLTAGE REFERENCE FOR ARDUINO #17

Arduino’s getting very much popular for DIYers due to its extremely easy interfacing and coding environment.


World’s is analog. That’s why analog to digital conversion is most for the Microcontrollers to get interfaced with outer world. Most of the raw sensor will give analog voltage or current as output.Like LM35 temp sensor. While other digital sensor’s got there own processors inside to give output in some standard format like SPI, IIC, Serial , or like 232 level or 485 or SDI level  of signals.
Using ADC’s need analog reference for operation . This is the voltage to which the Adc compare in analog input voltage and gives equivalent output digital value.
ADC’s measured with bit like 8 bits, 10 bits , 22 bits and something like that.
For a Adc with 5 v as reference with 10 bits output. What it does is it divides  5v by 2^10.
Which means ADC and detect the change in input voltage or signal by 5/2^10. This means about 5 mV.
But in actual its Vref / (2^(n ) -1).
Now,Vref, in many micontroller are generated internally by internal band gap reference , while it can be switched to external pin or to VDD.
Now what we’ve got is Vref should be chosen according to sensor’s output resolution. The less the Vref the more the sensitive is out ADC but also the input to ADC can never be higher than Vref. So with larger Vref resolution get decreased so higher ADC should be used.
In arduino Aref is by default the supply voltage.
It can be changed to INTERNAL reference. Internal reference on ATMEGA 328 and 168 is 1.1 v while in ATMEGA 8 is 2.56 volts. These got 10 bit of SAR ADCs with 6 channels.
Then it can be switched to external pin Aref.
This can be changed with line
analogReference(type);
where type is DEFAULT(5V OR 3.3V),INTERNAL(1,1V ON 168 AND 328 OR 2.56V ON MEGA8), INTERNAL1V1(1.1V ON MEGA328),INTERNAL2V56(2.56 ON MEGA328),EXTERNAL(AREF PIN).
Arduino Due got 32 bit ARM processor and got some more channel’s on ADC. Its running on 3.3 .
In Due analogReadResolution(1 to 32); can change the output resolution it got 12 bit of ADC with output ranging form 0 to 4095. Using parameter >12 make the 0 padding in extra bits.
Here’s the DUE’s analog read resolution page by arduino.

Here’s a quick comparision on ADC and other parameter on arduino boards http://www.djerickson.com/arduino/