Beginner looking for advice

Started by Blue2swing, February 06, 2018, 08:55:08 AM

Blue2swing

#15
Thanks Felix. I reached out to Blebson like you suggested and invited him to the conversation. It turns out Blebson is using the exact same battery I am using (from the same seller as well). So that reassures me.

I should point out I am using the battery straight out of the box without charging it first. I'm reading the battery power level by connecting the leads of my cheap $10 multimeter to the leads of the battery (with nothing else connected to it). It reads 3.8v so I figured the charging was unnecessary. I've ordered a cheap Tp4056 USB charger and some SMD 2.7k resisters to adjust the constant current level to the data sheets suggestion. But they're coming from China, so it will be a slight wait :P. In the mean time I'm attempting to test the shields battery recharge ability by letting the unit sit on a windowsill with the solar panel attached.

As for the actions on pin D3. I unfortunately do not own an oscilloscope, or have any idea on how to use one. But it's something that I've known I will have to get in the future ( I figured I'd have to advance my skills further before getting to that point). However, there are videos online showing how to make home made oscilloscopes? Maybe I'll try that while I wait for the resisters to arrive :P

Felix

Quote from: Blue2swing on February 08, 2018, 07:45:17 PM
I unfortunately do not own an oscilloscope, or have any idea on how to use one. But it's something that I've known I will have to get in the future ( I figured I'd have to advance my skills further before getting to that point). However, there are videos online showing how to make home made oscilloscopes? Maybe I'll try that while I wait for the resisters to arrive :P
Please do not make your own scope  ;)
If you're getting into electronics, you should buy one. There was a recent discussion on what scope to buy on a budget, check it out!

Blue2swing

Well, im now the owner of a Rigol DS1054z Oscilloscope that I have no idea how to use... Amazon should be delivering it this Tuesday.

:)

LukaQ

Very good choice! You will learn very fast and I'm sure you will like it. Be sure to upgrade it also

Blue2swing

There is SO MUCH documentation online about this oscilloscope. Particularly here ( https://www.eevblog.com/forum/testgear/new-rigol-ds1054z-oscilloscope/). I'm sure I'm going to have a bunch of fun with this thing and I'm sure it will take me a while before I can go through all the features. Im excited for it to arrive tomorrow!

Changing the subject a bit, I have a home made Moteino (fully assembled) that I forgot to burn the boot loader on. Truth is I had no idea this was something I had to do when working with new ATmega328P-AU chips. My question is, can you burn the boat loader on the ATmega328P when it is attached to the Moteino and Radio (Will it affect the RFM69W radio)? Or do I have to remove the Atmega from the board?



Felix

Quote from: Blue2swing on February 11, 2018, 12:53:04 PM
My question is, can you burn the boat loader on the ATmega328P when it is attached to the Moteino and Radio (Will it affect the RFM69W radio)? Or do I have to remove the Atmega from the board?
Pull up D10 (aka SS for the radio) and it should work.

Blue2swing

You're Amazing!! Thank you, I just gave birth to a new moteino. Blink, Node, and Gateway sketches all seem to be working just fine :)

Blue2swing

Ok, the oscilloscope is in (still needs "upgrading" :) ) and I've spent some time reading and watching videos on how to use it. I'm still pretty clueless about the entire thing, but I'm looking forward to bettering my understanding on how these things work and how to use them. What I cannot find is how to connect a RFM69 to it to decode and monitor the signal. If anyone knows of a good link online that can help me out I would appreciate it! So far I keep finding videos of people analyzing the information after it has been received.

On a side note, I created 2 moteino R4's with attached RFM69W radios that are working perfectly on the first try. The moteino's R6 with RFM69CW radios still do not work with blebson's shield. Both are running the exact same code (and I removed the flash from the R6 to simplify things some. The R4's have no flash attached). Since I uploaded the bootloader from an Arduino Uno to the R4's I did the same with one of the R6's but still no luck. Now the led's for the R6 do not light up when powering on or when programming, but still function perfectly when called for in a sketch. The R4's I made have the same led behavior. I'm guessing it's due to the designated led pin being different for the Arduino Uno and Moteino.

Since the problem is only with the moteino R6 I've counted out blebsons shield as being part of the problem. And since the moteino R4 is virtually identical to the moteino R6 (without radio's attached) I have also counted out the moteino boards as being part of the problem. I'm now focusing on the radios (RFM69W vs RFM69CW). I believe both radios to be working, and have had some marginal success with the RFM69CW, but only when powered through a breadboard and walwart. I have success with the RFM69W 99.9% of the time.

Well, this is the part where everyone who has been helping me is going to be mad at me! The gateway running the esp8266 does not have an antenna attached. It does have a SMA to uFL adapter wire that is about 2 inches long (https://www.amazon.com/dp/B01AJQ33Y4?ref=yo_pop_ma_swf). After seeing the length of the moteino's antenna I incorrectly made the assumption that this should be long enough (the 915mhz antenna I ordered isn't scheduled to arrive till the end of the month, which is why I've been trouble shooting without one). Since then I've learned about wavelengths and antenna's having to be a quarter of the wavelength (in the case for 915mhz that's 3.15").

Here's what made me realize how important having the right antenna is... Even though the RFM69W is working 99.9% of the time (even with the esp gateway having no antenna ) I did originally  have some trouble on the initial setup after building the R4's. I was using a computer that is on the opposite side of the house as the gateway and was having no success. I don't know how it happened (just dumb luck I guess) but I accidentally connected a 5" wire to the ground connection of the shield (with moteino attached) that draped down and connected to nothing on the other end. I jumped when the servo moved as I was not expecting anything to happen. I then noticed this wire misplaced on the ground terminal and removed it. And Everything stopped working again!! Even though it made no sense to me I decided to add this seemingly useless wire back onto the ground terminal and SUCCESS, Again!! I did not understand what was happening at the time, but after some further research I believe I stumbled across (and accidentally created for myself) a dipole antenna.

To further gain some knowledge on antenna's I watching ladyada solder and debug an rfm device using an RF Analyzer ($20 at adafruit). I decided to do the same, And just got the Analyzer in today. I installing the software and set everything up to 915mhz on my computer. I had all 4 moteino's send signals to the gateway or one another using the gateway/node sketches and verified that they were all transmitting very strongly on 915mhz. I then tested the gateway by having the esp8266 gateway transmit to the moteino and could only find the faintest of signals. I'm surprised the RFM69W is having 99.9% success with such a weak signal. And can understand why the RFM69CW is having the opposite performance.

I'm looking forward to receiving the antenna for the esp gateway to test out my theory. However, this got me thinking about why the RFM69CW had some slight success when attached to a breadboard power supply only. I've read a couple things about signals being amplified by the ground plane and will look further into this in the next couple of days.

In the mean time I would like to learn to use the oscilloscope to test the RFM radios. Mainly to learn about using an oscilloscope. Any links, advice, walk through's would be greatly appreciated :).

Blue2swing

Here's what I'm going to try, let me know if I'm doing this wrong..

From the oscilloscope
Ch1 - connect probe to moteino pin D10 (and ground) to read SS/CS (slave/chip select). Is this the signal that id's which receiver you're trying to communicate with?

Ch2 - connect probe to moteino pin D13 (and ground) to show the clock that data transfer is being synchronized too.

Ch3 - connect probe to moteino pin D11 (and ground) to show MOSI (master out slave in?) data being transmitted out from the Master device (gateway) to the slave.

Ch4 - connect probe to moteino pin D12 (and ground) to show MISO (master in slave out?) data being transmitted out from the slave to the master device.

Blue2swing

#24
Well look at that....




Felix

Looks good :)
You're having lots of fun with your new gadgets!

Blue2swing

I definitely am Felix, and thank you for your help answering my questions. I wouldn't have the improved understanding of how this all works without your assistance.

The thumb antenna came in! It was advertised as working with 915mhz on eBay, and when I first placed it on the ESP gateway it worked with the RFM69CW! I was going to take a break from the project after hours and hours of very fun reading :). However the following day the RFM69CW stopped picking up the signal. I took out the spectrum analyzer and found the antenna wasn't making much of a difference on the signal (almost none at all). I further inspected the antenna and found 433Mhz molded on the side :(.

I have learned 433mhz and 915mhz radios have different lengths monopole antennas. My question is, Is there such a thing as a Thumb antenna that will work for both 433mhz and 915mhz? Or did I get the wrong antenna from eBay. One that will NOT work with my 915mhz radios?

I have since placed an order (on eBay again :P) for a 915mhz thump antenna. Question 2 is, will this new antenna work with the RFM69CW? At least as far as you can tell from the basic information provided. (2pcs 2dbi 915MHz Antenna SMA Male Transmit Router Module Wireless Polarity 4.8cm https://rover.ebay.com/rover/0/0/0?mpre=https%3A%2F%2Fwww.ebay.com%2Fulk%2Fitm%2F201667682217).

Lastly, I previously stated that the ESP gateway was hardly transmitting a single without an antenna. On the spectrum analyzer I ended up finding a huge signal from the gateway. It turns out I was just looking in the wrong place. I was looking near 915mhz and ended up finding the signal at 919mhz. Both the RFM69W and RFM69CW are transmitting around 914mhz. I've read there is a way to tune the radios signal through code. I'm going to do some more reading on this while I wait for the new antenna to arrive. If the new antennas signal is not picked up by the RFM69CW I'll try tuning the esp-Gateway radio to 914mhz. (Truth is I have enough RFM69W's and extra material to make all the moteino R4's that I need for this project. But I'm enjoying the troubleshooting and reading involved with trying to get the RFM69CW to work as well :) )

Blue2swing

Changing the frequency was a lot easier than I thought. In RFM69.cpp just change the 915 in
RF_FRFMSB_915,
RF_FRFMID_915,
and
RF_FRFLSB_915,
to the frequency that you want. The spectrum analyzer confirmed the change.

Nice job on the library by the way. All the extra notes really made it easy to understand what is going on.

TomWS

#28
Quote from: Blue2swing on February 28, 2018, 02:40:40 AM
Changing the frequency was a lot easier than I thought. In RFM69.cpp just change the 915 in
RF_FRFMSB_915,
RF_FRFMID_915,
and
RF_FRFLSB_915,
to the frequency that you want. The spectrum analyzer confirmed the change.

Nice job on the library by the way. All the extra notes really made it easy to understand what is going on.
Sure you could do that, or, you could simply call radio.setFrequency(to_the_frequency_that_you_want);  in setup() [update: AFTER radio.initialize()].

Tom


Blue2swing

Thanks TomWS. That's much easier!