|
Post by selcouth on Feb 22, 2015 19:45:53 GMT
Problem: When DIO0 is connected to Arduino pin D2, my sketches crash at any radio.send line. When I disconnect DIO0 from D2, I'm able to transmit. I have an RFM69HW (915 MHz) connected to a 5v Arudino clone. Pins are as follows: 3.3v - 3.3v (red in picture) GND - GND (black in picture) SCK - Pin 13 (white in picture) MISO - Pin 12 (yellow in picture) MOSI - Pin 11 (green in picture) NSS - Pin 10 (blue in picture) DIO0 - Pin 2 (orange in picture) (ignore brown in picture - not used) SCK, MOSI, and NSS are fed through a 10k/20k voltage divider. 3.3v and GND are direct, as is MISO and DIO0. I have an HC-SR04 ultrasonic sensor and I'm reading values, transmitting them from the Arduino out to a Raspberry Pi (with RFM69HW) where the Pi receives, publishes via mosquitto, then OpenHAB reads via binding. It all works, but as soon as I plug DIO0 to D2, the sketch fails when it hits a radio.send line. I double checked and RFM69.h has interruptPIN set to 2. And I have the power level set low (2) so I'm not drawing more current than this board can supply. This post and this post indicate that DIO0 doesn't need the voltage divider. And I don't think I need to step up 3.3v to 5v either. Please share your thoughts!
|
|
|
Post by computourist on Feb 23, 2015 20:41:44 GMT
It seems to me your code doesn't handle the interrupts from the RFM very well. You could try to bracket time-sensitive code (the Ultrasound measurement ?) with interrupt disable and enable statements...
- Computourist
|
|
|
Post by selcouth on Feb 23, 2015 20:48:25 GMT
It seems to me your code doesn't handle the interrupts from the RFM very well. You could try to bracket time-sensitive code (the Ultrasound measurement ?) with interrupt disable and enable statements... - Computourist All of my testing was using Eric's various sensor sketches. Same problem on all of them. The only tinkering I did on the RFM library side was lower the power level.
|
|
|
Post by selcouth on Feb 27, 2015 2:59:21 GMT
Could I be having trouble because the RFM69 is putting out a 3.3v signal and the Arduino needs a 5v on D2 to recognize the interrupt?
|
|
|
Post by computourist on Feb 27, 2015 14:02:52 GMT
Could I be having trouble because the RFM69 is putting out a 3.3v signal and the Arduino needs a 5v on D2 to recognize the interrupt? If you have such a problem the 3.3 Volts would be interpreted as a "low", meaning constant interrupt. You could test whether signal levels are an issue by writing a short program that detects the level on an Arduino input pin. Put a 3.3 Volts "High" on it and see how Arduino interprets it...
|
|
|
Post by Jtk on Mar 2, 2015 14:50:21 GMT
Perhaps the radio driven from the low current arduino 3.3v line can't keep the interrupt line high?
My working version has a 3.3v regulator off the arduino 5v line. Of course it too goes south every couple of days.
|
|
|
Post by Salah on May 9, 2015 20:07:03 GMT
I have got the same problem but with the Ground , if i removed the GUN all it works. I don't why it happened.
|
|