Bizarre Occurrence - jon_mark_go - Apr 11 22:57:00 2008
So, I'm trying to have my robot navigate by using distance sensors. I
was using Sonar but they kept spiking so I decided to try Sharp IR
Rangers (GP2D12). Now, the bizarre part is that the sensor values
spike at the same point in the hallway every time, regardless of what
type of sensor I'm using... Does anyone know why this might be happening?
------------------------------------

(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )
Re: Bizarre Occurrence - jon_mark_go - Apr 11 22:59:27 2008
Another slightly less bizarre thing... If I plug in all 3 IR sensors,
the robot wont function. But could that just be a voltage drain thing?
------------------------------------

(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )
Re: Bizarre Occurrence - jon_mark_go - Apr 11 23:11:36 2008
It seems to be a code problem since a much less bulky test program
doesn't do it... Anyone know what sort of object/setting would cause
something like this to happen?
------------------------------------

(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )
Re: Re: Bizarre Occurrence - ooPIC Tech Support - Apr 12 0:01:26 2008
Google on those sensors and you'll find that you need to do some more
work to use them. Specifically you will need an electrolytic cap (about
100uf will do) on the power bus at the point where those connect to your
ooPIC to cover current needs. You will also need a .1uf right next to
that cap to cover noise from those sensors.
DLC
jon_mark_go wrote:
> Another slightly less bizarre thing... If I plug in all 3 IR sensors,
> the robot wont function. But could that just be a voltage drain thing?
> ------------------------------------

(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )
Re: Bizarre Occurrence - jon_mark_go - Apr 12 0:04:46 2008
Will I be able to do without the .1uF capacitor? I assume the values
will just fluctuate a bit more?
------------------------------------

(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )
Re: Bizarre Occurrence - jon_mark_go - Apr 12 0:07:52 2008
Does that 100uF capacitor go on the io signal line?
------------------------------------

(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )
Re: Re: Bizarre Occurrence - ooPIC Tech Support - Apr 12 0:09:23 2008
Hmm,
My Magic 8-Ball says... "Future hazy, ask again later"
Can you post some code?
DLC
jon_mark_go wrote:
> It seems to be a code problem since a much less bulky test program
> doesn't do it... Anyone know what sort of object/setting would cause
> something like this to happen?
> ------------------------------------

(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )
Re: Re: Bizarre Occurrence - ooPIC Tech Support - Apr 12 0:10:14 2008
It seems a poor idea to me. You can hash more than just the sensor with
that kind of noise.
DLC
jon_mark_go wrote:
> Will I be able to do without the .1uF capacitor? I assume the values
> will just fluctuate a bit more?
> ------------------------------------

(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )
Re: Re: Bizarre Occurrence - ooPIC Tech Support - Apr 12 0:10:50 2008
No, both caps go on the power bus +5 and ground - As near to the
connection to the board as you can get them.
DLC
jon_mark_go wrote:
> Does that 100uF capacitor go on the io signal line?
> ------------------------------------

(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )
Re: Bizarre Occurrence - jon_mark_go - Apr 12 0:12:29 2008
My test program:
Dim distRight As New oIRRange
Dim distLeft As New oIRRange
Dim distFront As New oIRRange
Dim mright As New oServoSP
Dim mleft As New oServoSP
Sub Main()
mright.IOLine=8
mright.Speed=0
mright.Operate=cvOn
mleft.Invert=cvTrue
mleft.IOLine=9
mleft.Speed=0
mleft.Operate=cvOn
distRight.IOLine=1
distRight.Operate=1
distLeft.IOLine=3
distLeft.Operate=1
distFront.IOLine=2
distFront.Operate=1
Do
mright.Speed=80
mleft.Speed=100
ooPIC.Delay=1000
If (distRight > 100)
ooPIC.Delay=300
mright.Speed=-80
mleft.Speed=100
ooPIC.Delay=700
ElseIf (distLeft > 100)
ooPIC.Delay=300
mleft.Speed=-100
mright.Speed=80
ooPIC.Delay=700
End If
Loop
End Sub
------------------------------------

(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )
Re: Re: Bizarre Occurrence - ooPIC Tech Support - Apr 12 0:27:16 2008
Is this the code that is causing the problem?
DLC
jon_mark_go wrote:
> My test program:
>
> Dim distRight As New oIRRange
> Dim distLeft As New oIRRange
> Dim distFront As New oIRRange
> Dim mright As New oServoSP
> Dim mleft As New oServoSP
>
> Sub Main()
> mright.IOLine=8
> mright.Speed=0
> mright.Operate=cvOn
> mleft.Invert=cvTrue
> mleft.IOLine=9
> mleft.Speed=0
> mleft.Operate=cvOn
> distRight.IOLine=1
> distRight.Operate=1
> distLeft.IOLine=3
> distLeft.Operate=1
> distFront.IOLine=2
> distFront.Operate=1
>
> Do
> mright.Speed=80
> mleft.Speed=100
> ooPIC.Delay=1000
> If (distRight > 100)
> ooPIC.Delay=300
> mright.Speed=-80
> mleft.Speed=100
> ooPIC.Delay=700
> ElseIf (distLeft > 100)
> ooPIC.Delay=300
> mleft.Speed=-100
> mright.Speed=80
> ooPIC.Delay=700
> End If
> Loop
> End Sub
> ------------------------------------

(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )
Re: Bizarre Occurrence - jon_mark_go - Apr 12 0:28:29 2008
No, the code that is causing the problem is MUCH larger. But this code
is still very jumpy.
------------------------------------

(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )
Re: Re: Bizarre Occurrence - ooPIC Tech Support - Apr 12 1:22:07 2008
Can you give me details of what you are seeing. If you have not put
those caps in, your data is highly suspect. Do that first and then see
what things look like.
DLC
jon_mark_go wrote:
> No, the code that is causing the problem is MUCH larger. But this code
> is still very jumpy.
> ------------------------------------

(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )