Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Sleepless days (and nights) on h-bridge

Status
Not open for further replies.

darkfeffy

New Member
Hello guys,
I have been having a few sleepless nights on this H-bridge inverter. I am using multi-level sine wave pwm. The program written on pic18f252 works just fine while not mounted.
When fitted into the circuit, I get no outputs at the same pins (CCP1 and CCP2). Thus, no outputs as well at the IR21844 drivers. These drivers have been giving me a hell of a time. Think the trouble might be with them. May be they sink a current the pic cannot possibly supply or something.
Please verify my schematic to confirm all is well or point out any possible errors. Should I insert a resistance between the Pic output pin and the corresponding driver pin?
I appreciate your help

-20MHz quartz
-Power and earth pins hidden but connected as required
ed
 

Attachments

  • H-bridge schematic.pdf
    29.9 KB · Views: 236
Are you sure the pic is running at all? It should be able to supply enough current to those drivers no problem. Driver DS says 5uA typical to drive them. They are most likely small MOSFETS, so shouldn't take much.

Are you programming the PIC with the debugger? That used to catch me every time.
 
Are you sure the pic is running at all? It should be able to supply enough current to those drivers no problem. Driver DS says 5uA typical to drive them. They are most likely small MOSFETS, so shouldn't take much.

Are you programming the PIC with the debugger? That used to catch me every time.

Hi Smanches,
I dunno if the pic is "running" at all, but it was running before I soldered it to the target circuit. What I often do is I program the pic externally on breadboard, check if it works then put it in target cct. Not sure about how to do in-circuit debugging. However, on breadbord the PicKit 2 declares an error when the MCLR! (Vpp) pin is connected to the Vdd pin. In the working circuit MCLR! should be high to prevent reset - right?
Have u had a look at the attached PDF of the original post?
Thanks
 
That's because you need to use a pullup resistor on it, not tie it straight to +V. The Pickit needs to be able to take the pin low to query/reset it.

If you program it in MPLAB using the debugger, it adds the debug executive to the chip as well, and will only run when the debugger (Pickit2) is attached. You have to make sure you use the Programmer program command in MPLAB, then it will free run. This confused me for quite some time.
 
Hi Smanches,
No I did not use MPLAB to program the chip. I generated the hex file using the Export function in MPLAB. Then I used import from the PICKIT 2 software. Works when powering from pickit2. But does not work when powering from an external source. At times even part of the program memory went off (verified this by 'Read' function on Pickit 2). Thought it was an issue with the pic (I have already changed pics 2 times). Yesterday however, I found a way of making the microcontroller work without the Pickit2. This, by attaching a 100kOhm resistor between the MCLR! and the VDD pin and not tying the VDD pin directly to MCLR! as before. Seems to work now. I will go ahead and solder it on the target cct with this additional resistor. Hope to God it works...
I feel I am in the wrong forum here. Seems I should have gone to the microcontroller forum but heck...the concepts are related. We are talking about "power processing" here right? Thx
Ed
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top