Project

General

Profile

Jeenode Micro in RF12_COMPAT mode?

Added by Rolf about 1 year ago

Hi,
just tried to use a Jeenode V6 in RF12_COMPAT mode (with RFM12 radio, sending out RF69 native packets), as described here:
https://jeelabs.org/book/1522d/
Fine! Runs well and straight forward. - But my goal is to use some Jeenode Micros this way. First try did not work. The "manual" says that some "software tricks" had to be applied to get the thing running. Maybe those tricks do not work with the Jeenode Micro? Does anybody now? (could save me perhaps from a long and useless research).
regards,
Rolf


Replies (38)

RE: Jeenode Micro in RF12_COMPAT mode? - Added by JohnO about 1 year ago

Could you give this version of loop() a spin. I think it will give more chance of seeing a blip on the power consumption when the TX begins.

loopCode (476 Bytes) loopCode

RE: Jeenode Micro in RF12_COMPAT mode? - Added by Rolf about 1 year ago

I modified the code a bit (as attached). After the third (short) blink it goes for 5 seconds in rf-sleep mode, then wakes up and sends (should send) and afterwords another 5 seconds delay to the last (long) blink. So, in the middle of the 10 seconds delay between the blinks there should happen something. What I see is: The current drops from 9.9 mA to 9.45 after the third blink (rf goes sleep) and stays there for 5 seconds. Then the current comes back to 9.9 mA and stays there to the end. In think the radio is really not sending anything. What should be the consumption for the antenna, at least some milliamperes I suppose?

RE: Jeenode Micro in RF12_COMPAT mode? - Added by JohnO about 1 year ago

After initialize of the radio will in an idle state, when rf12_recvdone is issued the RX is active and the radio using power. When rf12_sleep power should drop as radio consumption will be unmeasurable with a multimeter. We still have the ATTiny84 power usage. The transmit will trigger the radio consumption again. @Martin will know about the power usage although receiver active should be around 14mA and TX will be double that.

RE: Jeenode Micro in RF12_COMPAT mode? - Added by Rolf about 1 year ago

What I could do is to run the same cycle in RF12 classic mode and compare. As I mentioned, in classic mode radio is sending.

RE: Jeenode Micro in RF12_COMPAT mode? - Added by JohnO about 1 year ago

@Rolf

Where is your "#define RF12_COMPAT 1" statement in your test sketch?

RE: Jeenode Micro in RF12_COMPAT mode? - Added by JohnO about 1 year ago

Found it in the rf12.h file.

RE: Jeenode Micro in RF12_COMPAT mode? - Added by Rolf about 1 year ago

Its in jeelib, file RF12.h. - I am still fighting the JN-Micro to run in classic mode, to compare the current consumption. That takes some time, because of minor problems. The code that is running in classic mode, is my standard node software, not that what I used with compat mode. The latter makes some problems in classic mode, due to slightly different packet structure. But this is on application level I suppose and will be adjusted shortly.

RE: Jeenode Micro in RF12_COMPAT mode? - Added by Rolf about 1 year ago

Strange! (or not, see below) Finally I have the code that works with both, RF12_COMPAT set to 0 or 1 (attached). In both cases the receiver sits on a RasPi, first: a Jeelink attached to the USB-Port, with some relay-code , sencondly: a RF69-breakout board on GPIOs. The code of the receiver in the RasPi is different, naturally, but receives sucessfully with other senders, in both cases.

The strange thing: The power consumption is as I already reported for native mode: 9.9 mA with radio idle, 9.5 in sleep mode and when the radio sends, no significant raise of current, with respect of idle mode 9.9 mA, is seen with a multimeter. Thats the same with RF12_COMPAT 0, where I know that radio is sending. Obviously the power peak of the sending radio is too short to be seen with a multimeter, even with maximum packet length.

RE: Jeenode Micro in RF12_COMPAT mode? - Added by JohnO about 1 year ago

The transmitter is only actually on for a tiny fraction of a second, hard to see without an oscilloscope.

So is everything as you wish it now?

The code below is not required in loop():

bitSet(DDRB, 0);
bitClear(PORTB, 0);

RE: Jeenode Micro in RF12_COMPAT mode? - Added by JohnO about 1 year ago

Rolf wrote:

a RF69-breakout board on GPIOs.

I found that setup very noisy. I now use RF12 Classic on a Jeelink with an RFM69CW radio connected to a RasPi via a one metre shielded USB cable, at 'ARM's length from the RasPi. The Jeelink sits in the middle of an A4 copper board which to my great surprise cuts out lots of noise.

RE: Jeenode Micro in RF12_COMPAT mode? - Added by Rolf about 1 year ago

"in the middle of a A4 copper board"

A metal plate underneath the antenna enhances the gain (if I correctly remember lectures of my student times).

RE: Jeenode Micro in RF12_COMPAT mode? - Added by JohnO about 1 year ago

It works a treat!

I expected it to need an electrical connection to the ground plane but @Martyn says it isn't required. He is correct - as always.

RE: Jeenode Micro in RF12_COMPAT mode? - Added by JohnO about 1 year ago

I did originally use a slightly crinkled flexible copper sheet and it was almost ineffective compare to the rigid one I use now.

(26-38/38)