PIC Micro: Problem on stability

Status
Not open for further replies.

biboymusic

Junior Member level 1
Joined
Jan 7, 2011
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,430
I have a working digital Speedo, Gear indicator, and fuel gauge on my motorcycle. Everythings perfectly working except for the Speedo which is running on a PIC16F84.

My speedo halts (freezes) if i'll use my horn. Dual horn, a bit of a electric current sucker. I tried every 7805 stabilizer, capacitor combinations, diodes etc but to no avail. It is even running from a 7808 (my fuel gauge) line, stabilized, and fed to my 7805 for the PIC.

1st thought, it sucks so much electricity that it halts the PIC. No! If I use my ignition starter motor, 100x more hungry than the horn, it doesn't happen. Used a multimeter while Im running, then blew the horn, my voltage doesn't go down below 10v. Using the starter motor gives me almost 5v but doesn't affect the PIC.

Any help please. I'd really appreciate. Im guessing that it is maybe the frequency of the horn noise, electrically, sound wise etc is the problem. The horn is relay driven, if it matters, but still no. My HID headlight is relay driven, super hungry and it doesn't affect the PIC also.
 

probably electrical noise - have you tried putting an oscilloscope on the power line and other pins?
have you enabled the watchdog timer so the system restarts if it crashes
 

Is the watch dog enabled ?
The Pic could be locking it's self up in a loop with noise where the watch dog will prevent that from happening. when you press the horn what is the voltage coming out of the 7805 does it remain at 5V'S ?
 

Watchdog isn't enabled. 7805 output remain at 5vs when I press the horn. Or the multimeter just can't read the jolt since it has some reading delays? The display doesn't show any blinking too, 3x7-segments.
 

you need an oscilloscope to look for noise on the lines - a multimeter would only show very slow (in computer terms) noise
if all else fails add a watchdog timer (always useful anyway in case your program logic fails and it becomes stuck)
 

Hi,

I think it is because of ground which is connected to the chasis. Most the automobile will have chasis as ground. You have to seperate this.

Thankyou

Hope this helps you.
 

I don't have an oscilloscope. Any ways to cut the noise? power filters maybe? or should I stabilize the horn power source?

---------- Post added at 02:55 ---------- Previous post was at 02:54 ----------

@prmurthy: I'm sourcing power from the battery.
 

The battery power in any case or with any other devices should reach chasis. Hope this is taken care.

Thankyou

---------- Post added at 20:14 ---------- Previous post was at 20:09 ----------

One suggestion that can be is please check your 5v regulator. If it can support input below 10V then you have to change. Use Fairchild 5v Regulator which support even when your input is about 5v.
Thankyou
 

I have checked and changed regulators of different brands, even got one from an old computer PSU which is an awesome Fairchild regulator but the problem is still there. WDT is the go. Can I put CLRWDT inside the interrupt routine?
 

Can you give me specs of your horn please.

Thankyou.

---------- Post added at 09:51 ---------- Previous post was at 09:49 ----------

or try to use relay kit for your horns and see the results.

Thankyou.
 

"Can I put CLRWDT inside the interrupt routine?"
I would avoid this as the none interrupt code could get locked and the interrupt code would keep clearing the watchdog.
also your interrupt routines should be short and not timeout a watchdog
 

My horn is using a relay. Its brand is Circuit more like of a Hella copy. It is also around 100dB loud. I'm not sure of its wattage, but I'm pretty sure, HID and starter motor have more wattage than the horn and they don't affect the PIC.

If CLRWDT is not good inside the interrupt routine then I guess i'll place it inside the Main Loop multiple times as long as it doesn't timeout WDT?
 

relay = spark = noise
(especially on an old motorbike!)
Your headlight may be a different type of load.
Or your relay may just be old with pitted contacts?

If you could change it for a solid state relay that may solve your problem.
I dont know if you could test this by selectively shielding things but it may be
worth a go. (Tin foil maybe)

Or maybe you could isolate the PIC

jack
 

Finally I give up. Sorry about this.

Thankyou
 

@123jack: Relay = spark = noise, yes. My HID is also relay driven, starter motor have a larger relay driving it. Testing the horn relay without the actual horn, I can hear the relay 'tick' but it doesn't halt the PIC. Though it can be due to the relay not having a load. WDT is the final go here. I'm really not sure how to use WDT.

---------- Post added at 01:08 ---------- Previous post was at 01:06 ----------

Shielding the PIC circuit is also worth a try. Maybe the vibrating part of the horn is in some Hertz that halts the PIC. I'll check if shielding should work.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…