Pages: [1]   Go Down
Author Topic: DFRobot URM37 v3.2 stop working after 7-8 hours  (Read 1775 times)
0 Members and 1 Guest are viewing this topic.
Kuala Lumpur, Malaysia
Offline Offline
Full Member
***
Karma: 4
Posts: 205
Anything is possible
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have this strange issue with DFRobot's URM37 v3.2 sensors  ( http://www.dfrobot.com/wiki/index.php?title=URM37_V3.2_Ultrasonic_Sensor_(SKU:SEN0001) ) that randomly stop working/freeze after running for 7 to 8 hours ...

I was running two sensors and one of them jut stop working or at times, both of them stop working after running for a long period of time...

When the sensors freeze/stop working, it cannot be recovered even by reseting the sensors by powering it down...

The only way to recover it was by powering it off for a few hours and it will start to work again...

This seems like some sort of "charge" still in the sensors that need to be "discharged" to clear the freeze...

I've got this URM37 working with NewPing library by teckel ( http://arduino.cc/forum/index.php/topic,106043.240.html ) , Mode 1 ( Serial ) , Mode 2 ( Autonomous ) and Mode 3 ( Passive PWM ) ( http://www.dfrobot.com/wiki/index.php?title=URM37_V3.2_Ultrasonic_Sensor_(SKU:SEN0001) ) but the same symptoms of freeze/hang after a long period still shows up..

Any ideas/suggestions on how to resolve this strange issue... as it happens to both my sensors..

Thank you

Logged


0
Offline Offline
Shannon Member
****
Karma: 215
Posts: 12463
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

When the sensor freezes, have you tried just reseting the Arduino?  If that clears the problem is suggests software issue, else it is likely hardware.  When its failing check the power supply voltage is adequate - check if the on-board regulator getting very hot.
Logged

[ I won't respond to messages, use the forum please ]

Kuala Lumpur, Malaysia
Offline Offline
Full Member
***
Karma: 4
Posts: 205
Anything is possible
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the suggestions..

Tried resetting both the Arduino UNO & the sensors... no changes...

Let me check the on-board regulator and power related issues...

Logged


Toledo, OH
Offline Offline
God Member
*****
Karma: 36
Posts: 514
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have this strange issue with DFRobot's URM37 v3.2 sensors  ( http://www.dfrobot.com/wiki/index.php?title=URM37_V3.2_Ultrasonic_Sensor_(SKU:SEN0001) ) that randomly stop working/freeze after running for 7 to 8 hours ...

I was running two sensors and one of them jut stop working or at times, both of them stop working after running for a long period of time...

When the sensors freeze/stop working, it cannot be recovered even by reseting the sensors by powering it down...

The only way to recover it was by powering it off for a few hours and it will start to work again...

This seems like some sort of "charge" still in the sensors that need to be "discharged" to clear the freeze...

I've got this URM37 working with NewPing library by teckel ( http://arduino.cc/forum/index.php/topic,106043.240.html ) , Mode 1 ( Serial ) , Mode 2 ( Autonomous ) and Mode 3 ( Passive PWM ) ( http://www.dfrobot.com/wiki/index.php?title=URM37_V3.2_Ultrasonic_Sensor_(SKU:SEN0001) ) but the same symptoms of freeze/hang after a long period still shows up..

Any ideas/suggestions on how to resolve this strange issue... as it happens to both my sensors..

Thank you

It sounds like the poor little thing is overheating.  My suggestion is to change the time between pings or the ping delay so it's twice as long.  I'd guess that would either cause it not to lock up or to lock up after a longer period of time.  It really doesn't sound like a software issue because it doesn't work for an hour when this happens.  If it was software, cycling power would restart it right away.

Tim
Logged

Arduino - Teensy - Raspberry Pi
My libraries: NewPing - LCDBitmap - toneAC - NewTone - TimerFreeTone

Kuala Lumpur, Malaysia
Offline Offline
Full Member
***
Karma: 4
Posts: 205
Anything is possible
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

To prove my point that this sensor is going nuts/faulty, I hook up an Ethernet shield and send the both the URM37 distance sensors feed to cosm.com every second so that I can "see" when the sensor is operational and when it decide to go on strike...

https://cosm.com/feeds/78111

Any idea why/how such things could happen ?

The power regulator on the sensor is not hot at all and I'm powering this up using a 12V 5A SMPS to the DC socket...

Getting the sensor reading every 1000ms ...

The full codes below for the URM37 using Cosm & HttpClient libraries

Code:
#include <SPI.h>
#include <Ethernet.h>
#include <HttpClient.h>
#include <Cosm.h>

// MAC address for your Ethernet shield
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };

// Your Cosm key to let you upload data
char cosmKey[] = "PutYourAPIKeyHere";

// Define the strings for our datastream IDs
char sensorId[] = "Range1";
char sensorId2[] = "Range2";

CosmDatastream datastreams[] = {
  CosmDatastream(sensorId, strlen(sensorId), DATASTREAM_INT),
  CosmDatastream(sensorId2, strlen(sensorId), DATASTREAM_INT),  
};
// Finally, wrap the datastreams into a feed
CosmFeed feed(78111, datastreams, 2 ); // Setup a new stream device/feed ans put the Feed ID here

IPAddress ip(192,168,0,50);  // Change to your IP address
EthernetClient client;
CosmClient cosmclient(client);

// URM Defines
unsigned int i=0;
int URPWM   = 2;   // PWM pin
int URTRIG  = 3;    // Trigger pin
int URPWM2  = 4;  // PWM2 pin
int URTRIG2 = 5;  // Trigger2 pin
 
unsigned int Distance,Distance2=0;
uint8_t EnPwmCmd[4]={0x44,0x02,0xbb,0x01};    // distance measure command
 
void setup(){      
  
   Serial.begin(9600);
  
   Serial.println("Starting single datastream upload to Cosm...");
   Serial.println("Starting Ethernet Client...");

// Setting up Ethernet static IP address
   Ethernet.begin(mac, ip);
   Serial.println("Ethernet client & IP address OK");  
  
// URM Setup  
   PWM_Mode_Setup();
   Serial.println("Setting up URM37 PWM Mode...");
   delay(500);   // Wait for sensors to startup...

   Serial.println();

}
 
void loop()
{

 PWM_Mode();
 delay(1000);  // 1 sec per feed updates
}                      

//PWM mode setup function
 void PWM_Mode_Setup(){
  pinMode(URTRIG,OUTPUT);                     // A low pull on pin COMP/TRIG
  pinMode(URTRIG2,OUTPUT);
  digitalWrite(URTRIG,HIGH);                  // Set to HIGH
  digitalWrite(URTRIG2,HIGH);                  // Set to HIGH
  
  pinMode(URPWM, INPUT);                      // Sending Enable PWM mode command
  pinMode(URPWM2, INPUT);                      // Sending Enable PWM mode command
  
  for(int i=0;i<4;i++){
      Serial.write(EnPwmCmd[i]);
   }
}
 
void PWM_Mode(){                              // a low pull on pin COMP/TRIG  triggering a sensor reading
    digitalWrite(URTRIG, LOW);
    delay(1);
    digitalWrite(URTRIG, HIGH);               // reading Pin PWM will output pulses
    unsigned long DistanceMeasured=pulseIn(URPWM,LOW);
    
    delay(10); // slight delays between sensors
    
    digitalWrite(URTRIG2, LOW);
    delay(1);
    digitalWrite(URTRIG2, HIGH);               // reading Pin PWM will output pulses
    unsigned long DistanceMeasured2=pulseIn(URPWM2,LOW);
    
    
    if( DistanceMeasured >= 50000 || DistanceMeasured2 >= 50000){
      Serial.print("PWM Error Values");    
   }
    else{
      Distance=DistanceMeasured/50;           // every 50us low level stands for 1cm
      Distance2=DistanceMeasured2/50;           // every 50us low level stands for 1cm
   }
  
  datastreams[0].setInt(Distance);
  datastreams[1].setInt(Distance2);
  
  Serial.print("Distance1 :");
  Serial.println(datastreams[0].getInt());
  
  Serial.print("Distance2 :");
  Serial.println(datastreams[1].getInt());
  
  int ret = cosmclient.put(feed,cosmKey);
  
  Serial.print("cosmclient.put returned ");
  Serial.println(ret);
  
}

« Last Edit: October 01, 2012, 01:02:36 pm by Stanley » Logged


Toledo, OH
Offline Offline
God Member
*****
Karma: 36
Posts: 514
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Any idea why/how such things could happen ?

The power regulator on the sensor is not hot at all and I'm powering this up using a 12V 5A SMPS to the DC socket...

Getting the sensor reading every 1000ms ...

I'd still guess overheating.  It's basically a speaker which is a moving part.  For kicks, make the sensor ping every 2 seconds instead of 1 second and see if the pattern changes.

Tim
Logged

Arduino - Teensy - Raspberry Pi
My libraries: NewPing - LCDBitmap - toneAC - NewTone - TimerFreeTone

Kuala Lumpur, Malaysia
Offline Offline
Full Member
***
Karma: 4
Posts: 205
Anything is possible
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Any idea why/how such things could happen ?

The power regulator on the sensor is not hot at all and I'm powering this up using a 12V 5A SMPS to the DC socket...

Getting the sensor reading every 1000ms ...

I'd still guess overheating.  It's basically a speaker which is a moving part.  For kicks, make the sensor ping every 2 seconds instead of 1 second and see if the pattern changes.

Tim

Tim,

Thanks for the suggestions.. I also suspect it was caused by overheating issues...

I hv changed the delay to 2 secs and added a small 12V fan blowing at both the sensors since my input power was 12V SMPS..

I've changed back to serial TTL as I can also get the onboard temp sensors too.. added the fields for temp1 & temp2 on Cosm for further analysis...



Logged


Pages: [1]   Go Up
Jump to: