LowPowerLab Forum

Hardware support => Moteino => Topic started by: Blue2swing on February 06, 2018, 08:55:08 AM

Title: Beginner looking for advice
Post by: Blue2swing on February 06, 2018, 08:55:08 AM
Hello Everyone. Im new to the Moteino world and have some questions, but am mainly looking for some direction with getting started. I ordered 2 Moteinos about a Month ago and am just getting around to playing with them. I'v attempted to upload a sketch, written by a different user, to each Moteino but am having no success (Maybe some success.... I'm not sure  ;))

Here's the links for the project I'm following,
Github: https://github.com/blebson/Automated-Blinds (https://github.com/blebson/Automated-Blinds)
DIY Project Page: https://community.smartthings.com/t/battery-powered-solar-recharged-automated-blinds/99717/1 (https://community.smartthings.com/t/battery-powered-solar-recharged-automated-blinds/99717/1)

Here's details on the equipment I have and where I am at so far...
1 - Moteino R6 with a wire antenna accompanied by a RFM69W and on board flash memory
1 - Moteino R6 with a trace antenna, also accompanied with a RFM69W and flash memory chip
1 - Hallard's RFM69 ESP Gateway with RFM69W ( https://github.com/hallard/WeMos-RFM69 (https://github.com/hallard/WeMos-RFM69) ) that I assembled.
1 - Wemos D1 mini
1 - Homemade Moteino R4
1 - UART TTL CP2102 with a pin soldered to the RST pinout
1 - 3.7v 2200mah LiPo Battery (3.8v out of the box)
1 - 3.3v Breadboard power Supply
1 - lebson Solar/Battery powered Moteino Shield to power Servo
Arduino IDE
and Lots of TIME

Here's where I'm at....

I've attached the wire antenna and pins to the R6 I purchased from Felix. UPDATE: Disregard the following strikethrough text (I don't know what I'm talking about  :)) I've let smoke out of the breadboard power supply several times. after switching both Moteinos to USB power this behavior stopped. Out of the box when I applied 3.3v via the power supply the on board led would blink once then turn off. I found if I shut off power for 2 seconds and turned it back on the led would blink once every second continuously. And if I cycled the power again for another 2 seconds the led would only blink once again. Power cycle again for 2 seconds and led would go back to blinking once every second, and so on... I'm assuming when the led is blinking once every second it is running a test sketch written onto the Moteino by Felix, I'm guessing the one that increments letters and numbers as it loops through the alphabet ( https://youtu.be/jRVuU7rZqC4 (https://youtu.be/jRVuU7rZqC4) ) UPDATE: This alphabet sketch is the same as the Gateway.ino and Node.ino sketches in the Lowepowerlab Github linked on this post. I'm curious as to what the Moteino is doing on the power cycles when the led blinks only once?

I've uploaded Blebson's  "WeMos-RF-Base.ino" to the (Hallard's) gateway i built (using a USB cable to my computer). And I THINK I uploaded the "RF_Blinds.ino" sketch to the Moteino R6 using a TTL UART CP2102 converter like so,

UPDATE: TESTED OUT THE CP2102 BY UPLOADING FELIX'S BLINK SKETCH TO THE R6. ALL WORKED OUT OK. THE MODIFIED CP2102 IS WORKING FINE WITH THE WIRING BELOW.
    --------------RTS\
   |                         \
------------               \               ----------------
               | -DTR       \--- DTR--|
               |-----RX ---------TX--|
  CP2102  |-----TX----------RX--|      MOTEINO R6
               |-+5V        / ----3V3-|       
               |----GND--/--\          |
               |----3V3 -/     \-GND-|
------------                                -----------------

I originally attempted to connect DTR to DTR but kept getting an Error in the Arduino IDE when uploading a sketch. So I soldered a pin into RTS and gave that a shot. IT WORKED!! I think  ???.
The Arduino IDE said the sketch completed uploading, however, there was no progress bar in the IDE and no blinking lights in the Moteino during the upload?
UPDATE: UPLOAD WORKED, SEEMS NO PROGRESS BAR IS NORMAL. THE ON BOARD LED DID BLINK, I GUESS I JUST MISSED IT.
Is this normal?...  I'm assuming things worked out because when I access the Web server created by the D1 mini and request it to send a command to the Moteino I get a "Success" or "Fail" message (programmed in by Blebson). Strangely enough I get a "Success" message when I have the Moteino R6 connected to the 3v3 breadboard power supply, and get a "Fail" message when the Moteino R6 is connected to the 3.7v 2200mah Lipo Battery (with battery reading 3.8v on the multimeter).

Well..... none of this really matters because I realized I need to slow down and start from the start, one step at a time  ::)

So my next method of action is going to be to attempt to make 2 Moteinos talk to one another. I'm planning to use the 2 R6's that I purchased from Felix for this as I know he test's his boards before delivery. I will attempt to use the Gateway.ino and Node.ino from the Lowpowerlab Github for this ( https://github.com/LowPowerLab/RFM69/tree/master/Examples (https://github.com/LowPowerLab/RFM69/tree/master/Examples) ). And I also purchased an actual FTDI to usb adapter to be safe. After a successful transfer of data I will attempt to repeat the process with my home made Moteino to test my first attempts at SMD soldering.

UPDATE: The ATmega328p-AU I purchased have no bootloader. I've now purchased a Arduino Uno to copy the Bootloader over to my homemade Moteino (DIY page: http://www.instructables.com/id/Rapid-programming-of-Atmega-328-TQFP-and-DIP-chips/ (http://www.instructables.com/id/Rapid-programming-of-Atmega-328-TQFP-and-DIP-chips/)) No Idea what a bootloader is, just know I need one  ;)

Afterwords I'm planning to moving on to attempt communication from the R6 to the (Hallard) RFM69 Gateway using Blebsons sketch (again, I'm worried, not about the sketch, but for the functionality of the board as this is my first SMD creation. Everything seems to light up now, but I'm really not sure what exactly I am looking for to know this is working correctly  :P. And finally I will try to get the home made Moteino talking to the home made RFM69 Gateway, running the same Blebson sketch, for my own personal satisfaction  ;D.

My questions are as follows,

1. Does the Moteino's on board led blink during upload? What am I looking for for visual confirmation that things are working?
ANSWER: Yes it does! It just happens SO FAST. Moteino sketch uploads are fairly quick compared to the Esp8266 using the same IDE.
2. what is the size wire and length for the wire antenna? I need one for the home made Moteino
3. When Running the Gateway and Node sketches, what am I looking for in the Serial Monitor? and do I just select the port in the IDE, and open Serial Monitor to baud 115200?
ANSWER: Yes, upload the Node.ino to one Moteino, and the Gateway.ino to another Moteino (Be sure to adjust the settings in the sketch as explained by Felix for your Moteino's before the upload). Open Serial Monitor at Baud rate 115200 and watch the magic happen. You can select the Port for the sending Moteino to see the info being sent. Or you can switch Ports (in the Arduino IDE) to the receiving Moteino and watch the info display as its being received. Led's on both Moteino's should be blinking each time information is sent from one to the other.
4. If I wrote over the sketch that sends the alphabets and numbers in a loop where can I get a copy of it to upload and play with on the Moteino?
ANSWER: These are the Gateway.ino and Node.ino sketches from the Lowpoowerlab Github page.
5. I have questions about the "failure" message I am getting when running off the battery and the "Success" message when on a power supply, but do not know exactly what I am asking myself, lol. Dont worry about this one. I will come back to this after more testing and a recharge of the battery.

6. Any direction/suggestion you have to help me get started on this journey will be appreciated. Thanks for all your help guys and sorry about the rambling I've been sitting at work for a long time tonight doing nothing!!  ;D






Title: Re: Beginner looking for advice
Post by: Blue2swing on February 06, 2018, 09:35:47 AM
One last thing! SpaceX's Falcon Heavy is launching today at 1:30pm eastern time. Don't miss it! I know I'm not the only one exited about this :D
Title: Re: Beginner looking for advice
Post by: LukaQ on February 06, 2018, 11:53:14 AM
Quote from: Blue2swing on February 06, 2018, 08:55:08 AM
Hello Everyone. Im new to the Moteino world and have some questions, but am mainly looking for some direction with getting started. I ordered 2 Moteinos about a Month ago and am just getting around to playing with them. I'v attempted to upload a sketch, written by a different user, to each Moteino but am having no success (Maybe some success.... I'm not sure  ;))

Here's the links for the project I'm following,
Github: https://github.com/blebson/Automated-Blinds (https://github.com/blebson/Automated-Blinds)
DIY Project Page: https://community.smartthings.com/t/battery-powered-solar-recharged-automated-blinds/99717/1 (https://community.smartthings.com/t/battery-powered-solar-recharged-automated-blinds/99717/1)

Here's details on the equipment I have and where I am at so far...
1 - Moteino R6 with a wire antenna accompanied by a RFM69W and on board flash memory
1 - Moteino R6 with a trace antenna, also accompanied with a RFM69W and flash memory chip
1 - Hallard's RFM69 ESP Gateway with RFM69W ( https://github.com/hallard/WeMos-RFM69 (https://github.com/hallard/WeMos-RFM69) ) that I assembled.
1 - Wemos D1 mini
1 - Homemade Moteino R4
1 - UART TTL CP2102 with a pin soldered to the RST pinout
1 - 3.7v 2200mah LiPo Battery (3.8v out of the box)
1 - 3.3v Breadboard power Supply
1 - lebson Solar/Battery powered Moteino Shield to power Servo
Arduino IDE
and Lots of TIME

Here's where I'm at....

I've attached the wire antenna and pins to the R6 I purchased from Felix. Out of the box when I applied 3.3v via the power supply the on board led would blink once then turn off. I found if I shut off power for 2 seconds and turned it back on the led would blink once every second continuously. And if I cycled the power again for another 2 seconds the led would only blink once again. Power cycle again for 2 seconds and led would go back to blinking once every second, and so on... I'm assuming when the led is blinking once every second it is sending a test sketch written onto the Moteino by Felix, I'm guessing the one that increments letters and numbers as it loops through the alphabet ( https://youtu.be/jRVuU7rZqC4 (https://youtu.be/jRVuU7rZqC4) ). I'm curious as to what the Moteino is doing on the power cycles when the led blinks only once?

I've uploaded Blebson's  "WeMos-RF-Base.ino" to the (Hallard's) gateway i built (using a USB cable to my computer). And I THINK I uploaded the "RF_Blinds.ino" sketch to the Moteino R6 using a TTL UART CP2102 converter like so,

UPDATE: TESTED OUT THE CP2102 BY UPLOADING FELIX'S BLINK SKETCH TO THE R6. ALL WORKED OUT OK. THE MODIFIED CP2102 IS WORKING FINE
    --------------RTS\
   |                         \
------------               \               ----------------
               | -DTR       \--- DTR--|
               |-----RX ---------TX--|
  CP2102  |-----TX----------RX--|      MOTEINO R6
               |-+5V        / ----3V3-|       
               |----GND--/--\          |
               |----3V3 -/     \-GND-|
------------                                -----------------

I originally attempted to connect DTR to DTR but kept getting an Error in the Arduino IDE when uploading a sketch. So I soldered a pin into RTS and gave that a shot. IT WORKED!! I think  ???.
The Arduino IDE said the sketch completed uploading, however, there was no progress bar in the IDE and no blinking lights in the Moteino during the upload?
UPDATE: UPLOAD WORKED, SEEMS NO PROGRESS BAR IS NORMAL.
Is this normal?...  I'm assuming things worked out because when I access the Web server created by the D1 mini and request it to send a command to the Moteino I get a "Success" or "Fail" message (programmed in by Blebson). Strangely enough I get a "Success" message when I have the Moteino R6 connected to the 3v3 breadboard power supply, and get a "Fail" message when the Moteino R6 is connected to the 3.7v 2200mah Lipo Battery (with battery reading 3.8v on the multimeter).

Well..... none of this really matters because I realized I need to slow down and start from the start, one step at a time  ::)

So my next method of action is going to be to attempt to make 2 Moteinos talk to one another. I'm planning to use the 2 R6's that I purchased from Felix for this as I know he test's his boards before delivery. I will attempt to use the Gateway.ino and Node.ino from the Lowpowerlab Github for this ( https://github.com/LowPowerLab/RFM69/tree/master/Examples (https://github.com/LowPowerLab/RFM69/tree/master/Examples) ). And I also purchased an actual FTDI to usb adapter to be safe. After a successful transfer of data I will attempt to repeat the process with my home made Moteino to test my first attempts at SMD soldering.

UPDATE: The ATmega328p-AU I purchased have no bootloader. I've now purchased a Arduino Uno to copy the Bootloader over to my homemade Moteino (DIY page: http://www.instructables.com/id/Rapid-programming-of-Atmega-328-TQFP-and-DIP-chips/ (http://www.instructables.com/id/Rapid-programming-of-Atmega-328-TQFP-and-DIP-chips/)) No Idea what a bootloader is, just know I need one  ;)

Afterwords I'm planning to moving on to attempt communication from the R6 to the (Hallard) RFM69 Gateway using Blebsons sketch (again, I'm worried, not about the sketch, but for the functionality of the board as this is my first SMD creation. Everything seems to light up now, but I'm really not sure what exactly I am looking for to know this is working correctly  :P. And finally I will try to get the home made Moteino talking to the home made RFM69 Gateway, running the same Blebson sketch, for my own personal satisfaction  ;D.

My questions are as follows,

1. Does the Moteino's on board led blink during upload? What am I looking for for visual confirmation that things are working?
2. what is the size wire and length for the wire antenna? I need one for the home made Moteino
3. When Running the Gateway and Node sketches, what am I looking for in the Serial Monitor? and do I just select the port in the IDE, and open Serial Monitor to baud 115200?
4. If I wrote over the sketch that sends the alphabets and numbers in a loop where can I get a copy of it to upload and play with on the Moteino?
5. I have questions about the "failure" message I am getting when running off the battery and the "Success" message when on a power supply, but do not know exactly what I am asking myself, lol. Dont worry about this one. I will come back to this after more testing and a recharge of the battery.

6. Any direction/suggestion you have to help me get started on this journey will be appreciated. Thanks for all your help guys and sorry about the rambling I've been sitting at work for a long time tonight doing nothing!!  ;D
1. I don't think so, you might want to check videos from Felix, where moteino is visible.
2. Wire size will have to be pretty much the one you can find and you can solder it to moteino. Length will be dependent on your freq. you will use. There are at least 433,868 and 915MHz, which one do you have?
3. Yes. One side will print very little each time, I think it prints "Ok!". Other side will receive "123 ABCDEFGHIJKLMNOPQRSTUVWXYZ" like 1
12
123
1234......

4 and 5 I can't help

And one more thing, if you don't have 8MHz moteino (which doesn't have onboard regulator), you really should supply it with 5v (if you have standard moteino, which has regulator onboard)
Title: Re: Beginner looking for advice
Post by: Blue2swing on February 06, 2018, 12:30:20 PM
Thank you LukaQ. Im using the RFM69W 915MHz. The wire antenna Felix provided with the R6 I purchased is Copper, about 3 inches long, and maybe 26awg. Being almost completely clueless about these radios am not sure if there is something special I should look for when making a similar antenna for my home made Moteino R4? If you have the exact length and wire gage I would appreciate it!!

Right now I have 2 Moteino R6's communicating with each other using the Gateway.ino and Node.ino sketches. These little led's are just flashing away like crazy. It's quite the light show  ;D, and very rewarding after so much exciting work! Now I'm regretting having to replace the sketches to move forward and attempt to communicate with the Esp-Wemo-D1 mini Gateway (with attached RFM69W 915MHz).  :'(
Title: Re: Beginner looking for advice
Post by: LukaQ on February 06, 2018, 02:17:19 PM
Quote from: Blue2swing on February 06, 2018, 12:30:20 PM
Thank you LukaQ. Im using the RFM69W 915MHz. The wire antenna Felix provided with the R6 I purchased is Copper, about 3 inches long, and maybe 26awg. Being almost completely clueless about these radios am not sure if there is something special I should look for when making a similar antenna for my home made Moteino R4? If you have the exact length and wire gage I would appreciate it!!

Right now I have 2 Moteino R6's communicating with each other using the Gateway.ino and Node.ino sketches. These little led's are just flashing away like crazy. It's quite the light show  ;D, and very rewarding after so much exciting work! Now I'm regretting having to replace the sketches to move forward and attempt to communicate with the Esp-Wemo-D1 mini Gateway (with attached RFM69W 915MHz).  :'(
wire size not that important, length very, copy it over to new one(s). Length will be the same on all of them, if all (of course) are the same freq. at 915MHz. You can use about the same gauge of wire +/- size.

I know what you mean, yes :D BUUT, now you get to work on something you will have use of. You can always buy or make more moteinos, then fun get to a next level.
I have few running for almost a year, but I still have two spare I can experiment with, mostly wit different antennas (dipoles, not just monopoles like you have now wit simple wire)
The best thing is, now that you have one thing working, you can reprogram them to something new, maybe even PI gateway to collect data

There are so many things you can do, like read temp. inside/outside, humidity, pressure, power consumption read from meter (if you live in house), water consumption and much more like turning on/off lights... I'm just saying, what you have working now is nothing compared to what you can have
Title: Re: Beginner looking for advice
Post by: Felix on February 06, 2018, 02:29:57 PM
Blue2swing, welcome to the forum, sounds like you're having fun!  :)
Sorry I'm late to the thread, looks like lots of your initial questions were addressed or figured out, if you can recap anything outstanding that you need any help with, that would be great.
Thanks!
Title: Re: Beginner looking for advice
Post by: sparky on February 06, 2018, 04:37:29 PM
Quote from: Blue2swing on February 06, 2018, 09:35:47 AM
One last thing! SpaceX's Falcon Heavy is launching today at 1:30pm eastern time. Don't miss it! I know I'm not the only one exited about this :D

Thanks for the reminder!
Title: Re: Beginner looking for advice
Post by: Blue2swing on February 06, 2018, 05:32:42 PM
@LukaQ Thanks again! That's exactly what I needed to know. I'll match the length to the wire antenna I already have. And I know what you mean about finding many uses for these things. I first found out about Raspberry Pi's 2 years ago and used one to control my old home alarm system with my phone by using Nodejs. While doing further research on the Raspberry Pi's I kept running into this thing called an Arduino. So I bought a couple and ended up making a remote garage door lock (of which I bought and connected all the components myself. No breadboard, just 3d printed a box with slots to hold all the components and soldered and screwed everything together). While doing research on the Arduino I ran into this thing called a Moteino, which led me here. Now I'm trying to see what I can learn and create in the process.

I know I'm late to the microprocessor game, but I'm having a lot of fun trying to catch up with everyone else  :)


@Felix, Thanks for any help you can provide and for making such a cool little board. I think I've figured out the answer to most of my own questions this morning while waiting for the Falcon Heavy to launch. The step I'm having difficulty with right now is having the Wemos D1-mini (esp8266) talk to the (Hallard) RFM69W Gateway shield so it can send a message via RFM to a Moteino running the same frequency Radio. I may have to direct this question directly to Hallard himself. I believe he's got a blog at https://hallard.me/ (https://hallard.me/), and I've seen his post's at mySensors. Or I could also ask Blebson, since he has figured it out already, as he wrote the sketch that I'm using. My only concern is that my Gateway board is Not functioning completely. I'm new to Hot air soldering and heated up the board quite liberally when soldering the SMD components. It was only after I was done that by chance I came across a video on youtube advising that excessive heat can damage SMD components. So, If you have any advice on troubleshooting SMD components on and off a board I'm sure that is knowledge that will stay with me for years to come!! Plus, I'm sure I'm going to have ton's of coding questions as I continue to progress with this new hobby.


@sparky, wasn't It amazing!!??  ;D. Watching that rocket launch made me feel like a little kid looking up at the stars again.



Title: Re: Beginner looking for advice
Post by: sparky on February 06, 2018, 05:38:14 PM
Quote from: Blue2swing on February 06, 2018, 05:32:42 PM
@sparky, wasn't It amazing!!??  ;D. Watching that rocket launch made me feel like a little kid looking up at the stars again.

Yes it was, I love that stuff
Title: Re: Beginner looking for advice
Post by: Felix on February 06, 2018, 07:01:55 PM
Blue2swing,
Thanks for the feedback, appreciated :)
And you're at the right place to learn, the internet :)
Besides, this little corner here (LPL site and forums) can be at least a little helpful in all subjects of electronics.

With SMD it's a steep learning curve. With soldering in general, too much heat too long would damage a component. Getting that skill to heat enough, uniformly, to make a great solder joint or get something desoldered, takes time and patience, and some screw ups. But it's fun!

BTW congrats for your other earlier projects!
Title: Re: Beginner looking for advice
Post by: LukaQ on February 07, 2018, 02:54:24 AM
As it turns out (kinda forgot)
I have BME and BMP 280 on wemod d2 with rfm69hw

Since arduino IDE is that great already, you can make your sketch work on moteino, then probably without problem use it on D1 mini.
What I don't know is, why will you use that gateway? will that be your endpoint, serve webpage or send data somewhere? you won't use PI?
Title: Re: Beginner looking for advice
Post by: Blue2swing on February 07, 2018, 11:40:32 AM
@LukaQ, the D1 mini's web server is accessed by my Smartthings home automation system, and the smart automation system is connected to my Amazon echo. So with my voice I tell Alexa to open the blinds, Alexa will send a command to the smartthings hub advising to close the blinds, Smartthings will access a specific webpage address on the esp D1 mini's server that lets it k ow the blinds need to be closed, the D1 mini then tells the gateway to send the command via 915MHz RF to the moteino mounted inside my home blinds, and the moteino receives the command and runs a servo to close the blinds. The whole thing has been organized and set up by User Blebson. It's a nice little set up I'm trying to replicate :). Which reminds me, I need to email him about my trouble with the gateway shield and see what he thinks .
Title: Re: Beginner looking for advice
Post by: LukaQ on February 07, 2018, 12:52:39 PM
Ah I see, wifi gateway then. In the end it's not that important if it is endpoint or not, as long you it delivers data correct way.
Title: Re: Beginner looking for advice
Post by: Blue2swing on February 08, 2018, 07:39:30 AM
Thanks LukaQ for all your help and everyone else who has pitched in! I continued to trouble shoot my project today and was able to figure out that the ESP Gateway is working perfectly! :)!! I'm so EXCITED.

And after more tinkering I was finally able to get the servo to move by accessing an Http address on the ESP's web server.

But I'm still not out of the woods yet ;).

I was only able to successfully replicate Blebsons project when the moteino was powered by a breadboard power supply (3.3v), but not when powered with a 3.7v lipo battery (to Vin). What I ended up doing was placeing the moteino on the breadboard with jumper wires from Vin and Gnd to the breadboard power supply. Then I used about 30 more jumper wires to connect all additional inputs and outputs to Blebsons shield. I connected the Lipo battery and the solar panel to the shield, connected All the grounds together from all power sources (lipo, solar panel, breadboard power supply). At first there was still nothing, so I started testing by removing one wire at a time and retrying to send a message. I found out when the D3 pin is connected from the shield to the moteino the RFM69W stops communicating. But when D3 is not connected everything WORKS PERFECTLY!! Servo moves, I get a "Success" message back from the web server along with battery voltage readings, and charging status! Then I reconnect a jumper from D3 on the shield to D3 on the moteino and FAILURE again :(.

So I realized 2 things.... Possibly 1 thing ( they may both be connected). 1) I'm pretty sure these 3.7v 2200mah 8.14Wh (E435583) Lipo battery's I bought on eBay may be the problem. 2) pin D3 on the shield sends an interrupt signal to D3 on the Moteino to wake it when a toggle switch is pressed. I think D3 is being accidentally activated due to power leakage At a NPN transistor that may possibly be interrupting the RFM69W from working correctly... (I don't know, this second one is a wild guess for now. At least till I can do some more reading on the matter and additional testing. But my gut is telling me the problem is just the battery and nothing more. I'm hoping when I try a different battery (possibly several Duracell alkaline just for a temp test) the issue with pin D3 resolves on its own.

So my question for anyone who is listening is,
1.what kind of battery would you recommend for a moteino?
2. Is there anything to look out for? Anything to stay away from?
3. My Lipo battery continuously reads 3.8v after 2 days of testing. Is there any reason I should assume that the actual voltage is much lower? I get the feeling it's lower because the moteino works great on the lower 3.3v power supply, and the onboard LDO is putting out 3.3v when the battery is connected, but still the radio fails to connect. :(

Thanks again guys :)! This is a lot of fun. I may be spending too much time on this project and neglecting the outside world. lol. Anyone else have that problem, or is it just me?

Title: Re: Beginner looking for advice
Post by: Felix on February 08, 2018, 11:02:14 AM
Quote from: Blue2swing on February 08, 2018, 07:39:30 AM
But I'm still not out of the woods yet ;).

I found out when the D3 pin is connected from the shield to the moteino the RFM69W stops communicating. But when D3 is not connected everything WORKS PERFECTLY!! Servo moves, I get a "Success" message back from the web server along with battery voltage readings, and charging status! Then I reconnect a jumper from D3 on the shield to D3 on the moteino and FAILURE again :(
Maybe something Blebson can address since it's his shield design? maybe PM to report the issue and invite him to the conversation?

Quote from: Blue2swing on February 08, 2018, 07:39:30 AM
So I realized 2 things.... Possibly 1 thing ( they may both be connected). 1) I'm pretty sure these 3.7v 2200mah 8.14Wh (E435583) Lipo battery's I bought on eBay may be the problem. 2) pin D3 on the shield sends an interrupt signal to D3 on the Moteino to wake it when a toggle switch is pressed. I think D3 is being accidentally activated due to power leakage At a NPN transistor that may possibly be interrupting the RFM69W from working correctly...  I'm hoping when I try a different battery (possibly several Duracell alkaline just for a temp test) the issue with pin D3 resolves on its own.
I suggest doing more empirical testing on that. I don't have reasons to believe a battery should cause this. At least get an opinion from the creator of the shield. Otherwise a scope would help a lot in seeing what's going on with D3. Make sure the interrupt is setup according to the HIGH/LOW transition of the interrupt signal edge transition.
[/quote]

Quote from: Blue2swing on February 08, 2018, 07:39:30 AM
So my question for anyone who is listening is,
1.what kind of battery would you recommend for a moteino?
2. Is there anything to look out for? Anything to stay away from?
3. My Lipo battery continuously reads 3.8v after 2 days of testing. Is there any reason I should assume that the actual voltage is much lower? I get the feeling it's lower because the moteino works great on the lower 3.3v power supply, and the onboard LDO is putting out 3.3v when the battery is connected, but still the radio fails to connect. :(
1. Anything that works for your requirements. Lipos are great energy density, but chinese ones can act up at extreme temps (also a hazard if charged at high currents). They don't like freezing, see my blog for that. If you plan to power Moteinos for low power, choose something above the LDO 3.3v+dropout, stay at least above 3.6V, otherwise it will work but drain a few hundred uA more than usual.
2. Stay away from hazardous batteries if you can, if budget permits, and if requirements dictate it. Otherwise lipos are popular and work OK in most conditions, charge them gently etc.
3. I don't think so. How do you read the battery?
Title: Re: Beginner looking for advice
Post by: Blue2swing on February 08, 2018, 07:45:17 PM
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
Title: Re: Beginner looking for advice
Post by: Felix on February 09, 2018, 09:14:24 AM
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 (https://lowpowerlab.com/forum/general-topics/owon-vds1022i-oscilloscope/)!
Title: Re: Beginner looking for advice
Post by: Blue2swing on February 10, 2018, 06:48:03 AM
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.

:)
Title: Re: Beginner looking for advice
Post by: LukaQ on February 10, 2018, 08:37:37 AM
Very good choice! You will learn very fast and I'm sure you will like it. Be sure to upgrade it also
Title: Re: Beginner looking for advice
Post by: Blue2swing on February 11, 2018, 12:53:04 PM
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?


Title: Re: Beginner looking for advice
Post by: Felix on February 11, 2018, 01:17:52 PM
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.
Title: Re: Beginner looking for advice
Post by: Blue2swing on February 11, 2018, 04:02:35 PM
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 :)
Title: Re: Beginner looking for advice
Post by: Blue2swing on February 18, 2018, 07:04:10 AM
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 :).
Title: Re: Beginner looking for advice
Post by: Blue2swing on February 18, 2018, 10:08:00 AM
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.
Title: Re: Beginner looking for advice
Post by: Blue2swing on February 18, 2018, 12:43:38 PM
Well look at that....

(https://preview.ibb.co/jGkkMS/IMG_0717.jpg)

(https://preview.ibb.co/hnNUFn/IMG_0716.jpg) (https://ibb.co/fFnwvn)
Title: Re: Beginner looking for advice
Post by: Felix on February 18, 2018, 06:06:08 PM
Looks good :)
You're having lots of fun with your new gadgets!
Title: Re: Beginner looking for advice
Post by: Blue2swing on February 27, 2018, 12:28:54 PM
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 :) )
Title: Re: Beginner looking for advice
Post by: 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.
Title: Re: Beginner looking for advice
Post by: TomWS on February 28, 2018, 07:30:26 AM
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

Title: Re: Beginner looking for advice
Post by: Blue2swing on February 28, 2018, 02:55:07 PM
Thanks TomWS. That's much easier!