Author Topic: axon restarting  (Read 6901 times)

0 Members and 1 Guest are viewing this topic.

Offline ninjaTopic starter

  • Jr. Member
  • **
  • Posts: 8
  • Helpful? 0
axon restarting
« on: September 04, 2008, 07:33:41 PM »
so. I just got an axon  :D and started testing some stuff out ... and I ran into a problem.

When I hook the axon up to the battery, two sharp IR (GP2D12), and the UART hyperterminal would start to report some of the data and then freeze, after a few seconds. Then it would start again after a few seconds. Eventually it would freeze again and not report at all.

With one sharp IR connected this doesnt happen. :-\

what might cause this ? and how do i fix it? ???

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: axon restarting
« Reply #1 on: September 04, 2008, 07:37:22 PM »
When you hook it up to Hyperterminal, what does it say/do?

What code did you add to it?

Battery voltage low?

Did you change the baud rate?

Offline ninjaTopic starter

  • Jr. Member
  • **
  • Posts: 8
  • Helpful? 0
Re: axon restarting
« Reply #2 on: September 04, 2008, 07:49:56 PM »
UART and hyperterminal works fine with only just one sharp IR connected.

baud rate 115.2k

battery 4.9-5.0V


code used: (sharp IR connect to 0 and 15)

                unsigned int angle = 700;
                unsigned int reading = sharp_IR_interpret_GP2D12(a2dConvert8bit(0));
   int IRreading = sharp_IR_interpret_GP2D12(a2dConvert8bit(15));
   int IRreading4 = sharp_IR_interpret_GP2D12(a2dConvert8bit(4));
   while(1)
      {
      delay_ms(100);

      reading = sharp_IR_interpret_GP2D12(a2dConvert8bit(0));
      IRreading = sharp_IR_interpret_GP2D12(a2dConvert8bit(15));
      IRreading4 = sharp_IR_interpret_GP2D12(a2dConvert8bit(4));
      if( IRreading > 100 )
         rprintf("Data: %d \t angle: %d \t ir: %d \t ir: %d\r\n", reading , angle, 0 , IRreading4);
      else
         rprintf("Data: %d \t angle: %d \t ir: %d \t ir: %d\r\n",reading, angle, IRreading , IRreading4);
      }




the error looked like this on the hyperterminal:
Data: 15         angle: 700      ir: 14          ir: 0
Data: 15         angle: 700      ir: 14          ir: 0
Data: 16         angle: 700      ir: 14          ir: 0
Data: 14         angle: 700      ir: 13          ir: 0
Data: 115        angle: 700      ir: 13          ir: 1384
Data: 115        angle: 700      ir: 13          ir: 0
Data: 60         angle: 700      ir: 12          ir: 0
Data: 46         angle: 700      ir: 12          ir: 0
Data: 47         angle: 700      ir: 13          ir: 0
Data: 77         angle: 700      ir: 13          ir: 0
Data: 46         angle: 700      ir: 13          ir: 0

System Waòming Up.................Initialization Complete

System Warming Up.................Initialization Complete

System Warming Up.................Initialization Complete

System Warming Up.................Initialization Complete
Using Test Code

Sysôem Warming Up
*freezes*






Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: axon restarting
« Reply #3 on: September 04, 2008, 08:10:39 PM »
Quote
battery 4.9-5.0V
Is that the battery, or the voltage measured on the regulated ADC header?

The symptoms point to a battery that needs to be charged . . .

Offline brijesh

  • Full Member
  • ***
  • Posts: 55
  • Helpful? 0
Re: axon restarting
« Reply #4 on: September 05, 2008, 06:53:48 AM »
Where does the power for Sharp IR sensors come from? Have you connected the Sharp IR sensors directly to the battery or the output of 5V regulator on the Axon board?

I have had similar experience with another board. I had connected the Sharp IR sensors to the output of 5V regulator. The 2 Sharp IR sensors draw large amounts of current in short period of time. So much so that there was a large voltage drop(spike) on the 5V line which would cause the AVR to reset.
I solved this problem by using different power source for the IR sensors.


 

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: axon restarting
« Reply #5 on: September 05, 2008, 12:26:01 PM »
What brijesh said was my other theory, but I want to rule out the battery as a problem first.

What battery are you using?

You can also add some small 1 or 10uF caps across power and ground on the sharp IR.

Offline ninjaTopic starter

  • Jr. Member
  • **
  • Posts: 8
  • Helpful? 0
Re: axon restarting
« Reply #6 on: September 05, 2008, 01:37:16 PM »
Like what you said brijesh, I connected the sharp IR sensors to the output of the 5V regulator on the axon board. (oh yeah, I had 4 AA batteries connected, but the voltage read out on the programmer was 5.0V)

Well, I'm going to go recharge the batteries and see how it goes...

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: axon restarting
« Reply #7 on: September 05, 2008, 02:06:34 PM »
What type of battery? Alkaline, NiMH, NiCad? How many mAh and voltage?

Check the voltage across the battery, not on the circuit. ;D

Offline ninjaTopic starter

  • Jr. Member
  • **
  • Posts: 8
  • Helpful? 0
Re: axon restarting
« Reply #8 on: September 07, 2008, 01:26:01 PM »
so after changing the batteries with new ones(alkaline), the problem was still there.

so I added a cap across the power and ground, and that seemed to work

thanks admin and brijesh  :D

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: axon restarting
« Reply #9 on: September 07, 2008, 01:37:24 PM »
If you add more external components in the future, the problem will probably come up again because of the battery.

Alkaline batteries aren't that great, so I recommend moving to NiMH or NiCad in the longer term.

 


Get Your Ad Here

data_list