#398 – An Interview with Felix Rusu

Download episode · 76 MB
Also on Apple · Spotify · YouTube · RSS
Show Notes
- Felix has been running LowPowerLab since 2011 after a career in software engineering and attending school at ASU.
- While evaluating RF modules, he started with RFM12B, now obsolete
- RFM69
- Also can use RFM95/96 with LPL devices for LoRa projects
- Range for RFM69 is a couple hundred meters to a couple kilometers
- Battery life is about 1-2 years without lots of tweaking to the code
- Moteinos are the main product, they can be customized with modules and flash.
- These are based off the Arduino Uno and use an Microchip (Atmel) 328P for the processing. A newer version uses the SAMD21.
- The power can get down below 10 uA while sleeping, including radios. During transmit, the power is in the 10s of milliamps.
- There is an RFM69 library that gets you started quickly using the RF side of things
- The community has many resources including tutorials and a forum.
- Felix recommends starting with the Mailbox Project which uses the MotionMote kit.
Transcript
Chris Gammell: This is The Amp Hour Podcast, released July 9th, 2018. Episode 398, an interview with Felix Russo. Welcome to The Amp Hour. I'm Chris Gammell of Contextual Electronics. And this is Felix Russo of lowpowerlab.com. Welcome, Felix. How are you doing? Thank you. I'm good. How are you? I'm great, man. It's good to talk to you. It's good to talk to you again, actually. I was thinking, you and I had talked in Detroit, where you live, or nearby where you live, back in 2014, I think it was, right? Yep. It was a local meetup, and I met you there. Yeah. I was telling someone about that. I was saying that that's the party where I determined that Detroit is the Wild West of the party scene. I remember sitting outside at 2 in the morning. It was, I forget, the hackerspace downtown. We're outside the hackerspace. A art car pulled up in the shape of a dragon that breathed fire, and we were thumping dubstep at 2 in the morning with no one around. I was like, oh, this is weird.
Dave Jones: Yep. I've never been in that part of the town, actually. Yeah. And I don't remember the place, but I went there because I was just trying to get a little social and see what's going on. But usually, I don't get too much of a chance to go up at meetouts like that just because of everything else and going on.
Chris Gammell: Well, you got a business. You got a family. So, your business is called Low Power Lab. Is that right? Yes. Yes. Cool. And so, are you in the outskirts of Detroit? Where are you actually located? I'm in Canton, Michigan. Oh. Is that? It's a suburb. Okay. Canton, you said? C-A-N-T-O-N? Yes. Cool. That's great. Yeah. There's tons. I mean, that's the thing. Detroit really spreads, too. Yep. Definitely. Yeah. Cool. So, let's kind of walk through your story. So, how did you get to where you are, and what is Low Power Lab?
Dave Jones: Well, I guess we should go back to college years, maybe. Okay. Where was college? College was at ASU, Arizona State. Nice. Okay. So, I started computer science, and right about second year or third year, I decided that I already know how to program. Why am I doing this? So, I felt like I could do something else, and I thought, why not try computer engineering? So, I went for that, and that was probably one of the best decisions that I made, because it opened up a whole lot of new doors for me, and the world of electronics and understanding electrical engineering and all that. In fact, for a long time, as a kid, I used to play with wires.
Chris Gammell: I was going to ask, yeah. So, college was not your first introduction to hardware, but that was the formal kind of thing?
Dave Jones: Yes. That was the formal introduction to electronics. So, like I said, as a kid, I used to play with light bulbs and LEDs and wires and batteries, but to that extent was my exposure at that time. I even had a soldering iron, actually, and I used to solder wires and desolder some old electronics through whole stuff, but I didn't really understand how electronics works.
Chris Gammell: Most days, I still feel like I don't. Don't we all?
Dave Jones: Right. Yeah. Yes. I think so. So, go fast forward, back to college here. You know, I thought, since I already know how to program, I could benefit from actually learning something new and, you know, learning about electronics, electrical engineering, all that. So, computer engineering, which is sort of a hybrid between computer science and computer engineering or electrical engineering, exposes you to both those worlds and you get a chance to learn how to program and get really deep down into the computer, you know, computer architecture, logic design, and all those low-level things.
Chris Gammell: I always think about people doing like FPGA stuff. A lot of the people that I knew that were CE degrees ended up in FPGA fields.
Dave Jones: Yeah. In both of these degrees, you actually get a chance to take the others' core classes as selectives, which actually did. But usually, the computer science people don't really dip too much into the EE side. Yeah. So, you were programming for a long time before that or what? Yeah. So, I actually grew up in Romania and over there in high school, the profile of the curriculum was mathematics, physics, and computer science or informatics as they called it there. So, we learned Pascal and C++. Not too much of the advanced stuff in C++, but the languages were a means to solve problems in math or to do backtracking to solve chess problems and do fractals and all kinds of crazy stuff.
Chris Gammell: Yeah. Nerdy math stuff. It's great. Yeah. That's awesome.
Dave Jones: Yeah. So, not too much into the language structures and that, but it taught us how to think in programmatic terms and how to approach problems programmatically.
Chris Gammell: What made you end up going from Romania to Arizona State?
Dave Jones: Well, I was all set up to go there to the university. So, I was planning to do that, but the opportunity came to come here and study here. So, I took the chance and here I am.
Chris Gammell: Yeah. That's great, man. Yeah. Cool. So, okay. So, you're a computer engineer now. Leave the womb of academia and then what?
Dave Jones: Well, then after college, I moved from Arizona here in Michigan. I got married and well, that's why I moved. And I spent about 11 years in the corporate world of software engineering. So, I worked as a software engineer. But in the meantime, I did start a little bar lab.
Chris Gammell: Detroit, Detroit, Detroit. What do they do in Detroit? Was it automotive perhaps? It was not automotive. Really? Wow. They do other stuff in Detroit. Yeah. It seems like. Yeah. That's cool. Okay. So, like industrial, like Midwestern type stuff or what?
Dave Jones: It was actually property tax assessment and taxation. Oh, wow. Okay. And yeah, it was a larger corporation.
Chris Gammell: Yeah. Okay. So, pretty much, you know, not even electronics focused then. No, not at all. But still software focused and.
Dave Jones: Yeah. Software focused very much so.
Chris Gammell: Great. So, what brought you back to the electronics world then? I mean, did it ever stop or what?
Dave Jones: Well, sometime after I started working for that company, probably a couple of years into it, one of my colleagues there, we started chatting about electronics. And he had started his own company doing some audio video stuff. And he had given me some challenges. And that's how I actually got back into, you know, what I learned in college, getting back to Arduino, the basics. You know, college doesn't actually teach you how to do a lot of things that I do now. Yeah, right. Because a bunch. Manufacturing side of things. The hard hands-on type stuff. Exactly. You know, most of that is self-taught, basically, if you get into one of these things. But, you know, having been given those challenges, I was motivated to actually do something. So, I actually built something for him. And that's how I, you know, ended up reading a whole lot more about Arduino and, you know, what's trending. And I wanted to get into home automation really badly.
Chris Gammell: And it sounds like you got back in on a dare. Is that right? Yeah.
Dave Jones: So, you know, at that time, I actually bought a house. So, we moved into a house. And I started thinking about how can I not only monitor but also control things in the house. So, that's how I looked at home automation. So, back then, home automation and IoT were becoming trendy. And IoT was not even a term back then.
Chris Gammell: Give us a timeline for a reference here. What about time is this? Probably 2011, 2012-ish. Okay. Yeah. So, IoT was just entering the scene. And I'm sure Dave and I were making fun of the term at the time. Oh, yeah. Me too. I mean...
Dave Jones: We still are, I suppose. Unfortunately, we're stuck with that term. I'm not sure how many people actually like it. But, you know, even large corporations actually use it these days. So, yeah. We're stuck with it.
Chris Gammell: I don't know if I've ever said it on the show, but I've actually realized that the term IoT, and this is how I've come to accept it. It actually means money. So, when a company says, we want to invest in IoT, it's saying, we want to give you money for electronics. I'm like, oh, okay. Yeah. Yeah. I got some IoT for you. Cool. Yeah. Whatever. I don't care. Call it whatever you want. Yeah. All right. That's cool. So, yeah. So, that's good. That's good. So, you were bought into it, though. And that's... So, that's about the... You and I met in 2014. So, you had started a couple years before you and I met. Yeah.
Dave Jones: I probably put my site up in 2012. Okay. That's when I started experimenting with, you know, hand assembly of SMD components. I came up with a Motino, which I designed to be small, yet breadboard friendly. But I wanted it small enough to be able to fit it in, you know, tiny places. I had a vision for, you know, light switches and small sensors. One of the first things I made was a monitor for my mailbox. So, it can tell me when the mailbox opens. It can alert me. And, of course, all this is wireless. So, unfortunately, I don't have luxury to rewire my house to make it all wired for anything, right? And nobody has, you know, when you have a house, that's it.
Chris Gammell: Even if you did, you wouldn't want to dig a trench in the front yard to get out to the mailbox, right?
Dave Jones: Sure, sure. So, all these things around my property or in my property and all the obstacles have to be overcome by something that's wireless that can penetrate all those obstacles. And, you know, that's when I started making a Motino, researching which wireless technology I want to focus on.
Chris Gammell: So, you know, so, like, I would like to stop for a second and call out the fact that you're just like, yeah, of course it has to be wireless. Like, to me, I'm like, oh, my God, it's wireless, you know? But I love, I really, really appreciate and am impressed by people who are just like, yep, that's the way it's got to be. I'm going to go learn it, you know? And it's awesome.
Dave Jones: You know, for instance, when I started looking into home automation, you know, the backbone of all these projects was probably Arduino Uno, you know, the AdMega 328 and various forums and clones and development boards. And people were just kind of doing their own thing the best way they could and wiring stuff up, you know, hanging wires on walls and having some relays, turning on some light bulb. And that was home automation, you know, and slowly it evolved and it got them better with the dedicated things for home automation. But back then, there wasn't as much wireless as there is now. And a lot of it was 2.4 gigahertz, Wi-Fi type wireless.
Chris Gammell: Yeah, I remember a lot of like Z-Wave. I remember that one and I think it's still around, but it's not, I'm not hearing about it as much. Z-Wave and Zigbee and a lot of the ISM band.
Dave Jones: Yeah, those things are, I believe, are 900 megahertz.
Chris Gammell: Yeah, I think so.
Dave Jones: So, yeah, but those are, I think those are commercial and their stacks are not open. And so you can buy them, you can buy 900 megahertz automation stuff from like Home Depot and Lowe's light switches and things like that. Even though a lot of them are still Wi-Fi, some of them will be Zigbee and they're 900 megahertz. So, I'm not so much of an expert in that area, but back when I looked into it, it was not open and you had to buy dedicated hardware to talk to those things and it was not always reliable.
Chris Gammell: Right. I think, yeah, I think generally that not always reliable and definitely not open. I think those two things are indicative of like the home automation market. But I think that one of the things that I always noticed was like there were just tons of price pressures. So, even if you wanted to design something that market, it has to be dirt cheap. So, was that something that you were kind of targeting from the beginning or was it more just I want to get it working?
Dave Jones: Well, I wanted to get it working first and foremost. I wanted to get to a point where I know I have a platform that I can build on, right? Because I experimented with various wireless chips. I started with 2.4 gigahertz. There were a couple of popular ones like the NRF and a bunch came after that. But Wi-Fi and Bluetooth and all these 2.4 gigahertz were not working very well.
Chris Gammell: Is that because of distance or complexity or just reliability?
Dave Jones: I don't think reliability so much, but just the inherent physical properties of 2.4 gigahertz. And so, at 2.4 gigahertz, you're just not going to have the range or you need a lot more power to get the range.
Chris Gammell: Pesky water molecules keep getting in the way, huh?
Dave Jones: Well, the physics of 2.4 gigahertz is different than the physics of sub-gigahertz. So, to get more range, you're going to have to look at lower frequencies, just keeping all things equal. Or you will need to throw more power at it. And, of course, the stacks of 2.4 gigahertz, if you're looking at Wi-Fi, that's way different, way more complex than sub-gigahertz FSK modules. So, that's one of the factors that drove me towards looking into sub-gigahertz modules. And I believe back then, the more popular one was the RFM-12B precursor to RFM-69, which is what I use most commonly now, these days. There's the LoRa, of course. So, I had started with RFM-12B. That worked out very well. It was a lower power module, just about 5 dBm. And it was still pretty good. It reached most areas. There were some dead spots in my home where I couldn't reach with that.
Chris Gammell: And this is the RFM-12B, you said? Yes. Okay. Is that made by microchip, or who is it made by?
Dave Jones: I think the transceiver chip in that module was made by Silicon Labs, if I'm not mistaken. Okay. But yeah, so it's made by a U.S. company, and it was packaged by a Chinese company.
Chris Gammell: So, how did this evaluation look for you? I mean, were you actually trying side by side? How did you actually test the... Were you doing laboratory-style tests, or was it more like, I've got a thing in a mailbox, I've got a receiver on the other side of the house?
Dave Jones: What level of testing were you talking about here? I've done a fair bit of testing. Learning the RF part of things was alongside learning the electronics and hardware part of things. So, the extent of my RF testing was putting a transmitter in one spot, somewhere in a field or on my street, and just walking with the other one. And seeing how far it gets with different settings. And of course, yeah. Oh, wow. So, of course, 24 gigahertz started cutting out at a couple dozen feet or so, you know. And the sub-giguahertz modules were far more successful. I was getting several hundred meters, you know. That's way more. So, it was a no-brainer to just use that.
Chris Gammell: So, you would have like a receiver, the receiver would be in your hand, your transmitter would be in a certain spot, you just wait until you couldn't see data packets coming through anymore, or what?
Dave Jones: Sort of, yes. So, the transmitter, I would just put on an elevated thing or something, just not on the ground. Okay. And I'd have the receiver hooked up to a laptop, I'd just walk away, trying to keep antennas, you know, parallel to each other.
Chris Gammell: Nice. That's great. Yeah, okay.
Dave Jones: So, that way I would see, you know, signal is slowly decreasing in power, in received power, yeah. And still, so still all line of sight. Yeah, line of sight, yeah. Because if you add obstacles and random things in between, then there's no way to compare apples to apples.
Chris Gammell: And you said FSK before, that's frequency shift key, is that right?
Dave Jones: Yeah, frequency shift key, yes. Cool. So, it's basically the digital form of FM, where you have a carrier frequency, which modulates ones and zeros.
Chris Gammell: I like that digital form of FM. That's a good way to say it. And what level of, like, so when you're interacting with these modules, what does that actually look like? Is that you're basically throwing commands at it over and over again? Or what is the actual interface layer that you were dealing with it?
Dave Jones: You mean from an interfacing, getting commands over to the modules?
Chris Gammell: Yeah, so you said, like, you're talking to this RFM-12B. And so, is it like you're kind of just throwing, you're like, you're reading from a register? Or are you actually driving the, so, and I'm really asking from the people that are listening. So, like, if they wanted to start working with it tomorrow, what would it take for them to start using that same module?
Dave Jones: Okay, first of all, I would probably point them to RFM-69 at least. Sure, sure, yeah. Because that's a more, it's a better module overall. Okay, but any of these modules then. But all these, all these subgears modules have a register set. And pretty much they handle the RF part. You just play with the parameters and you have a lot to play with. But I built a library for myself to use on my own to interact with those chips and, you know, be able to use a standard set of default settings that are good all around settings. And that library, I built the library for RFM-12B back then when I was using that module. And then I built one for RFM-69. And that's what I use now. And that's what my users probably use as well. Although there's others out there. So it's pretty much made so that you can just call out some commands and tell the radio module to, you know, set yourself at 950 megahertz center frequency. Or you can set a custom frequency if you'd like. And here's an encryption key that you can use. And there's various other settings to get that module to communicate with whatever other modules you have out there. So you don't have to deal with the RF part too much.
Chris Gammell: Even though you can do... Yeah, so set it and forget it almost, right? Almost. Sort of, kind of.
Dave Jones: You can get into it if you'd like. And, you know, there's a long data sheet to read on. But you're quickly getting into RF concepts at that point.
Chris Gammell: Right, right. The amplification amounts and I'm sure the demodulation schemes, all that stuff. Depends how many knobs they basically give you to play with, huh?
Dave Jones: Sure, yep.
Chris Gammell: And so at the time you were basically... You figured out RFM-12B or more generically the 900 megahertz band was kind of the way forward because... Just because the transmit distance and... Yeah, better penetration.
Dave Jones: Of obstacles. Much lower power. That's a very notable thing. My whole focus is on low power in general because a lot of these nodes are running on batteries and they need to last a long time. A conveniently long time. I'm not going to go into the extreme of low power. And that may surprise some people. But for me, you know, having a node in my mailbox that's going to last one to two years is probably going to be beyond my servicing interval for that node. So that's very convenient to me. You know, some people may think, oh, you need to get five years or 10 years or it's not good enough. You know, to me, that's good enough. And I think for most uses, you can optimize a whole lot and you can get a whole lot better than that. But a node that's transmitting every minute or so and is dynamically adjusting its transmit power, I think, is very good if it can do one to two years on a small battery.
Chris Gammell: Yeah, I mean, and it depends. I think it all depends on the application, like the really harsh territory type stuff, right, that does need 10 years because you're never going to be able to get the device back again. Sure. If you're doing that, you're probably paying an engineering company or you're getting more depth into the radio or whatever it is to actually get that further engineering effort in there.
Dave Jones: Yep, yep. But I bet a node like that won't transmit every minute or every 30 seconds. Yeah, that's a good point.
Chris Gammell: I mean, when you are doing this, I mean, so like for the mailbox example, right, does it dynamically adjust or does it need to dynamically adjust or is it easier just to say every minute, tell me if there's mail?
Dave Jones: So my own node transmits every minute and it tells me, it calculates the time elapsed from the last event or the mailbox being opened. So it uses a PIR sensor, a motion sensor essentially, and that's actually the most costly component as far as power consumption. It uses about 50 to 60 microamps, whereas the Motino itself and the radio use less than about 7 microamps, you know, in sleep mode using a watchdog timer. We could eliminate the watchdog timer and save another 4-ish microamps, right? But it's still a lot less than the actual sensor. And since I've made that one mailbox sensor, I found different sensors that can use 2 microamps. Still motion sensors, they're made by Panasonic. They're far more expensive, like 30 bucks a piece or so. Whoa, okay. They're tiny, they're much more power efficient, but, you know, they cost a lot more. So I decided to just go with that and not change it ever since. And it still works and the battery still lasts about a year and a half. And I'm happy with it, you know, every year and a half when I have to service it. In fact, I find some corrosion, some, you know, being abused quite a bit. Right.
Chris Gammell: I was going to say mail is getting shoved in there, so that ups your service time anyways, right? So, I mean, Detroit's not particularly warm. Not at all.
Dave Jones: We have a six-month, very long winter. Yep, I know that goes. And it's humid in the summers. And so, you know, for that note to last so long and to be so reliable was actually quite remarkable. I'm very happy with it and how it performs and the fact that it can last so long is very convenient.
Chris Gammell: That's great. So we're still almost at the point where you were evaluating, right? So you were evaluating this module. You ended up up. It sounds like you've upgraded over time, going from the RFM12 to the 69. What is actually the processor that's on board as well? Because it sounds like at 7 microamps, rather, it's a pretty low-powered processor.
Dave Jones: All the Motinos, well, not all, but the small Motinos, the red ones and the Motino USB are using the Edmega 320 AP. It's the same chip you find on Arduino Uno, the very popular Edmega 320 AP.
Chris Gammell: Yeah, okay.
Dave Jones: And it can achieve very low power, sub-microamp, if you know how to drive it. You have to power it from not use an LDO or voltage regulator because that's going to need some power. Yeah. And you have to dial down the clock and all that. But I found that for most uses, you don't need to do that, and you can still get very good battery life. So all the Motinos have a standard bootloader. They have a standard set of settings. They run from a 16 megahertz external resonator. And they have an LDO that uses just 2 microamps of quiescent current. So, you know, you can get down to 2 microamps if you don't use the watchdog and just use external hardware interrupts to wake it up. Or you could use the watchdog to have the Motino itself wake itself up and do various things at intervals of multiples of 8 seconds. It's what it is.
Chris Gammell: So I'm actually looking at the board right now. I think this is the main one. It's red board, product ID 99. And so I'm looking at the picture, though. And is the picture that's on the main site where it's just a Winbond chip and an Atmel chip and then it looks like a 3-pin regulator or something? Is that actually the one with the RF?
Dave Jones: Yes, that's the very first Motino that I designed. And on the bottom side is where the RF chip is.
Chris Gammell: Oh, I see. I see. Okay. So this one is not showing it actually populated, but it could go in there with the transceiver. I see. And that changes the price then, too. I see. Okay. That makes sense.
Dave Jones: Cool. Yeah. Well, some people prefer to just get it as a bare board, you know, and they might not use the transceiver. They might just use it for driving LEDs or motors or whatever.
Chris Gammell: Sure. Yeah.
Dave Jones: So I'd like to offer all these in as modular and diverse as possible of a way so that people can get just a bare board or they can get even the Winbond chip. That's actually extra storage, and I use it for wireless programming of these boards so that if you have a node somewhere in a wall, in a light switch, or in your attic, or in a tree, or, I don't know, crazy places where you can't reach easily, you can wirelessly reprogram them. So that's an option, right? Oh, okay. You can get the board with that or without that, or with the transceiver, without the transceiver, with headers, without headers. So pretty much all these boards, you can have various options and add-ons you can add on to them.
Chris Gammell: Okay. And so, like, what are most people doing? Are they most people are ordering with transceivers, with flash memory, all that stuff? I mean, how does it go?
Dave Jones: So probably most people ordered with the transceiver. I think some people that are a fair amount of people order with the flash chip as well, yes. So they like to experiment or just try wireless programming, I guess. I'm not sure because I haven't run a survey or anything, but...
Chris Gammell: Yeah, I got to know your users, man. Okay, so tell us about the wireless programming, too. So is this the idea is, like, I go and push a new update to the firmware, it stores it in this chip, or how does it actually work?
Dave Jones: So, the bootloader is what handles the... Actually, let me take that back. Your program runs on this Atmel, now microchip, Atmengad 320p, and it will listen to commands. And you can send it a command saying, okay, I need you to upgrade the firmware. And it will basically switch from whatever it's doing to taking in the new hex file, essentially, is what you compile in Arduino IDE. You take the hex file and have a little GUI, and you need another Motino as a programmer to send that firmware over to your target node. And all that is done wirelessly. And once that transfer is completed, basically, that new firmware is going to sit in the flash chip. And the last thing that happens after transfer is for that command to essentially reboot the processor. So, once that happens, it'll enter the bootloader, where the bootloader is going to look at the flash chip, and it's going to see there's a new flash image or new program to be flashed on the Atmega. So, it takes over, and it erases the old one. It flashes in the new one. And then it just jumps at the program location at the new... It's going to run the new program.
Chris Gammell: That's great. Yeah, it sounds like a standard over-the-air type update. What happens if it fails? I'm sure that there's problems once in a while, right?
Dave Jones: It can happen, yes. There's collisions. There's all kinds of things. And when you don't have a wire, anything can happen, right? So, that's why I put that external flash chip on the Motino, so that you can use that for anything. It's basically just storage, right? You can use it for data logging or anything, but it's essentially meant for ensuring that you have an integral transfer of your hex file before anything happens. So, if it breaks up in the middle, then your bootloader is not going to see a completed image and is not going to do anything. Got it.
Chris Gammell: Okay. So, is the bootloader really... So, you're saying the first thing it does is it checks internally on the Atmega chip to see if there's something... If there's a new program to load from the... Sorry, the bootloader is on the Atmega 328? Yes. And then it goes out to see, first off, is there a chip out there? And then does it have a new program for me? Is that the idea?
Dave Jones: Exactly, yes.
Chris Gammell: Okay, cool. And then if it needs to, it shuffles the data and reprograms itself. And then does it verify at that point too?
Dave Jones: So, when the program is completely transferred, it's already verified to be complete. So, that's the whole point of having the transfer like that in the flash chip so that you can... If you're talking about verification and CRC, that's done on the transmitting end.
Chris Gammell: Oh, okay. So, it says, here's my block of data. Here's what the CRC should be. If you don't see the CRC, whatever that... What does CRC stand for? I always forget. Google, remember? Google, yes.
Dave Jones: So, it's an integrity check that a bunch of bytes are what they should be.
Chris Gammell: Cyclic redundancy check. There we go. Thank you, Wikipedia. Donate to Wikipedia, everybody. We do every year. 100 bucks from the amp hour every year. It's a checksum, right?
Dave Jones: It's going to add all those bytes and do a twos compliment. And you're going to have a checksum that needs to add up.
Chris Gammell: Yeah, that's great. Okay. And so, that sounds like pretty good. I mean, so, would you... What is the benefit of doing this over programming it by person, like by wire?
Dave Jones: Well, take for example, the light switches that I've designed. They all have a Motino, one of these in them. So, all of these are installed in walls, right? Behind cover plates, behind screws, and they're wired to mains electricity. So, to be able to reprogram them, you would, at the very least, have to have some way of tapping into that microcontroller, right? With a header or with a USB jack at best. And even then, you'd have to ensure that, you know, you're not tied to mains in any way, you know, galvanically. You need to be isolated, you know, for your own safety. Right, right. So, all those worries are taken care of when you can do wireless programming. Yeah, that's a good point.
Chris Gammell: Well, speaking on the wireless side of things, so I'm looking down the page as well. And it looks like there's a couple of modules you can get here, too. So, these look familiar. Are these all Hope RF modules? Is that the manufacturer you're talking about? Yes.
Dave Jones: Or is it someone else? Yes. It's Hope RF.
Chris Gammell: So, like, from the library perspective, so it looks like you have RFM69 HCW, and then the CW version, the RFM95 and 96, and RFM12V. So, you have a couple different versions here. I assume that's just footprint differences in the backside or something like that. Maybe it's not even, you don't even need to do that.
Dave Jones: Or is that like a... There's some compatibilities, both in terms of how you interact with them and how you actually mount them. So, as far as footprints, the RFM69 HCW is compatible with the LoRa radios. But the LoRa's are not, you know, they're different. Even though the LoRa radios actually can do FSK, they're, you know, you're not going to buy a LoRa module to use it at, you know, FSK. Use the chirpy LoRa protocol.
Chris Gammell: Exactly. Yeah. Okay. Okay. And so, then that was actually my other question is on the software side. So, now you have four different types of modules you could add to it, right? Those are all order options, whatever. Yes. Does it look different from the library side as well? Because I assume that the configuration details are different.
Dave Jones: Yeah. So, for all the RFM69 radios, whether they are the W, HCW, HW, or CW, they're all compatible with each other. They use the same transceiver chip. Same register sets.
Chris Gammell: Yeah.
Dave Jones: Exactly. They're just different in terms of how they're wired on the actual module and how their passives are wired to enable lower power for the W and CW variants and higher power for the HW and HCW, which are 20 dBm or 100 milliwatts. Oh, okay.
Chris Gammell: So, that's about transmit distance, like the trade-off between longer battery life and longer transmit kind of thing?
Dave Jones: Well, you can still use the higher power module at lower power. So, you can dial down the power. That's very important when you have modules that are in close proximity to each other and they don't need to transmit at full blast 20 dBm. You know, you can just tell them, okay, self-adjust your power and only transmit enough power that you can comfortably hear each other and talk to each other, but not, you know, blast your message in the whole neighborhood. Oh, so there's like state machines that go between the modules or how does that work? Yeah, so in my library, I can't talk for other libraries, but in my library, there's a module called, it's essentially ATC, so Automatic Transmission Control. That's what it stands for. So, it's enabling these modules to self-adjust their transmit power based upon feedback that they receive through the ACKs. So, when they send this message and they request an ACK or an acknowledgement, that will contain or it will be able to tell it how loud the message was or the transmit signal was. You know, so essentially, let's say we have a node here that's called A and we have a node B. A is the gateway or the main node and B is just trying to transmit some messages over. And if you load them with that ATC module, that's part of the library, it's going to request ACKs from the main node, from node A. And node A is going to tell it, okay, so I heard your signal at, you know, 65 dB, negative 65 dBm, your received signal. So, that's very loud, right? It's a very strong signal. So, node B is going to figure out, okay, I was set at 85 dB, so I can really dial down my power quite a bit. So, it's going to gradually lower its transmit power until it's going to race around that target value of negative 85, which I would consider still very good signal strength, but doesn't have to be, you know, strong in that to have a strong link.
Chris Gammell: So, could you, since you've, you know, taught yourself a lot of RF stuff as well, could you quickly explain the dB thing for people who might not know that?
Dave Jones: So, dB stands for decibels. It's a log scale representation of power in the RF world, and not only, but in engineering, you're going to find that term a lot. So, you know, it's not linear, it's log. So, it's treated differently at transmit and receive. So, on a transmit, you're putting out 20 dBm, which is in relationship to milliwatts, right? So, 20 dBm will equate to 100 milliwatts of power. 30 dBm will be 1 watt, so it's 10 times more. So, you see how it's not linear. We're going from 20 dBm to 30. We're jumping all the way from 100 milliwatts of actual power to 1 watt. So, that's a 10 times increase.
Chris Gammell: Okay, that's good. Yeah, and I mean, I think that's one thing that, from my perspective as a not very RF-y type person, it's a little confusing at first, but it becomes part of the lingo pretty fast, right? It's just, it's a different measure of, like, you understand that one value is good, another value is not so good. And like you were saying with the ATC, it sounds like you're trying to just kind of target around that, would you say it was minus 85 dB? Yeah, that's what I find works well for me. Right. Well, because you're specifically targeting low power as well. So, you don't, that's always that trade-off of transmit power.
Dave Jones: I could probably comfortably go to negative 90. Okay. And that's on the receiving end. So, when you're transmitting that strong signal of 100 milliwatts at maximum power from your transmitting node, at the receiving node, it's actually a very weak signal, which gets amplified and processed. And, you know, compared to the 100 milliwatt or 20 dBm, the negative 85 dBm is a very weak signal. But it's still strong enough to be processed by the RF chip and demodulated into your expected message.
Chris Gammell: And like you were saying, it sounded like the, you don't have to really, from the interfacing side, you, Felix, you've already done all this stuff in the library, right? You don't have to even dig too much into the RF stuff. You might have to kind of optimize the knobs that are given to you. It sounds like then you are presenting this at the library level, the API above that. But it's pretty simple for someone like me. If I go and buy a Motino, I can basically just be like, adjust, adjust ATC or whatever you're talking, whatever it's called.
Dave Jones: It's pretty much only a handful of settings that you need to set. There's a network ID, which means that all the nodes on that network ID can hear each other. There's a node ID. So, you want to keep each node separate from the others, have a unique ID for each node. And then, typically, there's a gateway ID. So, all the nodes typically will transmit to one gateway or one node. That's the main node that's going to relay all that data into whatever else you may have your cloud or, you know, aggregate your data in whatever way you need to.
Chris Gammell: Right. And, yeah, it's an important point, I think, because people think about IoT or really just talking between different modules. But it seems like at one point, at a certain point, you know, each module, even though the promise of, you know, having every module on the Internet, quote unquote, right? It's like you could have every module have an IP address if it was a Wi-Fi based thing. But the power needed for that is ridiculous. So, instead, you're saying have one node talking to something that is a gateway to the Internet, like a ESP module or something that is higher power. And then it talks to all these subnodes that are very low power.
Dave Jones: Sure. So, keeping all those nodes online all the time would be probably terribly inefficient and wouldn't scale very well.
Chris Gammell: Well, that's good. I mean, you're not called Low Power Lab for nothing. Yeah. That's great. So, well, let's talk about – so, you and I were emailing about this before the show. And we were talking – you know, I was actually on the wrong side here. I was confounding LoRa with all these other things. And I think it's a little confusing. It's still a little confusing for me, honestly. All these Hope RF modules are called RFM something. But, like you were telling me, the LoRa stuff, the RFM 95 module, which I've seen and I'm designing in right now, is different. I mean, it's just the protocol difference. So, like, what is the one that you're normally using? And, like, what are you targeting here?
Dave Jones: So, early in my days of experimentation with this whole RF thing, I started with RFM 12B, right? And then at some point, about a year or two into it, RFM 69 came along. And it was a higher power module, had encryption, and a whole bunch of other goodies. So, I decided to switch to that, upgrade to that. And at that time, I had far fewer nodes myself. So, it was relatively easy to upgrade from RFM 12B to RFM 69. And, frankly, I never felt the need to upgrade from that to LoRa because RFM 69 still does very well in terms of penetrating all the obstacles, all the walls in structures like a house. And, you know, my farthest node is across the street, right? The mailbox and the receiving node or the gateway is below grade in the basement. So, it goes through concrete, a bunch of dirt, and there's a bunch of distance to it.
Chris Gammell: Yeah, right.
Dave Jones: It still has a very strong signal. So, why do I need to upgrade? And LoRa is a little bit more complicated and also a much lower data rate in general. So, if you want to get maximum data rates from LoRa, it's probably a tenth of the maximum data rate you can get from RFM 69. And that's part of the protocol for LoRa. Or one way to achieve even longer range, even with RFM 69, is decreasing the bit rate of the data. So, instead of transmitting lots of bits in one given timeframe, you transmit fewer bits so that your receiver can hear them louder and clearer.
Chris Gammell: And have more things to compare against, it seems like, too. So, like, Richard, who's been on the show from TWTG, that was many, many months ago now. But that was a good show to reference people to. So, he was telling us about LoRa. And then I went off and studied a little bit. I went to that conference, came back from the Things Conference thing, knew a little bit more. I'm still getting a feel for it, to be completely honest. I'm still struggling. I still struggle a little bit. And I think it's confusing for me because it's like some of this stuff, like the 69, like you're talking, the RFM 69, it is operating on the same ISM bands, right? So, the industrial and scientific, I forget what the M is. Medical? Medical. Yeah. Is it medical? Okay. And that's just the frequencies that are allowable, right? Like 433, 868, 915.
Dave Jones: Yes. Yeah. So, different parts of the world have the various bands. Yeah. As ISM.
Chris Gammell: Right. And that's like the sandbox that they're allowed to play in. And then what we're talking about here is some of it, at least for the Laura stuff, Laura is a, what's it called? A protocol, right?
Dave Jones: Yeah. So, it's a proprietary protocol owned by Semtech.
Chris Gammell: And so, that is there. Now, the RFM 69, though, like between two of those modules, what is the actual protocol that's happening there? Is it just packets? Like just some defined packet kind of thing? Between them, you mean? So, like if I went and snooped on the traffic, what would it look like, I guess? So, I know that if I looked at the Laura traffic on like a spectrum analyzer, I'd see like these slopes up and down as the frequency changes. So, would the RFM 69 just look like just a frequency shift key?
Dave Jones: It would be more static. Yeah. It would be in just one place. So, you have your center frequency and then you can, in the library, the default parameters, part of those are how wide the bandwidth of the modulation is and things like that. But it would be in one place. You would just see one waterfall, you know, in one static place. It wouldn't be all over like Laura.
Chris Gammell: From like the next step up then, like what is the actual, what does the packet look like? You mentioned there's encryption in there. So, like, and I know that most of the time, especially if people are using Motinos, they wouldn't see any of this stuff. But I'm just kind of curious. I'm guessing you had to look at this at some point. Like, what does that actually look like from a, you know, if you're looking at the packet, what does that look like?
Dave Jones: So, the packet has various headers and a synchronizing sequence of, you can predefine it to be certain character or certain sequences of ones and zeros, right? And all those things are coming before your actual payload. And if you're using encryption, then the nice thing about these modules, the RFM 69, is they have hardware encryption, AES 128. So, it's still going to cost a little bit of time, like a couple microseconds to encrypt your message. But you can do that on the fly pretty much. And transparently, once you set that encryption key, and it's simply going to, you know, shift all those bits, encrypt them, and it's going to have a CRC. And that's your packet. So, headers. And that's a different CRC than we were talking about. With the programming, right? Yes. It's different, obviously. But it's still going to be a CRC that is used by the radio. Yeah. So, that the receiving end will see the, you know, we'll start seeing the synchronizing sequence. And it's going to read all the headers and then the payload. And then once it receives the CRC, it's going to compare that to the payload. So, that's how it actually is able to receive a good packet and dismiss the ones that are gibberish.
Chris Gammell: Right. So, yeah. If something, if there's like a sunspot that happens in the middle of a packet transmission and that part of the spectrum gets messed up, it'll just say, nope, this is a bad transmission. Try again. Yeah, sure.
Dave Jones: And that, something like that, that's random like that. It would probably fail much sooner than when it gets to the CRC. Oh, why is that actually? Well, because of all the preconditions that you set in the headers of the transmission. Oh, okay. Interesting. Interesting. When a transmitting module starts modulating the bits in the air, at nearly the same time, your receiver is going to start demodulating them into its receiving end. So, the receiver might actually demodulate lots of things that you don't even realize, right? Ones and zeros that are out there from some other sources. But the way you set the settings in the library or the way they're set for you in the library, there's all these conditions that have to be met before the radio will even accept or even start demodulating the payload part of the message.
Chris Gammell: Yeah, it kind of feels like a, what's that type of puzzle? It's like, what's that puzzle thingy? Or it's almost like a lock, right? If you don't have the right combination of ones and zeros, then you'll never actually get to the point where the thing clicks to unlock. Yeah, yeah. And let the payload through.
Dave Jones: It'll fail very soon if it's not even close to being right.
Chris Gammell: All right. Yeah, that makes sense. So, you're saying if it's a super noisy channel, the bits will never make it through.
Dave Jones: Yeah, they won't make it through. It might keep the receiver busy, which is undesirable, but the bits won't make it through.
Chris Gammell: That's great. I mean, we should also say here that it seems like all this stuff is actually hidden from the user from your perspective, right?
Dave Jones: Yeah, and that's the great thing. You don't have to worry about how your packets are actually going in the air, how they're demodulated and modulated, and what's the receiving doing, and what's the transmitting doing, and are they at the right time and right place and all that. You have a couple commands. Call the radio. Tell it what frequency you want. Network ID, node ID, a couple other settings to set the right module. Transmit power, and that's it. Then you're just ready to start sending messages.
Chris Gammell: Yeah, that's awesome. That's awesome. Yeah, and then it sounds like it's at that level of, I mean, Arduino-esque level of like, send something, receive something pretty much, right? I mean, that's kind of the level people used to.
Dave Jones: To be able to offer these modules to people that want to use them, you're pretty much bound to having to offer them software that's free and ready to use and easy to use, and it has to work with Arduino IDE or else nobody's interested.
Chris Gammell: Or if the wrath of the makers falls upon you. Yeah. So what are people using it for? I mean, let's get into that use case. I mean, it seems like, I mean, and we're, like I should also mention, we were talking about one product, but you have many products. So maybe walk us through some of that other stuff as you tell us about what people are using them for. Sure.
Dave Jones: So, Motino, I designed Motino, like I said, to be able to build other products on top of it, like light switches that can be used in a, you know, smart home so that I can monitor and control lights in the house. I can monitor my garage doors. So that's another product. It's called the GarageMote. It's a little shield or motherboard, actually, where Motino mounts on top of it, and it has a relay, and it has two magnetic sensors that can detect magnets on your chain or on your opener belt. So you can tell when the garage is open, when it's closed, or when it's in between, so unknown status. And it can also trigger an opening or closing action through that small relay. So that's one example. There's MotionMote, which is sort of very similar to the MyMailbox sensor. It has a PIR motion sensor, and that comes in various different options. So we have the Chinese sensor that I'm using in MyMailbox. It's the same one. It's more power hungry, but still pretty good. And I also offer the Panasonic sensors for those that are more extreme and look for longer battery life. So the MotionMote can be placed anywhere in your house, right, or anywhere in your environment, and it can detect motion. It's very accurate. It's going to last, again, years, depending on how big the battery is. It runs on LiPo batteries. And, you know, it can tell you motion. And it's not stuck to a wall. It's not stuck to a wire. And it's very convenient. It can actually be used as both as security and as convenience. So you walk into a room. Motion is detected. Light turns on, right? So that's one use case right there.
Chris Gammell: Yeah, that's great. So, like, in that case, so let's talk about the MotionMote because you've already kind of talked about it a little bit. So, okay, so I buy this kit. And I'm looking at it. This is nice. It looks like there's a baseboard. There's actually the Motino. There's a case for it. And then the sensor itself. Do I need to then have another node that acts as the gateway? Is that kind of the idea?
Dave Jones: Just having one node with one module, radio module on it, is not very useful. How are you going to talk to it? So you need to have some kind of magic. I believe magic is the other way. You're going to have to have another node to, you know, receive messages from that Motion node.
Chris Gammell: So someone goes to buy a kit, though. So that's just kind of what I'm getting towards is if they buy a kit, they should also plan to buy a second Motino with the same radio on it so that they can talk between them.
Dave Jones: Yes, that would be correct. Okay.
Chris Gammell: But it sounds like if you then buy that Motino as the gateway, you can then add as many nodes around it as you want it to. Sure. That's kind of the benefit, right? Yeah. Yeah.
Dave Jones: The most convenient way would probably be a Motino USB, which has an FTDI chip to take care of all the USB translation. So you just plug that into USB on your, could be your PC or it could be your Raspberry Pi. Or if you're more hardcore and you want to just buy a regular Motino with no USB on it, you can just connect, you know, power and TXRX, which is serial, to your Raspberry Pi. And there you go. You have a gateway.
Chris Gammell: And that's what a lot of people are doing is using it to a Raspberry Pi as like the, so it's like extending a Raspberry Pi as another RF module on there. Yes.
Dave Jones: Yes. So I guess Raspberry Pi or similar small computers are the most convenient way to get that data onto the internet and not have a full-blown computer on 24-7. Right. Yeah. For that purpose. Yeah.
Chris Gammell: And it makes sense too that that, so then the Raspberry Pi acts as a gateway. And in my experience, at least gateways have always been, you know, higher power. They're going to be plugged into a wall. You're not going to, you know, you might want them on a battery, but most of the time, because they're also going and doing backhaul. The term I always hear is backhaul to the internet. And since you're doing that, you need, you need a little bit more juice for that.
Dave Jones: A little bit more juice. Yes. And in fact, I designed a hat for the Raspberry Pi, which hosts the same processor, the Atmega 328. It can be powered by a LiPo battery, which actually acts as a backup, power backup. So power goes out, you know, my gateway and my, all these nodes are still functional. They can still send data. Data can still be logged and all that. And it has the same radio module, or you could choose either LoRa or RFM69. And it's a very compact, convenient way to turn your Raspberry Pi into a gateway. But like I said, of course, you can just use a Bayer Motino and wire it up with just a couple wires. And that can act as your gateway. But then you don't have the backup and other conveniences that come with this hat.
Chris Gammell: Yeah. It kind of sounds like it's like a DIY, anywhere from DIY, you know, breadboarding together up to, yeah, you can kind of pull these into a product if you really wanted to. And then, you know, reuse a lot of this stuff as a, you know, product level type thing.
Dave Jones: Sure. Sure. Yeah. And for my own use to make this whole network of sub-gigahertz modules convenient to access and use and control, I built my own platform that is not in the cloud. Or if you consider the Raspberry Pi the cloud, then that's the cloud. But it runs on the Raspberry Pi. It's essentially a little web server that runs a web page that's driven by WebSockets. And it's secure. So, nobody can.
Chris Gammell: So, what is this called? I actually have not seen this.
Dave Jones: It's called the Gateway Dashboard, Motino Gateway Dashboard. I never really came up with a proper official name for it. All right.
Chris Gammell: We're going to work on a name after this show is finished recording. We need to get some branding in here. Yeah.
Dave Jones: But you can find all about it. Find out all about it at lowparlab.com slash gateway. So, if you go there, you'll see some hardware.
Chris Gammell: I think you should just call it the LPL Gateway or something like that.
Dave Jones: Yeah. You know, I call it the IoT Gateway Project. I'm not sure that's the official name. So, that's why I'm saying it's not really... It hasn't been named with a trademark or anything. But it's just the... It has evolved as with all the hardware and all the other things that I've done has evolved over time. And it has become this thing which runs on my Raspberry Pi. And lots of other people actually use it too. So, it's a free piece of software. It's not binding you to any cloud or any other platform which, you know, we've seen a bunch come and go. And, you know, now they're here. They're great. Everyone uses them. They're promoted. The new hot thing. And then you never hear about them again. So, you know...
Chris Gammell: The arc of hardware is long and software is not.
Dave Jones: Yeah. So, and the idea for me to keep my data in someone else's cloud kind of seemed odd. So, I just wanted to run my own thing. Yeah, I mean, there's risk in that, right? Some risk. And, you know, I felt a little better having control over my own data and my own automation. And, you know, if it fails on me, I can make it better. I have control over that. I don't depend on someone else addressing my issues and, you know, ending up owning my data in various ways. And then changing privacy rules and how my data is handled and all that. So, everything is on my own.
Chris Gammell: Oh, that was a GDPR comment there, huh?
Dave Jones: Yeah, well, what can I say?
Chris Gammell: I started doing this. It changed some things, right? I mean, it changed some things. Sure, sure. That's great. So, I mean, I actually... I was in your shop there for a second. I couldn't get back out of it. But it seems like you do have a lot of user projects as well. So, like, a lot of great projects get started from, you know, automation of kitchen scales and plants and bikes and coffee makers, all that stuff. A lot of the things that I think a lot of people are getting started with. I mean, what do you suggest as a first project?
Dave Jones: I think the mailbox is a pretty cool project. So, you can just take a motion mode and program it with that sketch to make it into a mailbox. And it's very useful, right? You can actually get something out of it, not just bling some LEDs and, wow, that's so cool.
Chris Gammell: You can even probably put it in your fridge and see if someone stole your cake, too, right? Not everybody has a mailbox.
Dave Jones: Yeah, well, when I first started with the motion mode, it was for the mailbox, right? That was my first, probably one of my first notes. And I used magnetic sensors with a read switch or something. And, you know, you had to get the right angle from the sensor to the magnet or otherwise it doesn't trigger. And just a lot of issues. The door for the mailbox could be left open or partially open and it just wasn't reliable. So, I ended up just using a motion sensor because it works every time. As long as nobody messes with your mailbox, there's no motion. So, it's very accurate. There's no dependence on wiring to external sensors or aligning with a magnet or anything like that. So, that turned out, worked out very good. And it's probably a very fun project as a starter.
Chris Gammell: What about when things go wrong? So, I mean, I'm guessing you have to support a lot of your users. And with RF, it seems like there's a lot more that can go wrong. It's less you can be like, hey, get out your scope. So, how are you working with users or working yourself when things go wrong in the RF spectrum?
Dave Jones: So, I'm trying to keep my site forum as my main support platform. There's a lot of contribution from third-party users or independent users that use my hardware or just hang out there to share their projects and share their knowledge. So, I'm very grateful for that. So, they help a lot with answering questions. And I also try to be active every day to make sure that people, you know, their questions are addressed. And if they have any issues with my hardware, I can actually help them out and not just leave them out hanging. So, I offer support through the forum. And then if there's email, right? There's the contact page. Sure, sure. People just contact me directly.
Chris Gammell: But I meant more like, what are the steps that you kind of walk people through? So, I buy a Motino tomorrow. It's got an RFM69 on there. And I'm like, yeah, it's just not working. Like, is it like you'll step through? Is it like, is it a lot of pebcac? Or is there other actual RF issues that come up? You know what I mean? Like, I'm trying to get a feel for how hard is RF actually with all this stuff going on?
Dave Jones: With the library, there's a bunch of examples. So, that's probably the first step where people should go and see the examples, start with examples. There's also a guide on my website. And I try to go through all the relevant issues that have been popular over the years and where people have issues. And try to address those things so that hopefully we narrow down on support time. So, that I don't get, you know, how do I even get started type questions.
Chris Gammell: So, maybe that's a good place for people to start as well. If they're thinking about getting into this, they could just go and check out the guide. Check out some of the different projects that are on there. I mean, I guess I'll link in the guide for the motion mode. Maybe that's a good place to, like you said, that's a good project to start with. So, maybe they could see all the things that they need to buy and have to get started.
Dave Jones: Sure. And, you know, there's a lot more stuff on the internet relating to these radios as well. So, there's lots of projects, you know.
Chris Gammell: Yeah, I guess my concern with this kind of stuff is always like, okay, it doesn't work. I'm going to assume it's the radio. You know what I mean? But, like, my experience has always been like, well, usually it's like, no, you took the power up wrong. Or, you don't have enough power. Or, you didn't do A, B, and C. You didn't initialize it right. You know what I mean? Yep.
Dave Jones: So, it's usually, most commonly, it's usually a setting for the radio. Or a mismatch between what you're telling the hardware. Or what you're using, what you're telling the sketch that your hardware is. And it's not matching. Okay. So, obviously, if you use a 433 megahertz at the wrong frequency, it might still work. It might still push out some signal. But it'll be heavily filtered by that passive network of components. Right. Which is meant to, you know, help you out and narrow down only to the frequency that's intended to be used at. And then there's that setting that distinguishes between the lower power modules and the higher power modules. The HCW and HW need that extra radio call to tell the library, yeah, you're dealing with a higher power module. And you have to call things a little bit different. So, once you make that call, you know, it has to be done in the initializing staging of your sketch. You're done. It's the same. But it has to be done. Otherwise, your radio won't transmit anything. It's just going to not work. Got it. And that's not, all of that is only valid for RFM69. For RFM95, 96, and the lower, so the lower radios, they have a separate set of things. Of course, you have to match the frequency and, you know, get your network ID right and all that. But they don't have the power, the setting issue like the RFM69.
Chris Gammell: Oh, because it's just a, I guess it's a different type of setting there, right?
Dave Jones: It's like the window or whatever they call it. Well, the RFM95 and 96, they only come in 20 dBm variants. So, you don't have to worry about setting the right transmission settings for that.
Chris Gammell: But it's pretty similar in terms of you kind of just set it up and you go, huh? Yeah. Otherwise, it's pretty similar. That's great. I mean, this seems like a really nice way to kind of get started into RF and talking between nodes. I mean, I've, other people that I've talked to in the past and they, you know, there's, there are some things out there, right? I know Zigbee was a big thing for XP, Zigbee, whatever. Like there's a lot of different modules in that space, but it seems like this is a good way to, to start at a really high level and then kind of dig your way down into it. And if you wanted to then eventually see like, oh, well, I can go look at the library and see what it's doing. And then, you know, maybe dig down a little bit deeper and implement the library myself. It seems like this would be a good way to do that. Sure. Yeah.
Dave Jones: You could, you could get as hardcore as you can, as, as you want with, with the RF settings. What is the library called? The library is called RFM 69. Oh, okay. So if you go to, it's on GitHub and if you go to the Motino guide, which is at lowpowerlab.com slash Motino or just Motino.com, it'll land you on the same page. If you go to, there's a section down at, on that page called programming and libraries. So that's going to tell you all about how to set up your IDE and how to get libraries and how to get started on the right track. And you've got a YouTube channel as well, it looks like. So you can go check out some of the tutorials there. Yep. I try to keep it, you know, diverse so that people have various resources, both more static as in the form of guides or videos. I put up some, some guides recently for, for the radios just to, to get people started with the, the main differences between these modules, how to differentiate between them, how to identify them and how to deal them, deal with them correctly. Right.
Chris Gammell: Yeah. Make sure you have the right one for you, whatever your application is too, I'm sure. Yeah.
Dave Jones: Yeah. Yeah. So both in terms of firmware and hardware, how to help, help them identify which they should get. I would probably recommend just going with RFM 69HCW. Okay. Why is that? Well, it has the extra power of, you know, the, the, the W and the CW are 13 dBm. So seven dBm difference, that's just quite a bit. So in most cases, probably you don't need, need the low power. And you can always dial down the higher power.
Chris Gammell: Got it. Okay. Right. So, so optimize for power after you get it up and working that kind of idea.
Dave Jones: Yeah. And I think most of my nodes are HW or HCW. I never really had a need or a point in time where I'm determining that, oh, this node has to really go down to a CW or a W. Cause the extra HW is using so much more power and I need to get an extra, I don't know how many days or months from that battery. You know, it's just, I'm trying to optimize and spend my energy where it's getting the most return. And just standardize and, and spend my time trying to make sure that I sleep all my sensors and all the extra hardware that I have on a node rather than try to squeeze out a couple extra micro amps.
Chris Gammell: Yeah. It's like that lowest, lowest hanging fruit kind of thing, right? Where you're solving the problems that are actually going to have the most impact on the battery. Yep. What is the, um, so, so you mentioned, we've talked a little bit about power and range and things like that, but what is, what is the expected range that you tell the users? Like, so if someone, someone's listening to this and they're like, oh, this sounds like this might be a good application or a good, a good tool for my application. What, what is like data rates you expect to get? And I know, I know these are all configurables, but like average data rate, average power of battery and like average distance you'd expect to get.
Dave Jones: So again, it all depends on.
Chris Gammell: I know there's so, I know there's so much stuff here, but let's stick to that. So like RF 69, RFM 69, right? You've got that high power version. Maybe we even take the battery out of that. We just say like, I, I want to go. So I come to you and I say, I want to go 20 miles. You're going to instead say, no, you can't go 20 miles. You can only go.
Dave Jones: Yeah. If you need 20 miles, you'll probably have to look at Laura.
Chris Gammell: Okay.
Dave Jones: And all right.
Chris Gammell: That's good to know.
Dave Jones: Yep. And when we're talking about power figures here, I need to ask you, are you going to keep that radio listening all the time? Because the listening part of the radio uses, you know, about 15, 14, 15, 16 milliamps. That's a whole lot, you know, for battery. So are you going to keep that on for any reason? Well, your gateway is surely going to have it on because it's probably powered by main somewhere. It's going to have a, or a beefier battery. So you're not going to worry about power at your gateway, but your node, is that going to have your listening part on all the time? Well, probably not, right? You're just going to have motion and only going to transmit when motion happens, or you're going to measure temperature and you're going to only going to transmit temperature every so often, every couple of minutes or whatever. So you're transmitting part of the radio is only going to be on for a very short amount of time, a couple of milliseconds. And then it's going to turn itself off or the MCU is going to turn the radio off completely. Just going to put it to sleep. That's how you achieve long battery life. The radio, like all the other peripherals in your node have to be asleep. Otherwise, you know, even one milliamp is a ton of power for a battery operated node. Sure. Yeah. But to get back to your original question, what you can expect in terms of range, it's probably one of the first questions that people ask. Well, what's the range to even come close to giving an accurate answer? We, you have to realize that when it comes to obstacles and the medium where you transmit, right? It's going to be air here on earth. It could be water. I suppose there's applications for that. I know someone's using them in caves, you know, and they have probes underwater to measure data. But let's just assume that we're in air and to even come close to being accurate, you're going to have to compare apples to apples. Meaning you try to eliminate obstacles. You're not going to transmit in rain or in very humid air. And it's going to be line of sight, right? So to get a feel of what you can expect.
Chris Gammell: We made the boundary box. Right.
Dave Jones: And then you have to worry about antennas. What antennas are you going to use? Are you just going to use the monopole wire, which is a very good option. Very, very performant. I think all my nodes, except my gateway, have wires, wire monopoles. It's a very simple antenna, just a piece of wire that... Piece of wire at a certain distance, right? It's a quarter wavelength. So the length of the wire is a quarter wave of the actual transmitting frequency. And so you're going to have to have equal antennas or the same antennas. And they have to be properly oriented to get the maximum benefit from them being oriented right. Otherwise, if they're orthogonal or things like that, we're getting into RF stuff that's a bit more hairy. But they should be oriented the same. And so you have line of sight. Make sure your antennas are the same. They're oriented the same way. And you're probably going to expect from the RFM69 with the default settings of 55.5.
Chris Gammell: This is a lot of buildup at this point, man. I'm really nervous. I'm like, really... Yeah, see? It's really... What's it going to be? What's it going to be? It's three meters. It's probably going to be a couple hundred meters at the least. So that's... That's great. Yeah. Yeah, that's good to know, right? So it's somewhere between 100 meters and a couple K. What's the longest you've seen? In my own use or in my user's use? Just even hearing about it. Yeah, anecdotally.
Dave Jones: I think in my email to you, I mentioned that there was one user that used this RFM69 module in high altitude ballooning. And, you know, ground to... Actually, the balloon was transmitting down to ground where his position was. And it was almost... So it was over 160 kilometers. I want to say kilometers. I don't think it was miles. But it was really long range. And he achieved that with...
Chris Gammell: I thought you said that was Laura. I didn't think that was an RFM...
Dave Jones: No, it was RFM69. Yep. It was. Okay. And it was at some extreme... Extremely tweaked settings, like 600 baud. Right. Exactly. You know, temperature compensated oscillator settings and some crazy tweaks that I haven't encountered in other applications or from anyone else. But you can, you know, you can achieve quite a long range with these in line of sight.
Chris Gammell: That's like the QRP contesting of the RFM69, it sounds like.
Dave Jones: That's the extreme end example, right? On the normal side of things, you can expect up to... I probably heard a mile or two. There's a couple of threads in the forum. If you go in the Motino forum, main forum, there's some range threads. There are sticky threads. And I see one...
Chris Gammell: It's almost like you need like a Venn diagram of like what technology you're really looking at. You know, and it sounds like this is in that, you know, one meter to one kilometer, like, is a good... I mean, that's a good range to know that you're not going to be like, I need to go 100K. It's like, nope, sorry, you know, don't even bother, right? Yeah. And it's like, I'm going to go, I need to go one centimeter. It's like, well, yeah, I guess you'll get the low power, but there's a ton of options at that point. I mean, one centimeter, you might want to do like, you know, even with the contactless NFC type stuff. You know what I mean? Like there's always just all these different ranges, but then the trade-offs are battery and cost and all of the other things. So it sounds like this is pretty flexible though.
Dave Jones: Sure. So I'm trying to cater to 99.5% of the use cases that are common and where this is useful.
Chris Gammell: Especially for the home, it sounds like.
Dave Jones: For the home and way beyond. I mean, industrial, commercial, farming, and all kinds of interesting use cases where range is less important than other important aspects of what these areas can do. Right. So you have a beekeeping operation. You're not going to worry that, you know, your gateway is going to be somewhere around, right? It's not going to be miles away. So range is less important than making sure that these things are reliable, that they can run on batteries for a long time. So you don't have to be out there all the time and things like that. So, yeah, you know, I would say people shouldn't get stuck up on the range question. These can be optimized for range, for very long range. And then if you really need very, very long range, then look at LoRa because that's optimized for that.
Chris Gammell: Yeah. Okay. Okay. That's good to know. Yeah. And I think that's really, you know, like from my perspective, at least, and I, you know, ascribe my qualities to some of the Empire listeners. It's just like, I want to know what's kind of out there. I'm not necessarily going to try everything, but when I get into a problem, I want to know what solutions are possible. And it sounds like this is a good, flexible one for a lot of that stuff. Yeah, there's definitely a lot of flexibility here. So, I guess another question would be, what would be the reason to use this over LoRa? Is it just simplicity at this point or cost? Or what is that difference?
Dave Jones: For me personally, convenience and the fact that it works and I'm already set up with RFM69. So, I don't really have a reason to upgrade. LoRa is more costly per transceiver module. So, the cost is higher for those. And, yeah, complexity. There's more complexity with LoRa. Or at least, you know, libraries make it easy for LoRa as well. Sure. But, you know, LoRa is inherently more complex as a protocol.
Chris Gammell: Okay. Yeah, it's good to know. Yeah. I mean, like, I think that is the, you know, we've been talking about LoRa a lot here. Is there more than one vendor for the RFM69 chip? I mean, like, who, so that's, you said it was a SILabs chip?
Dave Jones: So, that was for RFM12B. The chips in the RFM69 are made by Semtek, as far as I know. Oh, they are too. Okay. They're custom packaged by Hope RF and that's how they make their margins. Got it. You know, they're made in China. Not sure why these can't be made in the US. Maybe because of pricing and maybe because the Chinese can just squeeze that much more. Uh, out of them and sell them at, you know, cheaper prices, cheaper labor and all that. Uh, I'm not sure how tariffs are going to impact that. But, uh, I would like one day to see these being made in the US. I actually had an attempt to, to make these on my own. Um. Interesting. Yeah. Okay. Yeah. So, I made an, uh, a variant of, uh, HHW. Of the RFM69HW. And I was able to make it work, right? It worked and it was, uh, it was just more expensive to make it here in the US. So, and it uses all four or two components. That's a little bit more tricky to, to pick and place. And, uh, you know, it's just not cost effective to me for, for me to buy those chips, the transceiver chips and the crystal and everything else from, from DigiKey, you know, from us distributors is just the component costs, uh, almost exceed. Versus, versus buying the mods. Yeah, exactly. Yeah. So, it was not worth it.
Chris Gammell: I've looked up the RFM65, or 95 rather, the RFM95 module in the past. It's not FCC certified or anything like that. It is just a, a convenience thing, right?
Dave Jones: Well, I think they actually ran some tests in, on their own in China, just to be able to say that they meet, uh, the FCC guidelines. Sure, yeah. You know, they meet those limits and things like that.
Chris Gammell: Right. You can't put in a product though and be like, I'm certified, this is a pre-certified module. It's not like that.
Dave Jones: Yeah. You know, there's, uh, even if you put them in a product, you're still gonna, I don't think they have modular certification at this point. I haven't seen any, any FCC ID for them. Um, and even if you end up putting them in a product, you're going to have to end up doing FCC cert on your whole product as a whole. Of course, having a modular cert would help, but you're still gonna be, you know, spending time and money on that.
Chris Gammell: Yeah. It seems like it's more of a convenient thing to get it out in the world and, and try this thing to get it working. Right.
Dave Jones: Yeah.
Chris Gammell: Well, where can people find out more about you and find out more about low power lab?
Dave Jones: Uh, at low power lab.com. Uh, I have a YouTube channel, try to post things, uh, from time to time. Um, very busy in general, but, um, that's one other avenue where I post updates. The blog is at low power lab.com. The, the guide is at low power lab.com slash guide. And then the shop is at low power lab.com slash shop.
Chris Gammell: Cool. Any tweeting, tweeting in your future?
Dave Jones: Well, not so much. I guess I, I tweet when I post updates. Uh, got it, but people can use it as a feed of sorts. Yeah.
Chris Gammell: Yeah. And people can, first project they can do is build an RFM 69, uh, that, uh, alerts them. The Raspberry Pi gets the feed update, goes over an RFM 69, goes a little flag that pops up and then they, they know that you've posted a new video maybe.
Dave Jones: Yeah. Yep. That's about it. Unfortunately, I'm not very, uh, socially present on the internet. I just, uh, don't have the time for that. Uh, you know, my whole time is, is trying to, uh, be balanced between, uh, family and work. So that takes my whole time.
Chris Gammell: Yeah. Making hardware and making, making family happy. That's a good, that's a good balance right there though. Yeah. Awesome. Well, thanks Felix for being on. And I really, I'm excited. I hope, I hope people will go and check it out and, uh, try out, try out the Motinos and all your products. That sounds like a great starting point.
Dave Jones: Yep. Definitely. Yeah. Thanks a lot. It was my pleasure to be on your show.
Chris Gammell: All right. We'll talk to you soon.
Dave Jones: All right. Take care. Bye.
Speaker ?: Bye. Bye. Bye. Bye. x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
Archived Discussion (2)
Comments are closed. Archived from the original site.
Show archived discussion (2)Hide discussion
arduinoElectronicsHopeRFISMLoRALow PowerMoteinoRFM69RFM95Semtech
Keep current
Every episode, plus the occasional job post, in your inbox.

https://www.nordicsemi.com/eng/Products/nRF52840-Dongle