Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: hazzer123 on January 26, 2008, 03:48:03 PM

Title: Erratic PIC behaviour when sharp IR attached
Post by: hazzer123 on January 26, 2008, 03:48:03 PM
Hey guys,

I have an ICD 2 with a PIC18f4525 and i am trying to interface it with a Sharp IR.

The setup works fine with no sharp attached. It programs and runs code great.

But when i attach the Sharp IR the PIC stops working. Even when I just connect the power to the sharp IR it stops working. So this means its a power problem. But when i check the voltage its correct (5.2V). The ICD2 self tests all pass. I have the board powered by an external supply easily capable of the current.

Im really stuck with this one.

Any help?

Thanks
Title: Re: Erratic PIC behaviour when sharp IR attached
Post by: Admin on January 26, 2008, 04:43:21 PM
Quote
when i check the voltage its correct (5.2V)
With or without the SharpIR plugged in? Does the voltage change when you plug it in?

Take your sensor and attach power and ground to it directly, and measure the analog voltage coming out with a multimeter. This will verify that the sensor isn't broken.
Title: Re: Erratic PIC behaviour when sharp IR attached
Post by: hazzer123 on January 26, 2008, 05:07:32 PM
5.2V regardless of whether the IR is plugged in or not.
The voltage doesn't change when the sharp IR is connected.

The voltage from the output does change when my hand i waved in front (verified using a multimeter).

The schematic is attached.

I am plugging the sensors into the SIR ports on the left.

Thanks
Title: Re: Erratic PIC behaviour when sharp IR attached
Post by: paulstreats on January 26, 2008, 05:13:53 PM
Are you using LVP fuse enabled?

If so try to disable it, I always get erratic behaviour if the low voltage programming fuse is enabled
Title: Re: Erratic PIC behaviour when sharp IR attached
Post by: hazzer123 on January 26, 2008, 05:15:49 PM
Yeah it is disabled... man this is really annoying  >:(

Thanks  ;D
Title: Re: Erratic PIC behaviour when sharp IR attached
Post by: hazzer123 on January 26, 2008, 05:44:55 PM
I solved it. I put a 10V 1000uF capacitor across the power and ground lines...

So simple....

Haha

Thankyou all.