Previous in Forum: Solar panel   Next in Forum: Tracking stolen mobile phones
Close
Close
Close
12 comments
Rate Comments: Nested
Participant

Join Date: May 2008
Location: lahore , pakistan
Posts: 4

Controling an Igniter with PIC16F877A

01/09/2009 2:55 AM

i am controlling LCD, KEYPAD,and AN IGNITER with the above mention pic, i am trying to do is that, whenever i press A key, i want the the igniter to ignite for 1 second, but whenever i tried to do that my controller restarts. i am using a seperate power source for igniter and a seperate power source for controller. igniter is being controlled with the help of a 5volt relay.

Does anyone know the solution???

Register to Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.

Good Answers:

These comments received enough positive votes to make them "good answers".
2
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#1

Re: controling igniter with PIC16F877A

01/09/2009 3:05 AM

Does it restart if you run with the relay coil disconnected?

Does it restart if you run with the relay coil connected, but the igniter power supply off?

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply Good Answer (Score 2)
Guru
Popular Science - Weaponology - New Member United Kingdom - Member - New Member

Join Date: May 2007
Location: Harlow England
Posts: 16512
Good Answers: 670
#2
In reply to #1

Re: controling igniter with PIC16F877A

01/09/2009 3:46 AM

Hi! Happy new year and all that tosh.
You beat me to it..
Other possibility is maybe a watchdog timeout (WDT) if you are sitting in a loop for 1 second and not refreshing the wdt. Certainly the case in a Z86733 etc.
Dunno if the PICs have a WDT?

Your answer is much better tho'...
Damn I'll have to give you a GA from my secret stash.
Del

__________________
health warning: These posts may contain traces of nut.
Register to Reply
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#3
In reply to #2

Re: controling igniter with PIC16F877A

01/09/2009 4:32 AM

Hi, back at ya!

A PIC does have a WDT - can't remember whether it runs by default, or if you have to turn it on - haven't used a PIC for years.

Good point! TAYYEB NAUMAN, hope you're listening!

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply
Guru
Engineering Fields - Electrical Engineering - New Member

Join Date: Oct 2007
Location: Sour Lake, TX 30°08'59.68"N 94°19'42.81"W
Posts: 675
Good Answers: 13
#4
In reply to #2

Re: controlling igniter with PIC16F877A

01/09/2009 6:07 PM

Is it any reason that a PIC has not a WCT? *

*Dictionary: WCT is short for an inexistent feature in supervising the activity of a µController. See Watch Cat.

__________________
Bridge rule #1: Nobody is as good as he thinks about himself nor as dumb, as his partner thinks...
Register to Reply
Participant

Join Date: May 2008
Location: lahore , pakistan
Posts: 4
#6
In reply to #1

Re: controling igniter with PIC16F877A

01/10/2009 12:37 AM

RELAY coil is connected with controller, its one side is being given 5 volts directly, while the other side is being controlled with the help of ULN. and the power source for igniter is just 1.5 volt cell. And answer for both of your question is, it doesn't restart. actualy if relay is disconnected, no connection established for igniter. this all means that, both the controller and igniter cant work together.....

is there any other way of controlling igniter with PIC16F877A??

Register to Reply
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#9
In reply to #6

Re: controling igniter with PIC16F877A

01/10/2009 6:26 AM

Maybe I was a bit unclear when I said "Does it restart ...".

By "it", I meant "the PIC μcontroller".

Obviously if any of the relay terminals is disconnected, the igniter will not restart, but if the PIC restarts with no connection to the relay, the fault must be in the PIC software.

I assume that the "ULN" refers to a ULN200x darlington driver IC (?).

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply
Member

Join Date: Dec 2008
Posts: 8
#5

Re: Controling an Igniter with PIC16F877A

01/09/2009 11:23 PM

First you have to determine wheither your problem is in software or hardware. Are you driving the 5v relay direct, if so the relay coil may pull more current than the PIC can supply. PIC output current is normally 20mA. A schematic and program would help solve the problem

Register to Reply
Participant

Join Date: May 2008
Location: lahore , pakistan
Posts: 4
#7
In reply to #5

Re: Controling an Igniter with PIC16F877A

01/10/2009 12:46 AM

i know the problem is hundred percent in hardware, and also i am controlling igniter relay with the help of ULN, which can supply 600mA current, and relay i am using is of 300mA.

few people ask about watch dog timer, yes there is a WDT is this PIC, but what is this WDT i dont know, anywayz i am trying to learn it. But still i think the problem is in hardware. Because igniter actually works when gound and power are short circuited, although relay separates the power source of controller and Igniter, but still controller is taking affect of that short circuit, and gets restarts. i don't know how can WDT can be effective in that case?


any one has a solution???

Register to Reply
Guru
Popular Science - Weaponology - New Member United Kingdom - Member - New Member

Join Date: May 2007
Location: Harlow England
Posts: 16512
Good Answers: 670
#8
In reply to #7

Re: Controling an Igniter with PIC16F877A

01/10/2009 3:52 AM

Yes we have a solution, but only when we know the problem, solving problems is easy...the hard bit is identifying the problem.

We need a clear, concise description of what's going on.
What is a ULN ?(don't use acronyms without writing them in full first..unless you are certain everyone knows them)

As I understand it... the PIC drives a relay, the relay drives the igniter?
It works ok if the igniter is dissconected?

Are these two statements true? ( If they are not then please describe the real situation in similar simple terms)

If the statements are true and the igniter is correctly wired to the relay then the answer must be interference from the igniter, this could be conducted through the power supply or radiated through the air. So we need to know exactly how the igniter is wired, are the supplies connected at all (even through a common 0v line)?
If the supplies aren't connected at all, then you are looking at putting some supression on the igniter, or interferrence filtering on the PIC (or both).

(The Z86 is very twitchy and it reset if there are negative going spikes on the 5v supply)

The WDT is a feature designed to help a microcontroller (uC) recover from sofware/hardware crashes where it may get stuck in a loop.
The WDT is a free running counter, when the counter overflows the uC resets, on some chips the feature can be dissabled. The WDT needs to be reset by your software to prevent it overflowing and resetting the uC.
Most programs have some sort of loop structure, say a timer interrupt or a simple loop structure, so (for example) in my z86 software at some point in the loop I have the assembler statement " wdt " that does the job of resetting the WDT counter. Similarly in my routine called 'getkey' which sits in a loop waiting for a button press there is a 'wdt' statement in the loop to prevent the WDT timing out.
So if your program sits in a loop for 1 second holding the relay ON maybe it needs a wdt statement (or the PIC equivalent.)

I hope this helps (if so, please send Tuna)

Del

__________________
health warning: These posts may contain traces of nut.
Register to Reply
Power-User

Join Date: Apr 2008
Location: UK
Posts: 246
Good Answers: 6
#10

Re: Controling an Igniter with PIC16F877A

01/10/2009 7:14 AM

PICs will reset if the load causes a voltage drop. This could be whats happenning here. Power supply not able to keep its voltage under load, batteries dying etc.

__________________
Peter Jensen
Register to Reply
Member

Join Date: Dec 2008
Posts: 8
#11

Re: Controling an Igniter with PIC16F877A

01/10/2009 10:37 AM

If you have an oscilloscope, Monitor voltage at Reset pin on PIC. If it goes low when you apply voltage to the High Side Driver, you have a starting point.

Monitor voltage at VCC of PIC and apply voltage to the High Side Driver, if it goes low the you have a starting point.

Also, your High Side Driver "ULN" can be PNP or NPN which one are you using? Does it have FLY BACK Diodes built in or you wiring one across the relay coil?

Register to Reply
Guru
Hobbies - HAM Radio - New Member

Join Date: Oct 2006
Location: Vancouver (not BC) Washington (not DC) US of A
Posts: 1261
Good Answers: 12
#12

Re: Controling an Igniter with PIC16F877A

01/12/2009 3:31 AM

If nothing else works, you might try www.microchip.com . They are pretty good at this sort of thing (for some reason or another).

Bill

Register to Reply
Register to Reply 12 comments

Good Answers:

These comments received enough positive votes to make them "good answers".
Copy to Clipboard

Users who posted comments:

HVACR Drill (2); indel (1); JohnDG (3); Pj3ns3n (1); Sciesis2 (1); TAYYEB NAUMAN (2); user-deleted-1105 (2)

Previous in Forum: Solar panel   Next in Forum: Tracking stolen mobile phones

Advertisement