problem with QD2

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

problem with QD2

1,008 Views
vinayprasad
Contributor I
Hi,

I am using QD2 for a battery management & High Power LED Driving application. Below are the details & problems along with the attached schematic.

battery - 6V sealed lead acid,
voltage regulator used - 3.3 V

battery disconnect - 5.7 V
Battery reconnect - 6.0V

battery over voltage protection - 7.2V

please find the attached schematic. the microcontroller is behaving eratically during the discharge condition. The port pin PTA0 is going high if i switch on the supply for the micon during the hysterisis. can some body please help me resolve this issue. Also let me know if any hardware changes have to be done.i also have problems using BKGD & RESET pin.
Labels (1)
0 Kudos
Reply
1 Reply

363 Views
bigmac
Specialist III
Hello, and welcome to the forum.

Are you suggesting that Vbat is present whilst Vmicon is not present?  If so, you are likely to have in the region of 3 volts continuously applied to the PTA3 pin.  If Vmicon is not present, it is possible for an internal (intrinsic) diode to the Vdd rail to conduct, so that the Vdd voltage never reaches a sufficiently low voltage for POR to correctly occur. 

Also keep in mind that the reference voltage for the ADC is supplied from Vdd.  This would mean that, if an ADC conversion should succeed under these conditions, the 8-bit result would remain at 255, resulting in PTA0 high.

You will likely need additional circuitry to ensure that the voltage applied to PTA3 is clamped to zero in the absence of Vmicon.

I also notice that the circuitry surrounding RED_LED seems a little peculiar - a LED current in the region of 0.1 mA, with a transistor base drive current of about 3 mA.  If the LED needs to conduct when PTA4 is low, you might consider using a PNP transistor.  For load currents of a few milliamps, the series resistor to the base should usually be somewhat higher than 1k.

Not sure whether you require the additional pullup resistors, where external circuitry is driven by an output pin of the MCU.

Within your code, consider using if-else constructs.

#define PWM  PTAD_PTAD0

if (bat_vol < 200)
   PWM = 0;
else
   PWM = 1;


This should be more efficient than using two separate if statements.

Regards,
Mac



0 Kudos
Reply