AVR Sensor V3

42 views
Skip to first unread message

Steve Burg

unread,
Sep 15, 2015, 10:11:31 AM9/15/15
to UKHASnet
So I've been working on building my first node with various parts. I finally assembled the first board this evening. After finding out I couldn't burn the programming to one of the new chips I purchased, I gave in an burned the chip in my Arduino UNO and moved it to the node. 

Now come the questions:

1) How can I monitor/view what the node is doing? Should I be able to monitor via serial from the RX/TX/G pins on the side of the board? What baud rate?

2) This is possibly on me but.... I almost think the board is pulling high current. I was using a RPI to power the board and the usb cable acually got warm! My understanding is that if everything is working it should be a low current affair. 

3) Can I assemble a board with no temp sensor or radio board and upload the program and see anything? How would I see it? (back to question 1) 

Thank you in advance for any help or advice!

Steve Burg

unread,
Sep 22, 2015, 6:39:11 AM9/22/15
to UKHASnet
So far I have learned a lot and have moved forward. I have a RPI gateway node running with a BMP180 sensor. I have a Slice of Pi wired up with a RFM69 board but I am getting the following when I start the gateway software:


|Restart Rx
/Restart Rx
-Restart Rx
\Restart Rx
/Restart Rx
-Restart Rx
\Restart Rx
/Restart Rx
-Restart Rx
\Restart Rx
|Restart Rx
Registers: 10, 90, 00
Registers: 10, d8, 00
Restart Rx
/Restart Rx
In the spirit of full disclosure I did use a 433 mhz board and not the 868 one. I found where I thought I needed to edit the rfm69config.h file and made the following changes.

    { RFM69_REG_07_FRF_MSB,     0x6C }, // 433 MHz
    { RFM69_REG_08_FRF_MID,     0x40 }, // calculated: 0x80?
    { RFM69_REG_09_FRF_LSB,     0x00 },

However I still get nothing from the AVR node board. I made the same changes on the adruino sketch for all three of the gateway/repeater/node versions and still get no indication it is working. I have tried to monitor the serial pins and do not get any data on any of the sketches. 
UKHASNet-Error.JPG

David Brooke

unread,
Sep 22, 2015, 6:52:59 PM9/22/15
to UKHASnet
On Mon, Sep 21, 2015 at 06:17:15PM -0700, Steve Burg wrote:
> So far I have learned a lot and have moved forward. I have a RPI gateway
> node running with a BMP180 sensor. I have a Slice of Pi wired up with a
> RFM69 board but I am getting the following when I start the gateway
> software:
>
>
> > |Restart Rx
> > /Restart Rx
> > -Restart Rx
> > \Restart Rx
> > /Restart Rx
> > -Restart Rx
> > \Restart Rx
> > /Restart Rx
> > -Restart Rx
> > \Restart Rx
> > |Restart Rx
> > Registers: 10, 90, 00
> > Registers: 10, d8, 00
> > Restart Rx
> > /Restart Rx

That's just debug. I can't tell how often it's restarting the receiver but the
register values are those I see on my gateway. Most of the time you should just
see a 'spinning' character though it might take a while after power up before
the receive signal threshold is adjusted to your local noise floor.

The receiver is restarted whenever it starts to receive something which
subsequently turns out to not be a valid UKHASnet packet.

The Pi gateway code doesn't currently transmit anything using the radio, it
only uploads its data (and anything it receives off air) to the Internet.

> > In the spirit of full disclosure I did use a 433 mhz board and not the 868
> one. I found where I thought I needed to edit the rfm69config.h file and
> made the following changes.
>
> { RFM69_REG_07_FRF_MSB, 0x6C }, // 433 MHz
> > { RFM69_REG_08_FRF_MID, 0x40 }, // calculated: 0x80?
> > { RFM69_REG_09_FRF_LSB, 0x00 },

I've not looked at the frequency calculation myself and I don't know if there
are other differences between the modules.

> However I still get nothing from the AVR node board. I made the same
> changes on the adruino sketch for all three of the gateway/repeater/node
> versions and still get no indication it is working. I have tried to monitor
> the serial pins and do not get any data on any of the sketches.

The gateway code should send on serial but it may be several minutes between
packets if it's not receiving other nodes.

David

James Coxon

unread,
Sep 23, 2015, 2:20:22 AM9/23/15
to UKHASnet
Hi Steve,

Feel free to come to #ukhasnet channel on freenode as you might be able to get some realtime support to help you debug stuff.


James


--
You received this message because you are subscribed to the Google Groups "UKHASnet" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ukhasnet+u...@googlegroups.com.
To post to this group, send an email to ukha...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/ukhasnet/20150922225251.GB19875%40cubitt.dbrooke.me.uk.
For more options, visit https://groups.google.com/d/optout.

Steve Burg

unread,
Sep 23, 2015, 12:11:53 PM9/23/15
to UKHASnet

PROGRESS!

After *a lot* of trial and error I am finally able to see signs of life with the AVR board. I think the problem boiled down to the bootloader needing to be burned with the proper settings to use the internal clock. I was burning the UNO bootloader code. 

With that done, I am able to see the output on the serial pins of the AVR board. It's only temp (that I changed to show every 5 sec) and an occasional location, but that's way more information than I've had up to now. 

On to radio issues. I am not receiving the AVR board's signal on the gateway. I tried listening to 433.92 on a UV-5r but didn't hear anything from the AVR board either. (I had a rtl-sdr dongle a while back, but it got stolen out of my car along with a backpack full of electronics.. so no go there yet). The gateway software is restarting the receiver about once a second. I'm leaning towards more of the radio settings need to be changed for this to work. I have some examples book marked. Later today I may try to compare the 433 sample settings with the 869 settings in the code.  

Steve Burg

unread,
Sep 23, 2015, 2:11:54 PM9/23/15
to UKHASnet
I stand corrected!!

I am getting packets!! I'm not sure what's going on, but I have some packets passing which tells me it's not setting related. It may be antenna. I will test further later this evening. 

David Brooke

unread,
Sep 24, 2015, 7:05:46 AM9/24/15
to UKHASnet
Hi Steve,

Glad to hear that you've got it mostly working now.

On Wed, Sep 23, 2015 at 09:11:52AM -0700, Steve Burg wrote:
> there yet). The gateway software is restarting the receiver about once a
> second. I'm leaning towards more of the radio settings need to be changed

My Pi gateway receiver (on 869.5 MHz) restarts about every 4 seconds due to a
non-UKHASnet system just off frequency. I wouldn't be surprised to find a
transmission on 433.92 every second, it's certainly quite busy here and I'm in
a rural location.

David

Steve Burg

unread,
Sep 24, 2015, 10:56:38 AM9/24/15
to UKHASnet
Thanks David,

Right now I am fighting a couple of issues. The biggest is probably the range: it's extremely short. Maybe 2-3 feet (less than a meter) in direct line of sight. Both boards have an antenna soldered on them of an appropriate length and i have tried adding a counterpoise on both as well. It doesn't seem to make much difference. Until I purchase another rtl-sdr stick I will be flying blind on any frequency issues, but playing with an HT it is within the 2.5k minimum step for sure. 

The second issue is that so far I can only make one amtel chip work and I am afraid to reprogram it! I have 5 chips (6 with the original arduino) and am only using two at the moment. Both will program, but only one seems to load and show data when I put it on the board. I have assembled a second AVR board, minus the RF chip and am going to use it for testing here soon. C is not a language I have much experience with, but I would like to try to add some debugging code to repeater or node modules for testing. 

The idea UKHas created with these sensor nets is an idea I've had for a while. Being able to pick up the framework someone else has built is great! I'm just hoping to be able to overcome these issues so I can add something to the project. 

Jon Sowman

unread,
Sep 24, 2015, 10:59:09 AM9/24/15
to Steve Burg, UKHASnet
Can you confirm whether you’re using a -HW or -W version of the RFM69?

These symptoms sound similar to having the wrong PA (or PAs) enabled.

Jon

-- 
You received this message because you are subscribed to the Google Groups "UKHASnet" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ukhasnet+u...@googlegroups.com.
To post to this group, send email to ukha...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/ukhasnet/a223610a-4f71-4e10-a1e4-2822c7622d86%40googlegroups.com.

Steve Burg

unread,
Sep 24, 2015, 11:03:58 AM9/24/15
to UKHASnet, sbur...@gmail.com
I was sure I had purchased the HW version, but going back and double checking, they are the W version. What would I need to change and will it help?

Steve Burg

unread,
Sep 24, 2015, 11:08:48 AM9/24/15
to UKHASnet, sbur...@gmail.com
Looking quickly at the gateway code, it looks like I should swap the last two lines. Am I on the right track?


    // PA Settings
    // +20dBm formula: Pout=-11+OutputPower[dBmW] (with PA1 and PA2)** and high power PA settings (section 3.3.7 in datasheet)
    // Without extra flags: Pout=-14+OutputPower[dBmW]
    //{ RFM69_REG_11_PA_LEVEL,    RF_PALEVEL_PA0_OFF | RF_PALEVEL_PA1_ON | RF_PALEVEL_PA2_ON | 0x18},  // 10mW
    { RFM69_REG_11_PA_LEVEL, RF_PALEVEL_PA0_OFF | RF_PALEVEL_PA1_ON | RF_PALEVEL_PA2_ON | 0x1f},// 50mW



On Thursday, September 24, 2015 at 10:59:09 AM UTC-4, Jon Sowman wrote:

Phil Crump

unread,
Sep 24, 2015, 12:21:46 PM9/24/15
to Steve Burg, UKHASnet

Hi Steve,

The difference with the -W models is that they don't have PA1 or PA2 fitted, so you can only use PA0.

So what you want is what is found in this line: https://github.com/UKHASnet/ukhasnet-rfm69/blob/master/ukhasnet-rfm69-config.h#L44

In the above line, only PA0 is enabled.

Additionally any manipulation of the 'High Power Registers', ie. RegTestPa1, RegTestPa2, should be commented out for the -W models.

Regards,

Phil

--
You received this message because you are subscribed to the Google Groups "UKHASnet" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ukhasnet+u...@googlegroups.com.
To post to this group, send email to ukha...@googlegroups.com.

Steve Burg

unread,
Sep 24, 2015, 2:16:23 PM9/24/15
to UKHASnet, sbur...@gmail.com, ph...@philcrump.co.uk
Thanks Phil.

I had come to the conclusion that PA0 needed to be on, and PA1 and PA2 needed to be off from looking at other links. I did some tests setting the power output from 0x1f to 0x18 and back from some of the same research, but honestly none of them have done much. With 0x18 the range really seemed to be cut in half. Once set back to 0x1f I am getting the same range as when PA0 was off and the other two were on. 

I also don't see anywhere that the two RegTestPa values are used in the gateway code so I am assuming that isn't an issue. 

I'm sort of running out of ideas. Is the W model just that much weaker? I see the strip board versions of nodes made at a workshop and can see this isn't all that complex. I do have two HW chips on order that will be here early next week so I will be able to test that theory out. 

Has anyone tried the W models? Are there an receive gains with the HW model? I would think not, but who knows. If not, maybe I will just make my W chips RPI gateway nodes. 

Thoughts?

Phil Crump

unread,
Sep 24, 2015, 5:45:50 PM9/24/15
to Steve Burg, UKHASnet

Hi Steve,

What sort of range are you getting? And what are you using as an antenna on each end?

The W model will be about half the range due to the decreased power output, but you should still be able to get a couple of hundred meters Line-of-Sight (depending on channel congestion of course).

Other than the reduced transmit power, there is no difference between HW and W models. No difference at all on receive. I have a couple of W models here on indoor nodes that work fine (configured for 10mW). Unfortunately I botched a laptop migration and lost the source code of what's currently running on them though. From memory the only difference is the PAx settings.

It may be quite useful for you to join us on the #ukhasnet channel sometime ( http://webchat.freenode.net/?channels=ukhasnet ), debugging problems can be a lot quicker done in realtime!

Regards,

Phil

Jon Sowman

unread,
Sep 24, 2015, 6:09:19 PM9/24/15
to Steve Burg, UKHASnet
Steve,

You are correct in thinking PA0 should be on and PA1 and PA2 should be off for the -W models.

However, the change you noted in RFM69Config.h is not the only one required! The PA settings are also set during the send() procedure: https://github.com/UKHASnet/UKHASnet_Firmware/blob/master/arduino_sensor/RFM69.cpp#L173

Could you tell us exactly which firmware you are running at the moment?

Then I will be able to tell you which changes you need to make.

Jon

--
You received this message because you are subscribed to the Google Groups "UKHASnet" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ukhasnet+u...@googlegroups.com.
To post to this group, send email to ukha...@googlegroups.com.

Steve Burg

unread,
Sep 24, 2015, 8:31:48 PM9/24/15
to UKHASnet, sbur...@gmail.com, ph...@philcrump.co.uk
Phil,

The range is less than a meter. It is so low there's obviously an issue still. I am glad to hear the W models have enough range for use though!

Steve Burg

unread,
Sep 24, 2015, 8:49:01 PM9/24/15
to UKHASnet, sbur...@gmail.com
That was it!! Thanks Jon!

More testing!
Reply all
Reply to author
Forward
0 new messages