what I would like to see ....

Started by oric_dan, January 06, 2016, 10:47:47 PM

WhiteHare

#15
Quote from: joelucid on January 09, 2016, 04:41:02 AM
I like the idea of a very light-weight gateway that only transcodes between radio and IP. Then do the heavy lifting either on a Pi or in the cloud.

Imagine smth like code bender, only you don't hook anything up to your laptop. Installs happen via wireless updates and you also develop your backend directly in the tool. All that's necessary at home is a battery of Moteino's and a tiny IP GW, possibly just a Moteino with attached ESP8266.

Joe

Yup, and it nearly already exists.  Connect your Moteino wireless gateway to an ESP8266 (I'm using an ESP13) using ESP-Link.  That creates a virtual serial link between the wireless Moteino gateway and Felix's Pi gateway (or whatever you're using).  You can continue to do wireless programming of Moteino's using msjfb's wonderful GUI tool (https://lowpowerlab.com/forum/index.php/topic,1056.0.html).  You can wirelessly reprogram the Moteino wireless gateway a little differently, using an ESP-Link tool.

That all works without a hitch.  The only part I haven't yet tried is the part I was least worried about, which is virtualizing the serial connection on the Pi itself, so that those communications are automatically routed through the ESP8266's IP address between the Pi and the Moteino wireless gateway.  I'm quite sure that part can be made to work though, because I've already been able to putty over IP with the ESP8266 and have it be the same as a direct serial connection to the Moteino wireless gateway.

[Edit:  Of course, if Felix wanted to, he could  add that capability directly to his Pi gateway code, and then it could work directly and more elegantly (similar to what msjfb did) without the need for this extra step.   To what end?  Well, if he wanted to, he could package up a liteweight gateway and add it to his store.  :)  It's all open source anyway.  Though it's really not hard to DIY, it will of course be even easier to just buy something and save the hassle, knowing that it will immediately "just work."]

[P.S.: I forgot to mention that the ESP8266 firmware is itself wirelessly programmable too.  So, literally everything in the entire chain is now wirelessly programmable.  No need to carry anything back to plug-in to your computer.  :)]

oric_dan

Quote from: joelucid on January 09, 2016, 04:41:02 AM
On the other hand at least with 433Mhz the Pi just causes too much interference. Costs me easily an impact of -15 in RSSI at times. I like the idea of a very light-weight gateway that only transcodes between radio and IP. Then do the heavy lifting either on a Pi or in the cloud.

Imagine smth like code bender, only you don't hook anything up to your laptop. Installs happen via wireless updates and you also develop your backend directly in the tool. All that's necessary at home is a battery of Moteino's and a tiny IP GW, possibly just a Moteino with attached ESP8266.

I've not tried the RPi with RFM radios, but good to know about the interference issue. Not too surprising, considering the Pis use 700-1000 MHz clocks. I wonder if there is any interference problem with putting an RFM radio and ESP8266 a few inches apart on the same Moteino gateway board, such as we've been discussing. ??

And I hope the ESP8266 firmware is a little more reliable than when I tried it a year or so ago. ?? People on the Arduino forum were having all sorts of reliability problems, crashing after running for a while, &etc.

WhiteHare

#17
Quote from: oric_dan on January 09, 2016, 02:46:30 PM
I wonder if there is any interference problem with putting an RFM radio and ESP8266 a few inches apart on the same Moteino gateway board, such as we've been discussing. ??


That's an intersting question.  If anyone has some test code they'd like me to run that measures baseline RSSI value, or whatever, on the Moteino, I'd be happy to run it and post the results, both with and without an ESP13 turned-on nearby.  I'm not volunteering to write the test code though, even though it probably wouldn't be very hard to write.

The newer modules, including the ESP13 and ESP12, do come with metal lids soldered to ground, so maybe they throw off less noise than those that don't.  At a superficial level, the ESP13 module looks pretty much the same as the expressif module which allegedly did pass FCC.  I do wonder how much noise/harmonics RFM's are shedding, as some other Semtech module venders do use metal lids.  There is a test report posted on the HopeRF website which is positioned to mollify those potential concerns....

joelucid

QuoteIf anyone has some test code they'd like me to run

You could just take Felix' gateway sample sketch and monitor the RSSI values it reports on the serial. Then switch on the 8266 with wifi traffic and see if anything changes.

joelucid

Quoteusing ESP-Link

I probably wouldn't use esp-link but write some code for the 8266 directly to talk to the radio and relay between radio/wifi. Maybe add some caching support for wireless updates if the backend runs in the cloud. Should all be fairly simple.

oric_dan

#20
Speaking of metal cover shields, I just received this board a couple of days ago, to make another stab at using the ESP8266, just to see how it works. I wanted something I could just plug into a UNO board, and not mess with those silly jumper wires hanging all over the darn place.  Note - it did take Banggood over 1-month to deliver the thing to the US.
http://www.banggood.com/ESPDuino-Development-Board-ESP-13-WiFi-UNO-R3-from-ESP8266-p-1023370.html

EDIT: sorry, this is the board I received, not the other one,
http://www.banggood.com/ESP8266-Web-Server-Port-WiFi-Expansion-Board-ESP-13-Compatible-With-Arduino-p-1008124.html

joelucid

QuoteI like the idea of a very light-weight gateway that only transcodes between radio and IP.

The more I think about it the more I like it - if it works out interference wise. No question as time goes on one will want to add all kinds of radios to the mix. See recent LoRa discussions. Or I will likely add 866Mhz to keep underground wide band antenna size manageable. With this approach it becomes very simple - just add another light weight radio/wifi gateway. No need to fiddle with the Pi or it's MightyHat.

The other use case this would support: I have two scenarios which hog the radio for long periods of time: (a) listen mode wakeup bursts and (b) controlling 433mhz rf plugs (to a much lesser degree). I currently use AC based nodes that aren't that busy for this sort of stuff - like the bathroom fan controller. But for the general case it would be much nicer to just add another radio to the light weight gw and keep all nodes available at all times.

With a second radio I could use wakeup bursts much more aggressively. For example a coin cell based mote could communicate directly with another one by using the gw to relay the package using the wakeup burst mechanism or similarly I could have coin cell nodes switch ac-plugs using the gw.


WhiteHare

Quote from: oric_dan on January 10, 2016, 12:44:39 AM
Speaking of metal cover shields, I just received this board a couple of days ago, to make another stab at using the ESP8266, just to see how it works. I wanted something I could just plug into a UNO board, and not mess with those silly jumper wires hanging all over the darn place.  Note - it did take Banggood over 1-month to deliver the thing to the US.
http://www.banggood.com/ESPDuino-Development-Board-ESP-13-WiFi-UNO-R3-from-ESP8266-p-1023370.html

EDIT: sorry, this is the board I received, not the other one,
http://www.banggood.com/ESP8266-Web-Server-Port-WiFi-Expansion-Board-ESP-13-Compatible-With-Arduino-p-1008124.html

I tried the second board you linked, but I had only partial success in getting it to work with ESP-Link.  Unfortunately, I never could find a schematic for it.  IIRC, the problem I ran into with it was that it could not re-program an attached moteino.  I ditched it and just built a plain vanilla ESP13 configuration on a breadboard, using a OSH-PARK breakout board just to give  access to the castellated pins on the ESP13.  That worked just fine for POC testing, though it may prove a bit hairy as a testbed for the RF interference testing discussed above.  When time allows I'll move it over to a board where I can at least solder all the connections.

oric_dan

#24
WH, good to hear of your experience with that board. As I've mentioned, I've not played with ESP8266 for over a year, due to past unreliability experiences with those devices, and also to concentrating on the RFM radios. Also, people have found that in general there is too much latency with using wifi to control robots. You need quick turnaround responses.

However, someone who has been having luck with the ESP8266 might try it on the same Moteino board with RFM radio, and check for interference problems.
-----------

Also, I thought I would toss out one more picture, in regards ideas that might be incorporated into a possible Moteino gateway board.

I designed the board shown below a year ago, as a general "all-purpose" small RF node. I don't have a current picture of a built-up pcb, but this shows the actual top-bottom layout [bottom traces are in blue, so you're in effect looking "through" the board at the bottom, :-)]. 1.5"x2.5", mega328 DIP chip, 3-row headers for robot sensors/servos, DPAK 3.3V 1A regulator although a micro-power v.reg can be soldered in, layout for both XBee socket and also pads [in red] for RFM radios on top inbetween the XBee pads. The FTDI dongle plugs in next to the cpu.

The points I wanted to make are that I've set this up to handle all sorts of customization:
- HDR3 is a 2x8 (uncommitted) header that allows me to mount nRF2401 and ESP826 radios, 128x160 LCDs, sensors like an MPU6050 accelerometer/gyro board, etc.
- so overall, it can handle any of XBee, RN-XV, RFMxx, ESP8266, and nRF2401 radios.
- SOIC8 layout for Flash chip, plus another (uncommitted) SOIC18 layout on the bottom that can mount 2/ea SOIC8s for expansion.
- 2x15 proto area and 3-row headers.

The tiny proto area can mount MOSFETs, voltage-dividers for ADC channels, SIL sensors, even DIP8 opAmps. So, this is another "Do Everything" board that can be customized for specific applications. It can even drive a minimalist robot. So, I just thought some of these features might be incorporated into a Moteino-Gateway pcb, especially the 2x8 uncommitted header and the tiny proto area. An UNO-size board with mega1284 SMT cpu would have lots of free space.

It occurred to me that, for cost-savings reasons, much of this area could be left vacant and people could solder in their own customizations. Moteino is a hardware-hacker world, after all :-).

WhiteHare

Some of the problems that arise with at least some of the pre-made ESP8266 boards (such as the one you mentioned, and also the adafruit one which I also tried but you didn't mention) is that they include extra parts which get in the way of using them for the purpose of reprogramming an attached Moteino gateway, as generally they don't seem to be built with that as one of their design objectives.  There's a particular capacitor and, IIRC also resistive, value that has to be inline with the DST line of an attached Moteino/arduino or else you can't properly trigger the serial bootloader.  If the ability to do that is not part of your objective, then they would probably work just fine as a conduit for regular serial communications and ordinary OTA wireless Moteino programming.

So, although I would have preferred to use a pre-made board, or at least leverage one, in the end I found it less frustrating to just make my own plain vanilla board where everything about it was known, without extra interfering parts.  Once I did that, everything seemed to "just work".  Possibly/probably someone with more HW savvy than me (and I'm guessing you're one of them) could adapt a pre-made board to do their bidding, so I wouldn't go so far as to say it can't be done.

WhiteHare

OK, checking my notes, the schematic for the plain vanilla ESP8266 board is:  http://jeelabs.org/wp-content/uploads/2015/06/Screen-2015-06-12-641.png

To clarify my earlier comments, here's the history of it.  To establish a beginning baseline, I decided to build a "barebones" breadboard arduino on which to do the first wireless programming test.  The reason for that was, again, to have all the components fully known.   So, given that partitioning, that meant a 10K pull-up resister connected between the atmega328p's Vcc and RST pins and a 0.1uf capacitor between the RST pin and the DTR pin in the above schematic.  That worked.

The pullup and capacitor are already correctly in place on the Moteino, so I just connected DTR to DTR, GND to GND, Tx to Rx, Rx to Tx, and V5V to Vin.  Done.

oric_dan

Quote(and I'm guessing you're one of them)

Thanks, I'll check out some of the things that have been mentioned. However, I've never actually gotten around to trying reprogramming over RF, so it'll take some learning curve. I was hoping someone already using ESP8266 would [volunteer to] check it for interference with the RFM radio on the same board.

BTW, for anyone wanting to try their own pcb layout, these guys are making boards really inexpensive to prototype anymore [exclusive of some of the off-shore CN sites].
http://pcb4u.com/a1ad77.asp

WhiteHare

#28
Quote from: oric_dan on January 10, 2016, 10:09:47 PM
I was hoping someone already using ESP8266 would [volunteer to] check it for interference with the RFM radio on the same board.

Quote from: joelucid on January 09, 2016, 05:36:31 PM
QuoteIf anyone has some test code they'd like me to run

You could just take Felix' gateway sample sketch and monitor the RSSI values it reports on the serial. Then switch on the 8266 with wifi traffic and see if anything changes.

If I'm reading the Gateway sketch (aka "Sample RFM69 receiver/gateway sketch") correctly, it looks as though it only reports RSSI (basically radio.rssi) after a valid packet is received and printed.  So, quick question so I don't have to go digging for answers: isn't radio.rssi the receive strength taken at some instant during the last valid packet's reception?  If so, are you sure that's the figure you're interested in?  I would have thought you'd be interested in the ambient noise level, and wouldn't that be better measured between packets, rather than during packet reception?  Like I said at the beginning, I'm not volunteering to write the measurement code, even if it would be easy to do, but it looks like to move forward with the testing that you all are interested in I'm afraid I'd already be sliding down that slippery slope.

oric_dan

Myself, I'm not all that familiar with the ins and outs of the radio. I just use modifications of Felix's Node and Gateway sketches. What I would probably try are range checks using low Tx power levels, and then see if signal reliability is impacted when the ESP8266 is fired up next to the RFM radios.