Top 5 Mistakes to Avoid When Building Your First Aquatic Sensor - On Demand Webinar
An embedded developer by trade and a hardware engineer by preference, Zak Fields knows his way around a soldering iron. He built a water quality monitoring device that worked great… until mother nature put it to the test. The first design had a handful of mistakes you can easily learn from.
In this webinar Zak debriefs his project and shares his considerations to help you avoid making the same mistakes. Learn how to prevent water ingress using off-the-shelf enclosures, how to transmit your sensor data over cellular without a SIM and archaic modem commands, how to make a data visualization dashboard without coding, and finally how to protect yourself from catastrophic loss.
In this webinar, you will learn four essential lessons:
- What to consider when selecting an off-the-shelf enclosure
- How to transport data with a snap-in module
- How to make a no-code sensor data dashboard
- Zak’s advice on where to invest most of your building time
Webinar Transcript for Deploying Your IoT Projects with Scalable Services (and Cloud APIs!)
Speaker: Zachary Fields - Senior DevX Engineer - Blues Wireless 00:00
This is titled Don't Make These Five Mistakes on Your First Aquatic Sensor, because five seemed like a good number. I made a ton of mistakes, and some were way more egregious than others. Some were I guess oversights, not necessarily mistakes, so I just kind of lumped it all together and made a snazzy title. I'm Zachary Fields. So who am I? Well, I'm @zfields on GitHub and zfields on LinkedIn, you're welcome to connect. I'd love that. I'm originally a self-taught programmer, so I come from humble beginnings. I got a finance degree out of college the first time, and then I went to work for a bank software company. I found a How to Program book sitting on the shelf, and I learned RPG. It's an archaic IBM mainframe language called Report Program Generator, but I discovered my passion for programming, so I ended up going back to school and getting a degree in computer science. From school, I was then recruited by Microsoft. I've got a long history in IoT, because at Microsoft, I was a founding member of Windows IoT. From there, I moved into Azure IoT, and then I left Seattle and ended up at Particle, at Particle’s IoT company—they make a couple of neat boards like the Boron, Argon, and Xenon—I think Xenon is dead, so Boron and Argon. Their mission was to be the operating system for IoT, so a super neat mission, fun project to work on. Now I work at Blues Wireless, and our mission, I like it a little bit better than Particle’s, and that's to enable IoT on every device, or for every device.
What Blues does is they created the Notecard. The Notecard works as a data pump, so you just give it a JSON command and magically it’s on the cloud, and you don't have to mess with any of the AT commands, so it makes it a lot easier. I'm an open source contributor and maintainer.
I am a maintainer of the Firmata project, which is one of the original Arduino Libraries that shows up in the Arduino IDE, and also Remote Wiring, which is one of my own projects that I developed while I was at Microsoft. Today, we're here to talk about my first aquatic sensor, which I called the Waterborne Environmental Testing box or W.E.T box. I did this as an Earth Day project to monitor my local stream or watershed. I’ve targeted this talk at people who are somewhere along the “Build” path or in the concept phase of making their own aquatic sensor. The idea is to share what I've learned so people don't hit the same mistakes, or they can look out for sharp edges that I uncovered when I was doing this. The goal is just to help people think about things that they haven't really thought of yet. This is the driving force right here. This is Flat Creek, Missouri. This is right off the family farm. It's not just a pretty picture; I have got a ton of the memories of my childhood from here, from catching crawdads to swimming, fishing, and family picnics. This is something I want to protect, conserve, and share with my kids someday, so it was really important to me to use Earth Day as an excuse to start monitoring the stream quality, because this stream runs through town and runs right past the city's municipal waste treatment facility before it enters my family farm. You know it could have some questionable water quality content, so I decided that it was time to figure out what exactly is happening. Here, I put together a bird's eye map of where the waste treatment plant is and my flat creek is the blue line that runs alongside the big green spot that's the muck pond. The red dots are where I had intended to put my W.E.T boxes. I was only able to get one out because I was still waiting on parts for the second one. The one that I placed was right at the center of the screen—the red dot—which is at the tail end of the waste treatment as it's running on into the lake. This is going to be right after the spillover and everything, so it’ll catch every ounce of pollution that this may or may not be creating—that was the idea.
I was just talking a little bit earlier if you were in here. If you've just joined, this was what I came up with. It's a variety of sensors: I've got dissolved oxygen, oxygen reduction potential, pH, turbidity, total dissolved solids, and temperature. Most of these were provided by Atlas Scientific—you'll see their name right there on those circuit boards. It's solar powered, and it's driven by an ESP32. Let's see, what else. I used my company Blues Wireless’s Notecard to get the data out of the box and send it on into the cloud. This is just kind of the configuration I was explaining earlier that we talked a little bit about the sensors. This is another good time to take a break and to make sure that everybody knows it's totally okay to interrupt if you see something that you're curious about, because the whole point of this talk is to help you guys build. So jump in. Yeah.
Speaker: Audience Member 06:08
So the Blues Notecard uses like LoRaWAN or something to send data?
Speaker: Zachary Fields 06:13
No, it actually uses cellular. So cellular, it comes with 500 megabytes of a prepaid plan that comes with the card, so you don't end up paying for any cellular transaction fees or having to set up an account or any of that stuff. You just take the card, plug it in, it runs off of serial, or I2C, and you send it JSON. Then magically, the JSON appears on the cloud side. That's it. Like I said, that's the big green PCB you see sitting on that lid—the cellular antenna, GPS antenna, and the Notecard is the size of a postage stamp, but it's tucked right in the middle of the bigger green board.
Speaker: Audience Member 06:59
What's the bigger green board called?
Speaker: Zachary Fields 07:03
It's called the Notecarrier. We've got a Notecarrier. The Notecarrier is your companion to the Notecard. These Notecarriers are pretty important because they let you have the pins either on a castellated edge or so that you can put jumper wires to it, which is what I've done here, and also provide power. This particular Notecarrier has a solar charging circuit, you can kind of see the wires coming in at the bottom. It also has a plug in a JST for a LiPo battery tucked around the corner, as well as the incoming line from the solar panel. Pretty handy actually, in the build, it really consolidated a lot of electronics. All right, so…oh, go ahead. I'm sorry.
Speaker: Audience Member 08:05
I said very cool. Oh, yeah.
Speaker: Zachary Fields 08:07
Great. Thank you, I appreciate that. When I collected all this data, and I got it pumped up to the cloud, I was able to make a dashboard so I can have easy-to-work-with data, stuff I could share with people, share with city councilmen and councilwomen. This is a big part that you should think about in your project, because I’ll show you later, but if you can't see the data, it's really hard to make sense of what you've done. So, if I did such a great job, and I've got this great dashboard, what's the matter? Well, it was good for eleven sweet, sweet days, and then it met its demise. Like so many other greats that came before it, its time came too soon. This is part of my learning. I put this box out in April, because that's when Earth Day is. It's also a torrential rain season here, and I didn't really account for that, so it ended up just vanishing from Earth. That's a pretty expensive lesson.
That's what I'm here to talk about today: How you cannot fall victim to the same disaster scenario that I fell to or even a slow death, which would have come to me if I hadn't had just been wiped out straightaway. That's what we'll get into during the talk.
Speaker: Zachary Fields 9:34
At a high level, just to quickly run down some of the lessons I learned: Where to monitor the device diagnostics, not just everything that's outside the box. That was my initial thought, “Hey, I'm here to monitor water quality. That's all I'm going to sense. I'm looking outside at the water, end of story.” Bad move. I needed to know stuff that was going on inside the box, so we'll get to that later. Planning for catastrophic failure—that I absolutely didn't do, and we'll discuss that later. Then, enable remote DFU (Device Firmware Updates). This is something that is available, or was available, to me through the Notecard, and I did not leverage this.
This was a crazy mistake because that would have been a lot better to do. Calibrate the sensor so you can trust the data. It's weird… when you let something run in the water all day and night for multiple days, you start to see weird things, and then you wonder about the sensors or you wonder about what's actually happening. Then, not to be a conspiracy theorist, but you really need to be calibrating so you trust it period, and then you can start to extrapolate from the data that you’re seeing. Don’t forget, this is part of the catastrophic failure, I’ll get my head out of the way. Water is a force majeure. It will destroy everything. Water destroys everything—put that note in your back pocket. You can think big and get sponsors—I'm sure all of you have noticed by now that water sensors are extraordinarily expensive. A lot of times, companies that want to try out a new product or just want their name on the outside of a box, or if you'll do a blog post about them, they will sponsor you. That's how I got Atlas Scientific to help me out.
You want to design an enclosure for easy maintenance because you will be in and out of it way more than you think. It seems like it's just real straightforward. It totally isn't. A big one I learned along the way is to compute in the cloud—we'll talk about that—and spend your time focusing on your core competency, that's another one. Like I just showed before, data needs to be visualized to be understood or shared around.
Speaker: Zachary Fields 12:10
Okay, so the notes on the enclosure that I came away with if I was going to redesign or build another one would be obviously to make sure you've got a tight-fitting lid with a rubberized seal. I used an ammunition box because I thought I was being clever. It had the rubberized seal along the edge, but it didn't have—the plastic was flimsy—and it just didn’t have that tight fit, so humidity and water can seep around the edges of that lid. Then I would lose. Humidity will, it’ll get you the same way water does, it just takes longer. Then another thing is the R-value for insulation. It’s really important to have your insulation around your electronics, because the temperature swing from full sunlight when you’re solar charging to nighttime right before the sun comes up—in my neck of the woods it can be anywhere between 50 ºF and 30 ºF. That caused a lot of condensation with the humidity in the air that was inside the box. You can imagine if your sensitive electronics look like the side of a Coke can and there’s just water collecting and running down the side of it, how damaging that will be. A way that you can help work against this in case you don't have a high R-value is mount your PCBs—they're normally flat right like a piece of paper—so mount them in a way that at least water will fall off of them and not settle. Stack them vertically if you can.
Let's see, what else. You get low center of gravity if you're going to be floating like mine was. I didn't particularly pick a box with a low center of gravity, which makes it want to topple over basically constantly. I ended up giving it a floating skirt, which helped my center of gravity substantially and then it became stable, but this is something you could probably mitigate by having a better enclosure in the first place. A breakaway anchor point: I will call that mistake number one. I didn't have this. I think I drowned my box because I anchored it to the bottom of the stream so it would just float along like a little tow boat and not move, or like a little pull boat. The problem was when the water level rose 10 feet, my chain wasn't 10 feet long, so it just dunked it. I’m assuming that's what happened, and it wasn’t a tree that removed it completely. At least one of those two things happened. I know a tree removed it, and I assume that it drowned first because its last chirp was from that location.
Ah, choose light or bright colors on the enclosure, because of sun. You’re making a greenhouse. This box is going to sit in the sun all day. If it is black, it's going to get as hot… it's going to cook and it's going to cook your electronics. You don't want that. Again, this all happens—insulation can help all of this too—but you can assist your installation success by not having dark colors. Also, I chose bright colors. I used orange so that I can find it, but I still haven't found mine yet today. I needed, I don't even know, lights flashing, I guess? I don't even know what you could have done different from mine. If you ever have to do reconnaissance or go find it in the field, a bright color will also help you figure out where it is. While it would be nice for it to blend into the scenery so it doesn't look like an eyesore, it also will blend into the scenery and you'll never find it again, in case it moves even marginally. Let's see, what else. Oh, write your contact information on it.
Like I said, I can't find my box anymore. Hopefully someone else does. I wrote my phone number on the side, and I'm waiting for that phone call still, but we'll see. Also, get a locking clasp because the sensors are expensive. It’s not like somebody’s going to steal the sensors out, but they might just be curious and look inside and damage your wiring. That was my bigger concern. I didn't think someone was going to go steal all my sensors, but I did think someone might be like “What's in here?” and open it up and then start jockeying around the wires and maybe cause a short. That was one of my big concerns.
Speaker: Zachary Fields 17:11
You have to think about it like this, because what's actually in the box is thousands of dollars of sensors, or, in my case, it was $1,100 of sensors. I tried to illustrate that here with real money. This is what you're thinking about, and you should think about this way because you got to keep money dry and you need to keep your electronics dry. Just really imagine you're putting paper money inside of this box and going to float it, and that will help you build a really good enclosure. If you trust putting your cash in there like a savings account, you will trust putting your electronics in it.
I did some in-field, some “field testing” on it. I stuck this thing in my shower and just let the shower rain on it so I could see how it would handle a rain test. There's another picture that's not showing up on the slide deck. I had a float in my bathtub for a long time to make sure that the seals around the sensors on the bottom held, but do as much testing outside of the water as you can because if this were to cause a problem, then you can be certain that mother nature would absolutely cause me a problem. Let's see. My sensors. I call this mistake number two. Don't forget about the internal sensors. I talked about this a little bit earlier, but if I would have had a really cheap temperature and humidity sensor inside the box, oh my gosh, I would have known. This thing ran for 11 days straight, right? I could have known if I was getting weird sensor readings because the temperature in the box had gone nuts, if it was correlated to that or if it was correlated to high humidity inside the box. This would have been so valuable. I didn't have this information and it would have been so easy to implement. You're talking like a $1 sensor. This kills me. This was a huge mistake. Also, I could have put probably those kinds of sensors you put in your basement so you know if it's flooding. Just the two basic wires so if water contacts both sides—I had, I think six or eight inches in that box and it could easily have sustained four inches of water without having a problem—but if I could have caught it at one inch and given myself an alert, “Hey! Your box is taking on water.” Ugh, that would have been great. I could have saved the box.
You know, these are some of the mistakes that looking back, we're talking less than $5 and I could have saved $1,100. So don't forget to monitor what's happening inside the box, not just what's happening outside the box. This one—monitor with purpose. First off, unless you're Bill Gates, you can't really afford to buy every water sensor that exists, which was my original idea. I'm like, “Oh, I'll buy them all, because they're all like Adafruit $5 sensors.” Then I quickly learned that that's not true whatsoever at all—they're super expensive, so, you really have to be selective about what you're going to choose. Have a target about exactly what problem you're trying to solve. That way, you're monitoring or syncing or whatever with a purpose in mind. This has a lot, so I’ll go on to the next thing: monitor complementary data. I've got a slide coming up next so you can see how different data points complement each other to improve either accuracy or understandability of other sensor readings. Preserving the raw data: You’re thinking, well, I've got a microcontroller, it can do all this computation, I should just change my percent dissolved oxygen into milligrams per liter right there in the box. Resist that temptation. Because what happens is, you can always find out more information later. If you have the raw reading, you can do that calculation at any time. You can do that calculation in the cloud, which is the preferred way to do it. We have a product at Blues called the Airnote. It's made for monitoring air quality as opposed to water quality. One of the things that we learned when we were speaking to scientists about the accuracy, they were saying, just make sure you're capturing raw readings that are not offset.
Does someone have a question?
Speaker: Audience Member 22:11
Oh, sorry, I thought I was muted.
Speaker: Zachary Fields 22:14
There it is, get yourself the raw data, and then at any time if you have more information later or a better algorithm later, you can always rerun that algorithm across the old catalogs of data that came raw off the sensors. That's one thing that you want to do: Resist the temptation to do calculations in the box. Do it in the cloud. Oh, yeah, I was talking about how expensive these sensors are. It's still okay to buy cheap sensors if you can find a sensor that's cheap that does what you want. Think about it like this: The error margin on a cheap sensor is big, but it follows the truth. It's just like, imagine if you had like a chart that showed temperature over time. Imagine if you'd had to draw a line with a big fat highlighter, and you're like, “Was the temperature 72 degrees or 74 degrees? I can't really tell because the line you drew was so wide. I can't really see which one you're going for.” If you had a really fine point pencil, you're able to draw exactly the temperature. The money you spend takes you from a crayon or Sharpie down to a really fine point of accuracy, but they're still all effective and they're generally correct even when they're cheap. So don't be discouraged if you can't afford the million-dollar water quality sensor that you wanted. They're all pretty good to get you in the ballpark. It's just however much error margin you can tolerate versus what you can tolerate out of your wallet. Just marry those together and move on. The calibration of sensor data—I talked about this—I saw weird stuff over 11 days. If you don't trust your data… you have to trust your data, basically. Then you can say, “Wow. Whenever the dissolved oxygen dropped from the daytime into the nighttime, that must mean that there was nefarious action, and they were polluting at night so nobody would catch them.” I don't think that's true, because I didn't trust my sensor data. But it could be true if my sensors were accurate. I didn't spend enough time calibrating. I did the minimum. You need to calibrate this stuff so you believe it, and then you can make real assertions based on what you discovered. All right, let's see. This one is talking about complementary data. This slide is a little bit dense, so don’t let your eyes roll back in your head. I just wanted to put that table in here. Basically, to change dissolved oxygen from a percentage to milligrams per liter, it requires the temperature and salinity of the water. Then you can take those values, stick them in this giant table right here, and then you get—wait, there it is—a little calculation like this one that describes to you exactly what value you should be seeing. All right.
We talked about calibrating the sensors to trust the data. There’s a couple of schemes or ideas for calibrating data if you're able to find high-end third-party testing equipment that someone else owns and can take a sample of the water and see how your sensor stacks up to the high-end one and then you’ll know how far you strayed from this. If you don't have access to that, buy two sensors, and then you have a kind of redundancy that will ensure relative accuracy. Then you know the sensor is not going crazy, if the two sensors are trying to do the exact same thing, that would give you a high degree of confidence in your numbers without having to have some high end or highfalutin testing equipment.
Speaker: Zachary Fields 26:21
Sensor shopping. Like I said before, the ones that I bought were oxygen reduction potential that tells you the cleanliness of water—is it polluted? Is it going to make you sick if you drink it? Then there's total dissolved solids. This is like how much electricity runs through it, basically how many chunks are in the water, how many solids are in the water. Dissolved oxygen sounds a lot like oxygen reduction potential, and they are heavily related. The dissolved oxygen is more of an indicator of how it can support life. There's certain types of fish that can only exist in certain levels of dissolved oxygen. Then when you get down to hardly any oxygen, that's where it's only bottom feeders. Temperature, I'm sure we all know what that is. Turbidity is the clarity of water, and pH just its level of acidity. I put a warning right here—I'll duck down a little bit—just to remind you that not all sensors are designed for prolonged in-situ use, like this box I was floating was designed to be floating indefinitely. Not all sensors can do that. Make sure that you didn't buy a lab sensor that's used to dip in a glass, get a reading, take back out and dry off. There are several sensors that are probe-style sensors that are designed for that versus a probe-style sensor that is designed to sit there indefinitely. Be sure to check that. Don't buy the wrong one—they're too expensive to buy the wrong thing. All right, here's my pile of stuff inside the box. I showed you the picture from outside; this is what all went inside it. Basically the Atlas Scientific sensors we just discussed and the circuit boards that came with them. The other sensors that I couldn't get from Atlas Scientific I bought from DFRobot—they’re in China. It's really reasonably priced stuff. Then just various hardware parts like grommets, don't forget grommets. They are the easiest way to seal your sensor to your enclosure and keep water out, and they're clean and they look nice. What else? I got a lock that goes on the box. Anybody see anything here that they got a question about or they're curious about?
Speaker: Audience Member 28:53
In general, what do you think about breaking the box into two pieces and having the electric components elevated and having a probe module submerged?
Speaker: Zachary Fields 29:12
I like that. Actually that's really great. I tried to achieve that with one, because I was a novice, right? That's why the bottom of this box was submerged in water, and it was counterweighted to keep it below water at all times. In the top of the box, I mounted my electronic components to the lid so it hovered above the water. That was and that's why I had like four inches to play with. Yeah, if you seal it, you can really focus on sealing the electronics. Super smart. In retrospect, I wish I had done that. That's a great idea. What was the other question?
Speaker: Audience Member 29:59
What about using the onboard GPS to find the unit?
Speaker: Zachary Fields 30:08
Yeah, that’s what a smart guy would do. Unfortunately, I'm not one of those. I'm a lazy guy. I thought about this and then Earth Day was coming fast, and the end of my Hackathon was approaching, so I just deployed it. Since I didn't give myself the ability to—I also didn't program remote DFU so I could do a device firmware update—if I would have at least done that, then I could have got to the GPS later, but I totally didn't program it that way, even though it was available the whole time. This was a huge oversight. I just thought I was going to have time. Like I said, it ended up only living for 11 days, which again, also blew my mind. It shouldn’t have: I should have planned for catastrophic failure. That’s one of my big points. I just didn’t. It was an idiot move in retrospect.
Speaker: Audience Member 31:13
But you live and learn. I had a buoy I deployed off the coast of Maui that webcast the live whale songs for 12 or 14 years. And you know, that was saltwater and the waves and all of that. So every season, you learn and you get to improve, or you lose everything. Yeah.
Speaker: Zachary Fields 31:36
Yeah, it hurts. That lesson hurts—the lose everything lesson. I just went through it.
Speaker: Audience Member 31:44
Yeah, well, that's where you pick yourself up and pray again. Yeah.
Speaker: Zachary Fields 31:49
Yeah, I've got skin in the game, too. Like I said, this is my beloved family farm. I'm going to put these back out, it just—I just took it right in the keister. It hurt.
Speaker: Audience Member 31:59
Well, that's a project with heart. Yeah, the whale song project was like that, too. I mean, I love the whales. I love the ocean. This is a way of sharing that with the world so people care about it more. That's the kind of project that really is meaningful. Well, water is such a precious resource and getting more and more so. I'm in California now, and we're in a big drought. So that's a cool project you did there. Really, really meaningful work.
Speaker: Zachary Fields 32:39
Awesome. Thank you. Let's see, are there any more questions before I move on?
Speaker: Audience Member 32:45
Just a note. The last year my team was working on a sensor, and we were like, there's this resin you can get a two-part mixture that super waterproofs. Whatever is permanently frozen inside of it, but for the base of a sensor cluster, that'd be a good material to seal that connection.
Speaker: Zachary Fields 33:07
Yeah, no, that would be really smart, so it's like kind of a cap. Yeah. I like that. Again, had I really been thinking I should have done something like that.
Speaker: Audience Member 33:30
Yeah. You know, the deeper you go, the more pressure you have to deal with and the seals become even more important.
Speaker: Zachary Fields 33:39
Right, Yeah. I was just superficial. I only had atmospheric pressure, but yeah, gosh, I can't imagine any ocean stuff yet. I'm still trying to do creeks.
Speaker: Zachary Fields 33:51
All right, so, what are the big things to take time to plan for when you're doing this hack? Here's the difference specifically between data and dashboard. There's a huge difference. As far as readability goes, or even seeing a data trend, because on the dashboard there—it's not very visible because the line is yellow—at the bottom, you can see a time graph that lets you at least see what was going on, on the sensor as time passed. That's really valuable information. It's also captured right here in this; it’s just impossible to read. Make sure you set aside time for this part, but you don't need to set aside a ton of time. Use somebody like Ubidots and just pipe your data to them. Then it just kind of builds itself. I think I picked a widget, but that's it. It did all the rest for me.
Speaker: Zachary Fields 34:47
All right, so now the last thing really is firmware considerations. I put little Notecard bullets on these. Oh, by the way, if you're interested in incorporating the Notecard into your project, I'm going to have a coupon code in the last slide. I'm just going to leave it up, that is 15% off for everybody that's attending the webinar. So we're almost to the end but just hang in there. We'll get to that, and you guys can buy one. If you don't want one, I still have really enjoyed giving this talk. The Notecard bullet points are on the things that are assisted or managed completely by the Notecard. It's not just a coincidence, because the founder, Ray Ozzie, he built the Notecard for environmental sensing, remote environmental sensing, to solve like a lot of the problems. He was having difficulty with LoRaWAN and the fact that you have to share bandwidth, and he wanted access to a cellular connection.
There are cellular companies like Particle, but their modem wants to stay on all the time, so it's not very convenient for battery or any kind of low power implementation. That doesn't really help it be remote very good, so then, this is all he [Ray], with those two problems he was facing, the Notecard was fashioned. One of the neat things about this is solve the problem at hand. Solve the one problem you came there for—to discover if there's life in the water, or if there's pollutants in the water. Spend your energy writing that firmware. Then you can just send a JSON blob to this Notecard as a serial transaction, and away it goes. That's it. It's already on the cloud. Done. Log, it's over. It solves that problem.
Then I just go down the list. K.I.S.S and Test: keep it simple and test it. That’s why I'm saying, don't do a whole bunch of advanced calculations inside the deal, just get the data out. That’s also less that can go wrong and less that you’ll need to update. Just test, test, test your firmware to make sure that it will run basically indefinitely without human intervention.
Think about how you're going to update. This is another cool thing that the Notecard does, because it allows you to drop firmware down through the cellular connection so you can push a remote update in case you were an idiot and didn't enable the GPS to help you save thousands of dollars of equipment and you just thought you can do that later. It helps with that kind of a situation.
Make sure that you send a heartbeat so you know that it's alive and didn't just die out there in the water. That's another thing. The Notecard constantly chirps a heartbeat.
Power management. I assume that since you're monitoring water, you're not near electricity, those go together pretty good. Or they don't go, whichever way you want to say it. You don't find matings of power and water together very often, so you'll probably be running off of a long-life battery or solar power or recharging some kind of rechargeable battery. The Notecard idles at eight micro amps, so it can just sit there and sip power and then wake up your microcontroller whenever you need to send away data to sample your sensors and send away data.
Sensor tuning. This is something—I don't mean calibration—I mean tuning. This is more like the electrical characteristics of the sensor itself: How long does it need to be awake for before it starts collecting accurate readings? Sometimes they wake up instantly and they just immediately work. The total dissolved solids is literally two electric probes and you just send electricity through it and it comes back how many millivolts ran through it. It takes no warmup time. I don't need to waste my battery letting the sensor warm up and then get the sample, you just slam and get it. I think I was taking 100 samples and taking an average and sending that on. Versus there was a—I can't remember off the top of my head—but one of my sensors took almost a full second to wake up, warm up, and be ready to take good readings. This tuning is really important because you want to make sure that you're using the sensor to get the best results but also require the least amount of power so you can sit there and exist on a battery.
S.O.S mode: There’s another one of my great mistakes. I did not build that in. If I would have known I had water in the box or if I would have known anything, I could have a remote signal down that said, “Hey, there's a god-awful rainstorm, go into SOS mode so I can make sure I'm getting GPS signals all the time.” I didn't do that, and I can't stop kicking myself for this one.
Then data export. Yeah, so the Notecard, it has onboard GPS so it can help you with SOS mode. The data export again, that's the whole primary use case of the Notecard—just to get it off. Data export, what other things could you do with the data export? You could get a canoe and go out to your sensor out there on the water and plug a computer into it or take a SD card out and swap a new one in. That sounds extremely inconvenient. For me, it was wade up to my belly button in freezing cold water and go into the box—I didn't want to do that. You could use some form of Bluetooth so if you got near it. For me, it was not 20 feet from the shore, so I could have sat on the shore and Bluetooth chatted with it to get data off of it. But then I'd have to write some kind of something to take the data, collect the data, and then do something with it. Which again, that's a lot of work I would have to do when I had a hard deadline of Earth Day.
I wasn't trying to give myself a job; I just needed to get it done. LoRaWAN—LoRaWAN is great, because you've got really long coverage, really wide, long coverage into places, it's got low data bandwidth, which can hurt you sometimes depending on what you're collecting. It also is shared, a shared connection, that's probably the biggest problem with it, is that you don't always have access when you need it. Then there's cellular, and cellular can be a problem, like I said in the Particle situation, because it requires a lot of battery—the cellular radio takes battery to keep that thing not hot as often as you can. That's where Blues has fixed that and flipped it on its head so that it only uses exactly what it needs. Then I gave an example over here of what the JSON object looks like that you send to it whenever you're sending sensor data. It's literally this simple. In Python, you just use the Notecard library, you create a JSON object, as simple as what you see here. Then you say card.transaction and give it the object it's gone. That is it. There are no AT commands, there's nothing to manage the cellular connection, that is all handled by the Notecard itself. You honestly just send it and forget it. That's how it works, but it's fun to drop that in to just emphasize how easy it is. It's hard to believe how easy it is until you use it.
Power Management. Some of the things I was talking about, if you get long-life batteries, like the US Coast Guard uses Tadiran batteries, they seem to last forever. They're not, they don't have much of a lead current, so you can stick them in something, and they just seem to exist indefinitely. It's not indefinite, it's like 30 to 40 years, but it's insane. They just don't leak, so it only loses what you use out of it.
That's one option: Don't ever think about charging it. Maybe your project is only going to run for three months or a year and you can put a Tadiran in it and that's fine. Like you didn't need to charge it. If you don't have, if that's not going to work for you and you want to last longer, or you plan to use a lot of battery for whatever you're intending to do, solar charging with a LiPo is something—that's the option that worked best for me, because it gives me a lot more flexibility because I can modify the behavior based on how much battery that I've got available to me.
Speaker: Audience Member 44:11
Quick question. How do you think like a couple 18650 cells would have fared versus having the solar panel charging the batteries? How long do you think that could have gone for?
Speaker: Zachary Fields 44:27
I like 18650 rechargeable batteries, and they can plug into the Notecarrier. I just used what I had handy. I was being cheap. I like to use the Adafruit LiPo pouch, but I ordered them and they just didn't get here in time, but I had 18650s to plug into it, and they're rechargeable. That's totally a viable solution and they can last for a long time because they've got a lot more capacity than a regular battery does.
Speaker: Audience Member 45:04
Okay, cool. So you used Arduino with that Notecard. Does the Notecard get powered through the Arduino? And is it compatible with the Raspberry Pi also? Obviously, it would be, right?
Speaker: Zachary Fields 45:18
That is correct. Yes, it's compatible. We have, let's talk about those things separately. The answer is yes to all the questions. The way that it works with the Arduino. Because the Arduino is a microcontroller, I powered the Arduino through the Notecarrier, which has the Notecard on it. The Notecarrier had my solar charging connection as well as my battery, so it had the full power management IC on it. It could do the charging; it could do the battery. The Notecarrier was kind of my power source; it powers the Notecard, and it powers the attached MCU. I was using an ESP 32 with the Arduino—whatever it is—LiPo or whatever you want to call it.
I had the Adafruit 32. That's what my project had. As far as the Raspberry Pi goes, yes, you can do the exact same thing, as I just discussed, or we have a Notecarrier designed to go as a HAT on the Raspberry Pi as a Pi HAT carrier, and it inverts the power behavior. It takes its power from the Raspberry Pi because the Raspberry Pi typically consumes more power than the Notecard, whereas it's the reverse situation for an MCU. It typically consumes less power than the Notecard.
Speaker: Audience Member 46:55
Oh, that's cool, because I got a Pi HAT 18650 cradle for a Raspberry Pi, but it's just been sitting for a year since I bought it, so if that could power the Pi, the Pi powers that HAT, the Notecard that might be…
Speaker: Zachary Fields 47:13
You would all run just right there off from your 18650s. Yeah, so that's available on our website. Like I said, in like three or four slides from now, I got a 15% off coupon that works on all that stuff. Yeah, so definitely check that out. That would totally work with your project and like I said, it just makes it dead simple. Then I'm going to have to think about, put myself in the mind of Raspberry Pi right now. The Notecard typically can put the host MCU to sleep. I don't know that works with the Raspberry Pi HAT. I don't know that it doesn't either. This is something I haven't tried yet. Okay. If you have like a microcontroller, the Notecard has a latching interrupt, so the microcontroller will send a message to the Notecard and say “Put me to sleep.” Then the Notecard pulls this latch down, and then it disables the enable pin of the microcontroller, and it goes to sleep. Then the Notecard, whenever you told it to put you to sleep, you also told it, “Wake me up in a half hour,” “wake me up in an hour,” “wake me up in five minutes,” “wake me up when you get jostled,” whatever. It has a handful of onboard sensors, like an accelerometer, so let's just focus on the accelerometer. I don’t want to say something that's not true. If it gets jostled, you can have it so that it wakes up when it's jostled. You can have it so it wakes up at a timing interval. There's a couple others that I can't think of right off the top of my head, and I don't want to make up something, but it's pretty clever the way that it works. It allows you to just sip power, because like I said, it idles at eight micro amps, so it's nothing, and then it'll connect as necessary.
All right, and then DFU—I can't harp on this enough. I neglected to put this in because I was in a hurry. We have the ability to do this through the Notecard, but I was just being lazy. It’s already written for me—I have to just copy and paste the code in. I was that lazy, so I deserve to lose $1,000. Lazy is what happened. But yeah, if I had done that, then I could have been pushing new firmware that took advantage of that GPS sensor. I could have been like, “Hey, since you're floating down the creek now or completely lost or you're in the lake, or I don't know where it's at anymore, send out some beacons so I can go collect it.” That would have been great, and I could have just pushed new firmware that only sent a beacon. It didn't even have to be, doesn't have to do anything else at that point, right? I just need to save it. Like I said, that was a swing and a miss, but it's available through the Notecard so you can send firmware down, and with the Raspberry Pi we’ve got a deal where one of the guys at work set it up so you can push Python scripts to a cloud storage place that then gets pulled down by the Raspberry Pi, and then it refreshes its Python script. It's like having new firmware.
Speaker: Zachary Fields 50:17
Here’s my picture of the catastrophic failure. You saw that pretty creek at the beginning if you were here, and this is like, WTF, whoa, that’s flooded. I was—it just decimated everything in the water. This was after it calmed down enough that I could drive to this bridge. It came over the highway, so it was insane. But that's how I lost my box, was this. Again, I could have planned for it had I just taken a couple of extra steps that were available to me, and I just was lazy. Don't be lazy. That's probably the advice: Plan for this because if you don't, you're just going to guarantee that this is what's going to happen. If you do, it'll never happen, but if you don’t, they’ll get you. What I would have done, I would have added the salvage mode. I talked about how a GPS location and the sump pump would have saved my bacon.
Okay, so yeah, it sounds like you can move off the free plan, which makes sense.
Speaker: Audience Member 1:00:50
So if I have this out in the ocean, and I didn't want to retrieve it, I could up the plan?
Speaker: Dan Wilson - Marketing Lead - Blues Wireless 1:00:59
Yeah. Basically, the plan, if you go to Blues.io, and you look at the Services section, which is where we talk about data egress services, you'll see there's a free plan. Then there's another plan that's also free for products, for projects, and then we charge. These decimal points are hard for me to figure out, but it's 0.00075 of $1 per event, so it's fractions and fractions, fractions of a cent here to route something out.
Speaker: Zachary Fields 1:01:32
And that's only after you spill over your free ones, right? Which renew every month. Is that true? I think so.
Speaker: Dan Wilson 1:01:41
Sounds right. I've never been asked that before.
Speaker: Zachary Fields 1:01:44
It sounds like if you're a guy like me, or if it's just you making specifically a buoy in the ocean, and you have one, you probably won't hit 5,000 events a month or three or five, I don't know which one it is because like that would cost you a lot of battery to do that.
Speaker: Dan Wilson 1:02:04
It's also fair to say if the workload you're imagining is streaming video or pictures, then this product really isn't designed for that. It is designed for sensor data.
Speaker: Audience Member 1:02:17
Gotcha. So no audio either then?
Speaker: Zachary Fields 1:02:21
You can do it, but you'd want to do it exceedingly rarely. One of the things that we do, actually, we use Edge Impulse on a microcontroller and let it determine what's important information. If you're going to make a big transaction, like audio, you would make sure it captured a whale song exactly and not a passing boat or something else so you're making the best use of what you're sending across. There are ways to filter anything down so you can maximize your data.
Speaker: Audience Member 1:03:02
Gotcha, you could say, “That's boat noise; don't record it.”
Speaker: Zachary Fields 1:03:07
Yeah right, exactly. Like the Edge Impulse neural network model, we partner with Edge Impulse a lot. That's why I'm saying their name specifically, but it can be any neural network or learning.
Speaker: Dan Wilson 1:03:19
It’s also worth mentioning that if what you're trying to do is analyze the whale songs, then maybe there's characteristics of whale songs that equal a happy whale, and one that's a whale in distress. If you can teach that model to Edge Impulse and train it through sampling, then they could just tell you, “Hey, there's a distressed whale at this GPS buoy,” or “there's happy whales here,” and you wouldn’t need to ship the audio somewhere. These types of Edge processing, it's actually available and more simple to do than you would think. I don't know if that's your workload, but sometimes that's a better path forward.
Speaker: Audience Member 1:03:59
Well, that's valuable to know for the research community. Yeah. But people have spent decades trying to figure out the meaning of the songs and what they're saying. So that's a whole other project.
Speaker: Zachary Fields 1:04:16
Yeah, I mean, another thing you could do is you could get a flash and record all of these whale sounds on like, an SD flash, like an SD card, record your whales first off, use machine learning to make sure it's a whale song, so when it’s a whale song, record the whole thing so you're not wasting your space or whatever. Then you can report the diagnostics like, “Hey, the SD card is getting full. It's time to come fetch it” or “This SD card barely has any activity. Don't bother to drive the boat out here.” It's perfectly valid for that, because it’s way less than what you pay for boat gas, you would pay for a Notecard.
Speaker: Audience Member 1:04:54
Absolutely, yeah. Plus, we lost one of our buoys crossing the reef during high surf, because the batteries were dead before we put solar panels on…
Speaker: Zachary Fields 1:05:09
Yeah, diagnostics all day. Then when you want to get your whale sounds, you can use it for telling you about the whale sound while you recorded it some other way, and then you know that it’s time to go pick it up, and you're going to have a bountiful harvest for driving. It's like knowing that your lobster trap is full of lobsters, instead of pulling up an empty one, you know? You're not wasting your time.
Speaker: Audience Member 1:05:32
Yeah, I can think of a thousand ways based on what you're saying that it could be really helpful. Thank you. I'm sorry to interrupt.
Speaker: Audience Member 1:05:41
Okay this is kind of random, but it’s outside of my area of expertise. Is it possible to transmit audio as like, data and reassemble it as a compressed audio file after it's received? Kind of like a, what do you call that, Base 64 Image?
Speaker: Zachary Fields 1:06:05
Yeah, okay. Sort of. The answer is roughly, that's correct. It's not exactly the way you stated it. We were looking at doing, me and the founder, were talking about trying to see what that would look like, but we haven't done that experiment yet, so I can't give you any kind of real reality about how that would turn out. Like audio compression, it’s more, it might have been, I don't remember, we might have been trying to talk about text to speech instead of actual audio. Maybe you're just sending like a word, which is way smaller than a WAV file. I don't remember if we were trying to make walkie talkies. We had this, we were brainstorming this, but we haven’t had time to piddle with it yet, to be honest with you. I don't remember, like I said, it's kind of one of those, we were just like, this conversation wasn’t official, it was like “If this were to happen…” and we're thinking about it right now. We kind of did this little mental exercise. I don't remember, it was a while ago, so I don't really remember very clearly what we decided, but we wanted to test out some of that stuff. Still, audio is not as bad as video, but it's still big, and you're going to burn up. Just remember, it's 500 megabytes. If you have one megabyte audio files, and you got those once a day, and you were happy that a year and two thirds was enough time for you to record one megabyte of audio a day, then that worked perfectly for you. I mean, at the end of the day, you don't need to go out to 10 years. It's 50 bucks, right? Think of it that way. We had a company that was talking about putting it in concrete to watch concrete cure from the inside. It's obviously going to be dead, and they were just going to use the bandwidth really fast, because they didn't care—they had way more bandwidth than they needed and then it would die, but $50 was so much cheaper relative to what the project—whether the concrete cured correctly or not. That is, they didn't care at all. It was like a complete commodity to them. So you can use these and lose them too, and you can just use it, buy new one and use it, buy new one, or a throwaway case, because they're not dirt cheap, but they're not insanely expensive either.
Speaker: Audience Member 1:08:38
Was that the Swan that you had in your sensor?
Speaker: Zachary Fields 1:08:41
Yeah, so the Swan is our new product. Yes. This was created on Earth Day, so it did not have a Swan. I had the ESP 32 from Adafruit. The HUZZAH32, but any Feather-compatible MCU will work. Ours is a really cool Feather compatible, and I tested the firmware on it and it still works. Just, you know, it can easily be swapped. But it didn't exist when I made this project, or it would have had that.
Speaker: Audience Member 1:09:13
Oh, ah, interesting.
Speaker: Dan Wilson 1:09:17
There's another question from the chat when we’re finished with this one.
Speaker: Zachary Fields 1:09:20
Okay, was there anything more you wanted to discuss about the…
Speaker: Audience Member 1:09:24
I'm just going to say I'm more comfortable with the Raspberry Pi, but I might if I wanted to go that route, I'm kind of leaning towards going with the Swan. Do you guys do any sort of mentorship or development support for this hackathon?
Speaker: Zachary Fields 1:09:38
You can contact me; I'm happy to help you. I've got like, probably about an hour a week I can offer to it. I don't know how to get in the official pool. I didn't put my email anywhere on this slide deck, but you're welcome to reach out to me and I will help you as I can. I can't give you like full hands-on help, but I can help. If you get stuck, we also have like a really great forum. You don't really even need me—I'm happy to help you, don't get me wrong—but we have a great forum, and we have a guy on there 24/7, who just answers everything. A lot of the questions you're going to have, have already been asked. If you come up with something new, it's like Johnny on the spot, I think that he answers them in like three hours—that’s his average time—that's not a guarantee. I'm good, but he's really fast to answer, so you're not left waiting for days like that. There's tons of people that have commented how much they appreciate how rapidly the response comes back.
Speaker: Dan Wilson 1:10:50
Yeah, Blues is by developers for developers, so we do spend an inordinate amount of time and focus on making sure that developers can be successful with materials and support and training and all the different elements that you can imagine. I hope to give you some level of confidence there, that it's something we focus on and measure all the time.
Speaker: Zachary Fields 1:11:13
It's also, I can't emphasize how simple it is. I'm going to back to this slide real fast just to show you that Python again—that's real. This isn't made up. There's one more of these JSON objects that tells it what you named your project on your Notehub account, and that's it. It's like two JSON: One is a set up JSON that you send one time ever to the device. Really, you just send it at the beginning of each time it boots. Then every time you want to send data, it looks like this. That's it. That's literally it. It is truly just dead simple. You'll be like, dang, it's great. We're there to help too, like I said, we're hugely developer focused, like Dan was saying, and I will figure it out. I already promised the people at the hackathon when they told me about the hackathon that I would help out by offering up some of my time. I need to figure out how to get in the system. Then you can hit me up directly, but like I said, our forum is really great, actually.
Speaker: Dan Wilson 1:12:25
The current question is, “My impression is that maintaining cellular connection also consumes data that counts against the allowance. What's the magnitude of that?”
Speaker: Zachary Fields 1:12:36
That's true, the magnitude is controlled by you. Every time that you connect to the tower, there will be a handshake. Like I said, it's not our data plan, it's our Notecard, so we can't control, it's a fixed 500 megabytes. We can't say, "Hey, that's on us so we take that against it.” We can't do that. But you're right, it does, every connection counts against it. What you want to do is either stay connected, so if you have the battery, stay connected so you don't pay for the handshake. If you don't have the battery, then the Notecard—I didn't mention this, and I totally should have—works as a queue. You queue data against it, so there's little payloads that I sent back, I showed back there, they just queue and then you flush the queue whenever you deem it appropriate. For mine, I wanted updates from this thing every 30 minutes. What I would do is, but I wanted samples of data every three minutes, so I would sample, sample, sample, and when the queue size was 10, I would flush it. Then that way, I’m only paying for the connection every 30 minutes, and that’s a pretty aggressive connection frequency. This is monitoring water. The monitoring was happening every three minutes, and I just was aggressively taking the data away so I could make a dashboard that looked good in a presentation. Really, if you are okay with your data being a bit behind, you could get massive battery savings where you can constantly sample queue it into the Notecard, and then at the end of the day, just tell the Notecard to phone home and send all of your queue. Then you wouldn't be paying very much for that transaction at all, and you will be getting the value of having timestamp data points throughout the entire day.
Speaker: Audience Member 1:14:45
This is a quick question on that. Do you get an acknowledgment when you send, when you transmit? So like your device was underwater and couldn’t make a connection when it tried to send. Does it try to resend after a certain amount of time?
Speaker: Zachary Fields 1:15:00
All right, so the Notecard has a microcontroller on it itself. That's why it's so simple to use. It has its own retry logic that is intended to be battery conscientious, always. That's its default mode. You do get a response from that microcontroller. When you instruct it to do something, you can see that it failed, if you need to go to that level. Also, remember, the other half of this is when it's successful, it shows up on your Notehub account, so it's just there. So at some point, it's either there or not there. Right?
Speaker: Audience Member 1:15:42
But for if it's not there, I wanted to do the…
Speaker: Zachary Fields 1:15:45
For the retries. Yeah. Like I said, it does have—we dialed it back—it actually had a really aggressive retry, and it just decimated our batteries. We're like, “Oh, crud,” so we dialed it back to be battery conscious. But yes, you can, I'm trying to think on the fly about what that code looks like, whenever you send it stuff. Yeah, yeah, sorry, you can ask for its status, and it will report to you “I was unable to connect.” Then you can say, “Sync now.” That's exactly what you do. Sorry, it took me a minute, because I was trying to program in my head on the fly there. Yeah, so what you do the whole time, and then you send that sync instruction, it just kind of says, “Okay, I received your instruction,” which lets you know that there wasn't a failure on the I2C or UI lines. Then you would check back in like, I don't know, whatever you thought was an appropriate amount of time, maybe 5 to 10, 15 seconds, and say, “Tell me your status,” and status will come back, “Okay” or it’ll give you an error message. If the status, if you say, give me status and it responds with, “Oh, didn't work,” then you're like, “Sync now.” You get to play that game until you were satisfied that the data was gone.
Speaker: Audience Member 1:17:03
Is there a way of asking the Notecard?
Speaker: Zachary Fields 1:17:06
Sorry, I was going to say, it also tries to get that tower like, two or three times before it just gives up on its own without you asking.
Speaker: Audience Member 1:17:17
Okay, is there a way of asking the Notecard, “Are you connected?” So as you mentioned before, I could stay connected all day, if I want it to, if I'm in an environment. Can I ask the Notecard “Are you connected,” just in case it's lost it, and then I'm not going to try? I'll just, you know, store my data and wait till you wake up?
Speaker: Zachary Fields 1:17:36
Yeah, so basically, it manages most of that on its own. You can take a more active role like what you're suggesting by clearing the status. We have really good diagnostics. Again, like I said, this was a purpose-built device by Ray. Fukushima, you know, that reactor in Japan that exploded with the Tsunami? That's what birthed the Notecard, because he was part of a citizen group that came together to build a solution to monitor air quality to see if people were getting poisoned. He ran into all these problems of trying to capture data remotely off batteries and get it up to the cloud. So he’s like, “This is crazy. I need to make a solution for this.” All these diagnostics and things that were important, he didn't just delete that stuff, because he needed it when he was building it. It was built, very purpose built, so all this super polished diagnostics are available to you where you can query the status and a whole bunch of informational stuff about the Notecard itself, if you're wanting to.
Speaker: Audience Member 1:18:55
Okay, perfect, thank you.
Speaker: Zachary Fields 1:19:00
Oh, and just one more thing. Our APIs can be viewed at dev.blues.io. You can see in the reference section, there's like a Notecard API that will give you all the, I think if you look under card, it's like card status, card version, or a whole bunch of stuff, you can kind of see what the API allows and what a simulated response looks like.
Speaker: Audience Member 1:19:27
In terms of configuring the backend, how do I get it to point to my application server?
Speaker: Zachary Fields 1:19:37
Yeah, so this is also super awesome. It pops into your Notehub account. We have these things called routes, and a route is basically exactly what you want. We have preset routes where you can automatically just go into like AWS, Azure, like a huge list of stuff. Then we have one where it’s custom, and then that's where you'll go in there and you'll just set your URL, any headers that you need, if they have tokens, or whatever. Then you'll tell it to send on that JSON blob. I did it, I “abused” our routes there so that it can send to Twilio. Now I send myself text messages from my mailbox right now. That's my favorite everyday project: I just took this thing so whenever the door opens on my mailbox, I get a text message, so I know that my mail arrived. Anybody else have a question?
Speaker: Audience Member 1:20:50
On the website there's the Raspberry Pi Starter Kit and the Feather Starter Kit for Swan, which is pre-ordered. [Editor’s Note: At the time of this webinar, Feather Starter Kit for Swan was pre-ordered. The product is now in general availability] I'm kind of thinking I want to get one up and running as fast as possible and focus on the enclosure and maybe separating the sensors with the tether. A, would the preorder arrive in time to have time to work on that for this hackathon? And B, if I went with the Swan and things are open source is it literally just plug in the sensors, hook up the HAT, hook up the battery, plug in some kind of API key that I have to send the data back to my or your backend, the Blues backend, and then just give it power? And that's it?
Speaker: Zachary Fields 1:21:47
Yeah, I think so. I'm going to recap that to make sure that I am not agreeing something that I don't understand. You buy a Notecard, Notecarrier, and Swan. You don't have to buy the Notecarrier AF; you can just buy like a Notecarrier AL, which has all the battery and power management stuff in it. This is what the AF morphed from, it was an AL that they added a Feather socket onto. If you want to get going today, just go buy an AL, get the Swan. You apply power to the deal and you'll send a single, one single instruction, you can actually you can plug it into your computer and go to dev.Blues.io, and we have a web serial terminal there. If you're in Chrome, then you can just configure it to your account, right there. It will start sending data to your account from your laptop. Then, just whatever you send to it from your Arduino that you get going on the Swan, or if you aren't programmed from straight from the STM 32, whatever you write and send to it will just show up there without any kind of API key. You just have to configure it one time. Yeah, it's pretty much just apply power. It's not even an API key. It is your project. You identify your project, and then on the backside, you accept that it's yours. Then I think that that's it. I'm thinking on the fly right now, so don't pin me to this, but I'm not leaving out giant steps for sure. It's not like it's way harder than that. Yeah, it's like you get going that fast. It's hard to believe.
Speaker: Audience Member 1:23:44
You said Notecarrier AL?
Speaker: Zachary Fields 1:23:47
Yeah, Notecarrier AL. That's like LiPo.
Speaker: Audience Member 1:23:53
I don't see that here. Do I need a dev kit that has the cellular module and the Notecarrier?
Speaker: Zachary Fields 1:24:02
Hmm, let’s see. You can always buy them separately. You don't have to buy, I mean, the kit is just then put together, I think like on Amazon, like, buy this and that, buy these three items together and it's the same price. I think that's what the kit is. I don't know that. You can just choose a Notecard, an AL, and the Swan, and you're off to the races.
Speaker: Dan Wilson 1:24:28
Yeah, I think the AL might be listed as Notecarrier A with LiPo battery connector. Does that sound right?
Speaker: Zachary Fields 1:24:34
That does sound right, sorry. I guess we have internal slang. I'm not speaking marketing speak.
Speaker: Audience Member 1:24:42
I have a question. Oh, good. You can hear me; I wasn't sure. I'm actually the one who sent the question earlier about Particle and the not-for-profit I'm working for. It's kind of cool. It's in Buffalo, New York, and it’s basically an electric bicycle share for economically disadvantaged people. They received over 5000, I'm sorry, 3500, bikes from Jump Bike after Jump Bike was going to throw them out. A local company got them, and I've been working with them on hardware. That's why I was asking about Blues versus Particle. We're not quite at the point where we are actively developing hardware, but we're getting close on that. The question I have isn't related to that; I just thought I'd plug them. They're called Shared Mobility. Anyway, have you thought about for general purpose, IoT kind of stuff, getting rules, recipes for “if this then that?” I could see this being used for like, even like a home IoT network where you might have, say, a pool filter that you'd like to turn on and off, or you know, something in your yard where you might want to communicate. I suppose you can use LoRa, but cellular might be a choice too.
Speaker: Zachary Fields 1:26:23
Yeah, so I considered that and I am actually, I was pushing for that. It seems like we have a lot of people in the company, they use Zapier, and they like the zaps instead of IPs, or whatever you call them. I don't know what—
Speaker: Audience Member 1:26:41
Speaker: Zachary Fields 1:26:43
Yeah, that's what I use. I use that for a bunch of stuff. I'm biased, but the data… we were wanting to get zaps on Zapier going first, and then I don't know. You know, that's maybe a TBD thing. I don't know where our resources are. I can't speak to that at all actually, because I don't work on the hardware team, but I put in a request for it. I'll use you as an example of why my choice is really important.
Speaker: Audience Member 1:27:18
Go ahead. Shamelessly, I'm going to ask, are you guys hiring? I'm an embedded developer, DSP and IoT stuff. I'm looking for work. Do you have stuff on your webpage? I can just look there.
Speaker: Zachary Fields 1:27:29
I'm sure we have a careers page, and we're growing. If we're not now, we will be. I'm not like a hiring manager.
Speaker: Audience Member 1:27:41
I just had to ask.
Speaker: Zachary Fields 1:27:43
That's cool. Yeah, that'd be great. Like I said, we're growing, so we will be. That's a fact.
Speaker: Audience Member 1:27:49
Yeah, it seems like you're in a good position. Thanks for the answer about Particle because I, I’m sort of investigating both, and the idea that you don't have to buy into a whole system, you can just use it as a peripheral is a big deal.
Speaker: Zachary Fields 1:28:05
I think that's so underestimated, because like I was working actually, before I worked at Blues, I was doing a side gig with a bunch of people that have a semi-truck trailer or some random thing that they built. They were just like, we just need IoT on this thing, and I was like, I don't know what to tell you, man. Like, you need to rewrite all of it, or understand how to talk to a modem, which is horrible. Which this eliminated. Like, if the Notecard would have been a thing back then, like, just plug a Notecard in. Man, you guys have TX RX all day long. You know, send it and it's gone. It's ready to be.
Speaker: Audience Member 1:28:44
Yeah, I have a bunch of uses. I'm actually working on. I do some tech work for artists. There's a project that I implemented, I don't know, seven years ago, but it needs an upgrade. It's a weather station that's on top of an art museum here in Buffalo that uses the weather data as input to video on the front and side of the museum. I’m thinking this idea of dumping the data over cellular, because it’s cheap enough. You know, it’s perfect for it. So yeah, I’ll be buying a few of these for different things.
Speaker: Zachary Fields 1:29:23
That’s awesome. Like I said, once you like, start, it’s so flipping easy. I’ve actually had to build like, using AT commands. I tried to use a SIM808 once, and I was like, pulling my hair out. It's like, oh, God, you got to manage the connection. It's like, you just put this on the cloud for me, and it's like, okay.
Speaker: Audience Member 1:29:45
That idea that you buy the card, and you've got a reasonable amount of data for 10 years is a big deal as well. I mean, the idea of having to manage, even figure that out—this is goodbye and you're done.
Speaker: Zachary Fields 1:30:00
Oh, yeah, I was going to say also, for my little, my own roll-your-own cellular project, I bought a Ting SIM card, which was the cheapest at the time. But I forgot to cancel that thing, and I ended up paying like $240 for cellular data plans that I never even used, except for like, once. It was like, that sucks too, and you don't have to do that. You also don't have to be like… and then I have a whole bunch of other things because of that experience, where I’m like, I'm not going to use this yet, because I need just the right project. Now it's like, forget all that stuff, in 10 years, I will either have lost this, or it would have caught on fire by that point. You know, so it's like, whatever, I can just freely use it to experiment with without worrying about tailoring a data plan or any of that junk, or even having to pay the transaction fees because when you're just hacking, it is completely free. But like, where you turn it into a business and you're sending tens of thousands of messages, then it's no longer free. That's the level of experimentation. It's free. It's awesome.
Speaker: Audience Member 1:31:05
Yeah, I actually just bought a Swan for another project. I don't need the connectivity, but the fact that it's using Edge Impulse is important to me. And it's got, you know, it's got that carrier card, because I'm using six or seven motion sensors, and they're I2C, and they only have two addresses. So I need three I2C ports. I just have to figure out how to solder that on there. I haven't ever done that before.
Speaker: Zachary Fields 1:31:39
Yeah, you got to have some patience and a lot of flux. I've done it.
Speaker: Audience Member 1:31:44
Yeah. I just ordered some solder paste and a flux pen, and that's coming Saturday. So we'll see how the weekend goes.
Speaker: Zachary Fields 1:31:54
I did it. Just patience and flux.
Speaker: Audience Member 1:31:59
No coffee. You do it before you have any coffee.
Speaker: Zachary Fields 1:32:02
You don't want shaky hands; you’re doing brain surgery.
Speaker: Audience Member 1:32:06
Speaker: Zachary Fields 1:32:10
Yeah, of course.
Speaker: Audience Member 1:32:11
Sorry, just to jump in again, just for my own benefit. You were talking about Edge Impulse, and I'm really curious about that as well. What configuration would you recommend? I think you mentioned before with a Notecard and the Notecarrier AL, or would you just look at it? I'm not familiar with Swan or your platform, so I’d rather just try this once and be able to play with that environment.
Speaker: Zachary Fields 1:32:35
Okay, so I'm going to give you a tip: You don't have to buy Blues to use Edge Impulse.
Speaker: Audience Member 1:32:42
No, I understand that. I've got a number of different devices for that. I'm more curious about integrating with you as a communication or as my backhaul.
Speaker: Zachary Fields 1:32:50
Oh, yeah. Okay, great. Yeah. All you need to use the Notecard and a Notecarrier—you want to get both of these things unless you're able to, well, unless you want to build your own Notecard—you'd have to have a Notecard, you're able to build your own, but you should start with one of ours to get the idea. That's what I would say. Let's say you buy these two pieces. Then literally you just communicate with TX RX or with I2C, and either one of those is fine. That’s how you offload a sync like a JSON blob or a JSON object, sorry, a JSON object of what you want to send over to that, and it sends it away. You'd be integrated with anything. If you have a microcontroller, full computer, whatever it is, that is running Edge Impulse, and doing modelling and all that kind of stuff, then you capture the result of the model, which is normally all you care about anyway, and send that. Like, C-A-T for Cat is so much easier to send than a picture of a cat, you know? That's the idea. Then you just put that in the payload. You can say it comes timestamp; it’s kind of got like geolocation information already baked into it, because it's the cellular communication, and we just give you all of that to work with. You don’t have to additionally collect all of this since that comes in and you're paying for it anyway. We just give it to you.
Speaker: Audience Member 1:34:25
So if you talk quickly about Swan and what that is or how its positioned within your product set?
Speaker: Zachary Fields 1:34:32
Yeah. Okay, so Swan is to help us achieve full vertical integration. As I mentioned, the Notecard is more of a peripheral, like it's a data pump, is what Ray calls it. I would say if you think of this connection as a bridge, Notecard is the foot that's in hardware and Notehub is our cloud, and that's the foot in the cloud and this makes the bridge that you communicate over. Swan is a microcontroller that uses an STM32-based microcontroller. We chose this one because it's capable of doing extraordinarily low power, which is Ray’s fascination. While it is still one of the strongest microcontrollers as far as computational ability and flexibility in the fact that it's got like a CAN bus, MIPS controllers, like two I2S lines, a bunch of weird peripherals, tons of I2Cs and STIs. We have the Swan that can be a Feather, so it would look identical to this guy. This is not a Swan, but it's just what was in my hand, but it would look identical to this. Or you can, I'm going to try to lift this other thing up, this is a little bit more of a lift here. I'm digging through like the garbage pile that is my desk right now. Hold on, here we go. Or you got this board, which is our carrier board that comes with Swan. The Swan has got these castellated edges. It's a really cool concept. What they did was they made it so you can solder it down to this bigger board, and then you get instead of the, was it 34 pins? You get 64 pins available off of the STM microcontroller. That's like, not only is it like new, so it's super powerful and capable of doing low power, and it's an STM chip, which is like, you know, the Cadillac of microcontrollers. Also, they did this castellated edge thing, so you get twice as many pins out of it if you solder it to this carrier board. Then you get access to just tons and tons of pins that are on the STM die.
Speaker: Audience Member 1:37:01
So if I'm just starting out, much like you were doing, you know, capturing temperature data, as an example or salinity, etc., that's a bit overkill, then for me?
Speaker: Zachary Fields 1:37:11
Yes and no. You need a configuration, right? You could use it as the Feather and then it's just right for what you're doing. But if you wanted it to grow, and you didn't want to have to change your code or do anything different in your process, then it can grow really easily into this much more pin-dense configuration. Like I said, it comes this way too. It would come in like one of these guys, where it's two rails, just one SPI, one I2C. One TX RX and some analog and digital pins.
Speaker: Audience Member 1:37:48
So would that be the Feather starter kit that I’m looking at here for Swan?
Speaker: Zachary Fields 1:37:53
Ah, yeah, although I think I just heard that that was on backorder. Yes, it would be, or you can just, I like that kit a lot. I'm not looking at the website, and I can't, because I've got like this display going on right now. But if it's sold out, you don't have to buy the AF. I think the AF is what's sold out. I think the Swan, we still have Swans available, so you can buy that individually. Then you can buy, like I was telling him, the Notecarrier AL, and the only difference is instead of seating the Swan in a preset socket, you just take four wires and connect it over and it’s the same thing.
Speaker: Audience Member 1:38:47
So the Swan with the Notecarrier will get me in the game for what you’re talking about today?
Speaker: Zachary Fields 1:38:53
Yes, Swan, Notecard, Notecarrier. That is correct. Yep, that’s all it takes.
Speaker: Audience Member 1:38:58
Okay, cool. Thank you. Yes.
Speaker: Audience Member 1:39:01
Are you folks going to sell the Swan at Adafruit, because the idea of them having a product, I mean, it being a Feather, it's kind of unnatural, but the idea of having a product there that also supports Edge Impulse would be cool.
Speaker: Zachary Fields 1:39:17
Yes, so we are working with Adafruit. We don't have anything finalized or finished; we're in talks, and that's the goal. I can't say yes we're going to, but we're talking. We also support circuit Python, so we're a pretty compelling microcontroller.
Speaker: Audience Member 1:39:37
That was actually my next question.
Speaker: Zachary Fields 1:39:41
That's right. We were talking with Lady Ada, on our PR, and she just blessed it. It's getting merged—it may have got merged this morning. It's at that point though.
Speaker: Audience Member 1:39:53
Okay. Yeah, actually, what's his name, Scott, who does the Friday deep dive? I've been going to that for several months, which you probably know about.
Speaker: Zachary Fields 1:40:06
Yeah, like I said, we’re looking. Our eyes are pointed in that direction. That’s the best I can say.
Speaker: Audience Member 1:40:13
I mean, I know that’s all you can say, but basically what I’m hearing is be patient, it’ll happen. That’s my takeaway.
Speaker: Dan Wilson 1:40:31
Well, fantastic. I think we may have hit the end of the questions, and Zach, I appreciate you sticking around. I've certainly learned a lot myself. We'll get one last call if there's a final question we need to address here, or else we'll turn you fine folks loose. The recording for this will be on YouTube in about an hour, hour and a half. I'll make sure it goes out to everyone who registered just in case there's a part of this you want to revisit, like Zach’s winning smile, for example. We do hope the discount code is useful to you. We're not trying to make a buck off of ya, but you know, this is the best way to do it. If there's a way we can be helpful, please let us know. Any final questions before we adjourn for today?
Speaker: Dan Wilson 1:41:17
All right. Thank you, Zach.
Speaker: Zachary Fields 1:41:21
Thanks, guys. I appreciate you coming in. It was great talking with all you guys, and good luck on the Hack.