Go Down

Topic: Project freezes after several hours (Read 2993 times) previous topic - next topic


OK  I have removed the capacitor, set all the unused inputs to pullups and it still freezes after several hours.

if I hook the receivers data to an arduino board as well, that board doesn't hang, i.e. the data is OK from the rf module.

But I could perhaps get the arduino one to print buflen every time it sees a message ( presumably anything with the right datarate? )

I wonder if this has something to do with it, I don't use multiplexing for my displays, all the LED segments are latched by the TPIC shift regs.

So once the data is displayed, the loop is only checking for a correct length message coming in :-


void loop ()

  uint8_t buf[VW_MAX_MESSAGE_LEN];
  uint8_t buflen = VW_MAX_MESSAGE_LEN;
  delay (20);
  if (vw_get_message(buf, &buflen)) // Non-blocking

that's the loop,  I don't now why the delay is in there, I think that was part of the code I copied.

Greg who has a similar problem doesn't have the delay...

I have several units in the field with this same front end ( up until the "got " message,  that are running fine without hanging up )

It was hung up again this morning , so I guess I will try putting a  switch on the RF modules supply, and just power it up when I want to test it.

Except then there would be no constant white noise coming into the chip, which might confuse it,,,,,,,

Or perhaps  I could disconnect the antenna, and wrap the receiver in foil ( test it with the remote to make sure nothing is getting through ) and just fold the foil open to test it every few hours..

Now the plot thickens !   I had left it frozen, and without my rebooting it the displays have changed ( I have only three 7seg displays hooked up for testing ) one is blank, and one has random segments on ( not a number ).  The lookup table has only valid patterns on.

And when I sent an update from the remote, it worked and displayed the right numbers again....

Driving me nuts !
45 years of editing projects with a knife and soldering iron, then I found Arduino !


Sounds like it's time for a bunch more debugging prints. In particular' I'd be interested to have one in an else on the if(vw_get_message.... Documentation says that it'll return a message whether the CRC is correct or not. Might give some insight into your theory about other folks using that frequency. Also, I doubt that it's relevant, but you have some Serial.print activity in setup before Serial.begin. 


Jun 16, 2011, 12:34 pm Last Edit: Jun 16, 2011, 02:23 pm by Boffin1 Reason: 1
Thanks I will have a look at that serial print.

I cant add serial prints for debugging as it only hangs up with the chip plugged into the equipment, if I hook up an arduino board to the same Rx output, it doesnt latch !

Meanwhile I have added        vw_wait_rx()      

which makes it wait for an input (blocking )

I only need the loop to do anything after getting a message ( my displays are latched, not multiplexed )

It takes many hours to test it though !  I ill change that serial thing in setup anywaay.
45 years of editing projects with a knife and soldering iron, then I found Arduino !


I think it must have been a noisy power supply !

Its been working 20 hours OK now since I changed the PSU   (and made the loop wait for a new message wit the blocking VirtualWire wait instruction.)

Thanks for the forums help
45 years of editing projects with a knife and soldering iron, then I found Arduino !

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131