mova
New Member
Posts: 9
|
Post by mova on Jun 9, 2016 9:53:02 GMT
Hey guys. I'm really hoping you can help me get on from here! I've built a simple setup from Papa's "Success" thread. I've used an Uno clone with ethernet shield and LLC's connected to the RFM module. For the end node i've used a pro mini 3.3v I've connected everything like Papa and computourist have in their guides. End node is from Computourist Github and connected just like that Gateway is from Papas post in the success thread. The only difference is the LLC's I put in the same way as kmac did because I wasnt able to find a Buono with 3.3v option I've connected gateway and pc running openhab by cable to my router. I've done the corrections to the w5100.h and everything else mentioned in Papa's Oct 9th post. Now, the gateway connects nicely to MQTT, and when i press the Node 2 output button in Openhab, the radio LED on gateway turns on. There must be some kind of connection here. In debug mode, the gateway writes: 868 Mhz...connectingno linkMQTT-link OKMQTT-Topic: home/rfm_gw/sb/node02/dev04MQTT-Topic: home/rfm_gw/sb/node02/dev02MQTT-Topic: home/rfm_gw/sb/node02/dev04MQTT-Topic: home/rfm_gw/sb/node02/dev02In radio debug it writes: READVal:0No node 2READVal:0No node 2ONVal:1No node 2READVal:0No node 2READVal:0No node 2My end node writes:Max clock cycles: 8000Node Software Version DHT V2.2Transmitting at 868 Mhz...No connection...No connection...No connection...No connection...No connection...Received:1D, 0, 18, 0, 35 =? 35No connection...Received:1C, 0, 1E, 0, 3A =? 3ANo connection...No connection...I have no idea what to get from this. Do I have a connection between gateway and node at all? How is the LED on end node supposed to flash? It seems to mostly do dim, quick flashes in series of maybe 5. sometimes it lights up bright with few flashes of dark and keeps doing this for some time. Can you guys point me in any direction? Edit: I've just "converted" my Uno to run on 3.3v by doing THIS and then connected everything as papa has described. That means i'm no longer using the LLC's to the RFM. I've also tried to power the gateway from a 9V battery instead of USB. Now looking at the end node debug it still shows the same. I don't know if I can connect USB to gateway while it's powered by 9V battery and look at that serial?
|
|
|
Post by papa on Jun 9, 2016 23:33:11 GMT
First I discourage using two power sources (like USB & 9v Battery) for your Arduino. You could fry it.
From what you posted above, it seems your Gateway (obviously the latest version, 2.4) is getting an ip address from your router & is connecting to mqtt service on the computer.
The LED on the End Node is supposed to toggle to steady on or to steady off in response to the node's pushbutton or to a command from OpenHAB (the User Interface on a browser or a rule) With these gateway/end node versions, the gateway<>end node data communication tries 5 times, especially if it's not successful.
At first, I wondered if you were running an earlier version of the DHT End Node sketch, but now I see that you're using version 2.2, the latest.
Other than a brief test I did to update my post, I'm still using the earlier versions of Gateway & End Node.
So software wise, I'll let computourist or someone else weigh in on what your debug represents.
I examined your pics to see if I can tell any wiring problems, but It's hard to follow from the angles, etc.
Recheck your soldering & wiring by sight & multimeter: Are the correct things (according to schematics) connected? Did you connect things not supposed to be that way? Tracking down those things have been necessary for many of us at the start.
|
|
mova
New Member
Posts: 9
|
Post by mova on Jun 10, 2016 10:28:29 GMT
Thank you Papa.
I know the pics don't show all the details but they're built from yours and Computourist's drawings only with a difference in the size of capacitors. I'm using 10V 330uf but I've tried without them as well. One thing I noticed when compiling the gateway was this "error" message:
Users/XXXXXXX/Documents/Arduino/RFM_MQTT_GW_24/RFM_MQTT_GW_24.ino:121:18: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] char *subTopic = "home/rfm_gw/sb/#"; // MQTT subscription topic ; direction is southbound ^ /Users/XXXXXXX/Documents/Arduino/RFM_MQTT_GW_24/RFM_MQTT_GW_24.ino:122:20: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] char *clientName = "RFM_gateway"; // MQTT system name of gateway ^
The first times I compiled the gateway I didn't get this message. I don't know what I did differently now
As far as I could google, this should't matter. What do you think?
|
|
|
Post by greginkansas on Jun 10, 2016 10:54:18 GMT
"First never use two power sources (like USB & 9v Battery) for your Arduino. That would seem to fry it." No you can use two, tie the grounds together, but the + path must be to different chips/branches of the circuit. mova have you changed the inos to your radios? password? the same (radio hardware version), uncomment (no "//" at the start) the one that matches frequency of your RFM69 transceivers About line 88, choose your own unique 16 character encryption key for your network, make note of it, & use it also for all end nodes. About line 89 (#define IS_RFM69HW), leave it uncommented ONLY if your RFM69 transceivers have "H" in their part number. on node #define IS_RFM69HW), leave it uncommented ONLY if your RFM69 transceivers have "H" in their part number
|
|
|
Post by computourist on Jun 10, 2016 11:15:06 GMT
..... One thing I noticed when compiling the gateway was this "error" message: Users/XXXXXXX/Documents/Arduino/RFM_MQTT_GW_24/RFM_MQTT_GW_24.ino:121:18: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] char *subTopic = "home/rfm_gw/sb/#"; // MQTT subscription topic ; direction is southbound ^/Users/XXXXXXX/Documents/Arduino/RFM_MQTT_GW_24/RFM_MQTT_GW_24.ino:122:20: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] char *clientName = "RFM_gateway"; // MQTT system name of gateway ^Hi mova , these warnings do not interfere with normal functioning of the gateway.. Arduino IDE switched to a different compiler, that's all.
|
|
|
Post by papa on Jun 10, 2016 12:40:43 GMT
It can be confusing having wires going several directions. Even one wrong wire can hang the end node. I suggest you strip down your DHT End node, see if something will work then add back functions. That is, (for now) remove the DHT11 sensor (& its resistor), the pushbutton (& its resistor), & the LED (& its resistor). Against the end node schematic, recheck your remaining wiring. In the DHT end node's periodic transmission section (in the sketch), make sure sending devices 2 (radio signal strength data) & 4 (voltage data) are set as true & are not commented out.
Program your Gateway to be in radio debug mode. Then connect the Gateway to USB & power the stripped DHT node separately. See what you get on the IDE's Serial Monitor. Then connect the stripped DHT node to USB & power the gateway separately. See what you get on the Serial Monitor. On the Serial Monitor, are you seeing reports of radio signal strength & voltage from the stripped down DHT end node?
From this experience, you can boost your troubleshooting skills.
PS I still discourage connecting an Arduino compatible circuit to two power sources unless you are very confident about how to do that safely for your Arduino.
|
|
mova
New Member
Posts: 9
|
Post by mova on Jun 11, 2016 9:32:18 GMT
Once again, thank you guys!
Greginkansas: Yes, I've done all you just said. I've even tried to comment out the IS_RFM69HW to see if the RFMs drew too much power from the build, but i'm not sure this would even decrease power consumption. I do have the HW ones on 868 MHz. I haven't tried switching frequency in the sketch though. I believe someone marked my RFM's at 868 for a reason. I have chosen a 16-digit password and just went with a simple numbers-only to begin with.
Computourist: Thank you. I'll just ignore that message in the IDE then
Papa: I have tried removing parts from the builds but is it safe to remove the pushbutton pull-up resistor?
Also, how critical is the power supply? I discovered that my gateway had trouble connecting to MQTT until I switched to a new 9V battery. I power my end node from a standard usb charger via an AMS1117 3.3v adaptor connected to vcc OR through the FTDI232 set to 3.3v connected to the 6-pin header when programming and debugging. Should this be okay combined with a 10V 330uf capacitor? When measuring voltages it sometimes drops to below 3v
Btw, I've never seen the LED on my end node actually light up. I haven't changed anything in the sketch regarding the D9 pin, but it is my understanding that it should turn on when pressing the D8 button?
|
|
|
Post by papa on Jun 11, 2016 16:27:36 GMT
Yes, it should be safe to remove the pushbutton pull-up resistor. Did you recheck your wiring that remains after stripping down the end node. Let us know what you see on Serial Monitor when you power up gateway (radio debug mode) & the stripped down end node (take turns putting each on usb).
Yes, power supply is critical, enough volts AND current, but not too much. A 9 volt battery on the gateway would not seem to last very long. Current dropping even .2 or .3 volts below 3 volts could be a problem. Not just voltage, but also available current is important.
I'll let computourist respond about supplying power to the pro mini on your end node. He's more knowledgeable.
Yes, when you press the end node's push button on D8, it's supposed to toggle the D9 LED on & off. But again, I'd focus on getting things fixed so you see mqtt messages being passed on the Serial Monitor. Get that working with a stripped down node & then add in the pushbutton & LED & DHT11 sensor.
|
|
|
Post by greginkansas on Jun 11, 2016 16:59:39 GMT
Is this what you have?
"I do have the HW ones on 868 MHz. I haven't tried switching frequency in the sketch though."
//#define FREQUENCY RF69_433MHZ #define FREQUENCY RF69_868MHZ //#define FREQUENCY RF69_915MHZ
|
|
|
Post by computourist on Jun 12, 2016 7:45:58 GMT
Hi mova, you should NOT power your end node thru the FTDI chip. The FTDI on-board regulator can only supply 50 mA on the 3.3 Volts output, which is less than half of what the RFM69 needs... The Vcc power pin on the FTDI board should be left open. The end node should be powered by a USB power supply through a 3.3 Volts regulator when programming the node or monitoring the serial port.
|
|
mova
New Member
Posts: 9
|
Post by mova on Jun 12, 2016 9:44:11 GMT
Okay - still not much luck. Greginkansas: Yes, that's what I meant I've now tried leaving the VCC open when connecting end node to computer via FTDI and powering the end node from separate AMS1117 3.3v supply connected to VCC on the pro mini. One thing I discovered was that i'm now unable to upload the sketch to the board. Serial still works though. So when uploading the sketch I had to supply power via the FTDI, then switch to separate AMS1117 supply and reconnect FTDI (without VCC) to connect serial. I also removed all components from the end node. The serial on end node now shows: Node Software Version DHT V2.2
Transmitting at 868 Mhz...
No connection...
No connection...
No connection...
No connection...
No connection...
Timeout waiting for start signal low pulse.
No connection...
And so on.. This was different than before, so I tried reconnecting DHT11 sensor, LED and pushbutton. The serial then shows: No connection...
Received:
1D, 0, 18, 0, 35 =? 35
No connection...
Received:
1C, 0, 18, 0, 34 =? 34
No connection...
The End node serial displays this even with the gateway powered off so I guess it's just noise? On the gateway powered by USB in order to use serial, it says: GW Version GW V2.4 868 Mhz... connecting no link MQTT-link OK MQTT-Topic: home/rfm_gw/sb/node02/dev04 READ Val:0 No node 2 MQTT-Topic: home/rfm_gw/sb/node02/dev04 READ Val:0 No node 2
I'm really not seeming to get any further on this one. I'd like to try building the gateway on a pro mini as well but I can't seem to find any W5100 module that fits, so I'm stuck with my Uno clone "hacked" to run on 3.3v. Has anyone had luck with this setup before me? I read in another post about uploading a simple send/receive sketch in order to test the RFM69-modules. This might be the place to go next just to see if my RFM69s are good. I don't see how anything should've happened to them though. Can any of you tell me how the LED on the pro mini end node is supposed to flash when running? Mine is really dim and flashing quickly in series of maybe 5. You can see the build here
|
|
|
Post by greginkansas on Jun 12, 2016 12:25:47 GMT
It seems like the radio connections. Back to basics, ohm all wires from radio to connectors ie bad wire/cold joint on radio - double check MISO/MOSI, solder bridges on radio?
|
|
|
Post by papa on Jun 12, 2016 12:35:23 GMT
Mova, sorry you're having so many frustrations. Most of us have been there. Hang in there. You can still get this working & you will have learned valuable troubleshooting skills.
About the End Node LED, as I posted above: "when you press the end node's push button on D8, it's supposed to toggle the D9 LED on & off." The LED dimness may be due to how big a resistor you use with the LED, like the 1 kilo ohm resistor in computourist's schematics. Using 220 ohms makes the LED brighter & 100 ohms makes it brighter still. Both smaller resistors are safe to use.
As to the LED flashing quickly in 5 pulses, I don't believe it's supposed to do that. In the gateway & end node versions you're using, the RFM69 communications retry 5 times, but I don't think that should flash the LED on D9. That may (or may not) be a clue to something wired wrong.
Your RFM69 modules may be damaged/defective. You mentioned, "uploading a simple send/receive sketch in order to test the RFM69-modules." That's a good troubleshooting idea. Your Arduino IDE should have examples that came with the RFM69 library. Find those examples something like this: In the IDE, click files then Examples. In Examples, scroll down until you see RFM69... & click on it. Then click on that Examples. From the RFM69 Examples, open, customize, & upload the Gateway & the Node sketches.
|
|
mova
New Member
Posts: 9
|
Post by mova on Jun 12, 2016 16:02:11 GMT
Papa: I didn't mean the D9 LED blinking, just the onboard red one as you can barely see in the video. I have never seen the D9 LED light up on the end node (and it's not faulty) but if it is only supposed to light up on radio activity, I guess the lack of such might be why I haven't seen it?
Greg: when you say "ohm all wires" is there something to this I don't understand? You just mean check for continuity, right? And make sure there are no solder bridges between ports on the RFM69 making unwanted short circuits?
Btw, will I damage anything if i try to uncomment another radio frequency in the sketch(instead of 868MHz)? Just to make sure my RFMs are actually marked right
|
|
|
Post by papa on Jun 12, 2016 19:03:06 GMT
Mova, my understanding is that you can safely try other radio frequencies. May not be optimum if different from what your RFM uses, but can still work. Some RFM69 sellers (lowpowerlab ?) sell one radio for 868 & 915 MHz. Of course, use same frequency for gateway & node.
I do believe greg means continuity re-check the connections, which I've mentioned before & will second again, along with another comparison to the (stripped) schematic. I once traded GND & power on the DHT11 sensor & the node would not communicate or not even take an upload. I thought I had checked & rechecked the wiring, but I still missed the mistake several times.
You wrote (about LED blinking), "I didn't mean the D9 LED blinking, just the onboard red one as you can barely see in the video." Watching the video, I see the blinking you mean on the onboard LED connected to D9. Does the LED quick repeated blinks only happen when connected with USB or do the blinks happen when your node is powered by USB AND other sources?
The onboard LED on my miniwireless Arduino compatible does 3 quick blinks & repeats sometimes when I'm connected to the computer's USB. I'm not sure why. I believe it has something to do with the bootloader waiting for activity. Certainly my bootloader's make file refers to LED blinks. I have noticed that the blinking will either stop or start when the Arduino is connected to USB & I start or stop the Serial Monitor. The quick blinks do not happen when my miniwireless is powered from a 5 volt adapter & is NOT connected to USB. Bottom line, your quick LED blinks may have nothing to do with your node & gateway not communicating.
What sometimes helps when gateway & end node are not communicating is to reboot both with their reset buttons.
|
|