Author Topic: Erratic PIC behaviour when sharp IR attached  (Read 1699 times)

0 Members and 1 Guest are viewing this topic.

Offline hazzer123Topic starter

  • Supreme Robot
  • *****
  • Posts: 460
  • Helpful? 3
Erratic PIC behaviour when sharp IR attached
« 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
Imperial College Robotics Society
www.icrobotics.co.uk

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,657
  • Helpful? 169
    • Society of Robots
Re: Erratic PIC behaviour when sharp IR attached
« Reply #1 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.

Offline hazzer123Topic starter

  • Supreme Robot
  • *****
  • Posts: 460
  • Helpful? 3
Re: Erratic PIC behaviour when sharp IR attached
« Reply #2 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
Imperial College Robotics Society
www.icrobotics.co.uk

Offline paulstreats

  • Supreme Robot
  • *****
  • Posts: 1,381
  • Helpful? 21
Re: Erratic PIC behaviour when sharp IR attached
« Reply #3 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

Offline hazzer123Topic starter

  • Supreme Robot
  • *****
  • Posts: 460
  • Helpful? 3
Re: Erratic PIC behaviour when sharp IR attached
« Reply #4 on: January 26, 2008, 05:15:49 PM »
Yeah it is disabled... man this is really annoying  >:(

Thanks  ;D
Imperial College Robotics Society
www.icrobotics.co.uk

Offline hazzer123Topic starter

  • Supreme Robot
  • *****
  • Posts: 460
  • Helpful? 3
Re: Erratic PIC behaviour when sharp IR attached
« Reply #5 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.
Imperial College Robotics Society
www.icrobotics.co.uk

 


Get Your Ad Here

data_list