 And the last talk tonight is going to be Struggles of Adnan, of Struggles of... Okay, so my name is Adnan. I think many of you know me already through Hackware and Hacker Space Meetups. Many of you, or some of you may know me already as a PCB go-to guy for design. So, I mean between jobs right now, I'm looking for work. I completed one project, a very long project last month. But before the project ended, another friend comes to me, an old friend. Now he comes to me and says, hey, he's also been messing around with ESP32s and other minos and stuff like that. But he's a very rich friend, he's got several prawn farms in Malaysia. So he comes to me, hey, help me design PCB. So, he tells me what to do once. And I have to relearn all these things of IoT. Yes, I've attended many, many talks with IoT and its description and what it's all about. I must have fallen asleep or something. So, this is me, a newbie to IoT, MB IoT. So, just to refresh myself and some of you, it's a collection of devices connected by some network to be wired or wireless. To collect data and possibly actually give physical actions. You want to collect data from all over the place like lamppost to inside the homes and actually washing machines and water pumps outside. So, that's what an IoT device is about. So, the possible users of IoT ranges from consumer, commercial to industrial and to infrastructure applications. So, it's pervasive everywhere. This is what IoT is meant to do. So, I'll give you some examples of those things that I mean. By consumer, we have starting from the smallest of things that attach to the body as wearables. We are simply connected onto the net of all sorts. It's also an IoT device. In the smart home that we talked about today, we have many things like lighting, power switches that turns on and off and also measures power. One we've just talked from four-way just now. Future appliances, the juicer machines like Juicero, are all IoT connected. Ya, that's not a very good example. And of course, we have the very energy consuming equipment in the home that we want to measure, monitor how much it takes throughout the entire day and we want to keep cost low. So, we have energy management within the home. So, one of the main consumers of the home is like the air conditioner, the washing machine, the ironing, the fridge and some lesser old machines like televisions and computers. And lastly, inside the home, we also have health management or healthcare. We want to look after our elders, of which I'm going to be one soon. So, those are considered consumer devices. Commercial devices are more like in bigger applications where you use it in medical and healthcare in the hospitals, field dispensers, field management, medication. We have building management and part of the food chain also. So, those are commercial applications. Moving on to industrial applications, we can see that we can want to apply efficiency in manufacturing. So, we measure or we monitor first and then we analyse and measure the efficiency of how we manufacture products in a factory. Agricultural also has some uses of monitoring and I put there in bold farming which is what I'm really going to apply my skills to. Infrastructure projects like some of you are from SYNC Power, you do energy monitoring and management. And then finally, at the country level or global level, we also have environmental monitoring to see the general health of the world. Okay, there are several kinds of IOT types. We have the wired one. Of course, most of our data we collect, we want it to get into the internet, into the cloud. And most of them are wired either electrically or by fibre. It knows I'm lying. Okay, so, we've seen most of our computers are connected in the past by wire to the internet and eventually converges into some server or many servers. You're showing your age. Can I get a wire? What are you talking about? And then, lately, we have all these wireless technologies. Let me. Let me. You can't help yourself, apparently. Let me. That's quite a bash. So, the most common one will be Wi-Fi, the high speed connections we get to our laptops and also our mobile phones. Then, you have other lesser-known wireless technologies such as RFIDs and NFCs. Generally, the same except that RFIDs is unidirectional. So, you receive only serial number for identification. NFC is a two-way communicator also at very close ranges. And then, we have your IEEE 802.15.4 which is an improvement over the Wi-Fi which is 802.11. Yes. The improvement is in the modulation and the packet size and the throughput. So, with lesser throughput and better modulation, we get better power savings. And this is required for today's low-power devices for data collection. So, out of 802.15.4, you have a variety of special interest groups, I think they're called. One of them is ZINB and then from ZINB, you have 6 low-power devices and many others all deriving out of 802.15.4. Competing the 802.15.4 a similar but not the same technology is Bluetooth Low Energy. So, Bluetooth of versions 1, 2 and 3 are all meant for high-speed connections. They started with keyboards and mouse and then headphones and music. They also wanted to compete with low-energy devices. So, they introduced a new modulation scheme in Bluetooth 4.0 and 1 with something called the LB, the Light Edition Low Energy. Thank you. The Light Edition. Low Energy. Okay. So, in the past when we talked about what, I also attended a talk I must have fallen asleep. I can't explain much about it. Not too long ago in another hack-man meet-up I think...Jubair. Jubair also. Jubair also talked about Laura when also another low-energy low data rate transmission technology which is useful for data collection. And finally, today I'm going to introduce well, just talk about low-energy, narrow then internet of things. So, NBIOT is the latest in mobile phone technology where they already have many, many base stations so that our mobile phones can roam from one base station to another. So, in order for our phones to work, when we are talking and many people in the same room we are all connected to a base station or a cell station. If we move from one location to another that signal might get too weak and we connect to another so that's another cell station over there which we roam from the connection over here to over there. So, in order to fill the full space of your premises or however big it might be country-wide premise, there are many cell stations all around the country. Now, these cell stations already have the technologies of frequency hopping and modulation technique. These things can be tweaked on the fly or through firmware updates much like the particle platform you saw earlier with very little intervention from the cell phone operator. So, the cell phones use a lot of bandwidth. We're not only transmitting voice now, we're also transmitting lots of internet data. So, in the frequency spectrum that is reserved just for the cell phone the service providers and the people who define the standards of mobile phones have discovered that they have narrow bands on each edge of their frequency spectrum. And they make use of these modulation techniques just to use those narrow bands on the edge of the bandwidth that is given for the mobile phone. So, for every mobile phone there is for every country the country licenses to the service providers bandwidth in the frequency spectrum to the service providers and the service providers now just uses the edge of each spectrum. So, that is where they get the word narrow band. They just use a tiny little band on the edge of the entire bandwidth for low data rate transmission. I'll explain further this in another time if I can get off my hands on more technical data. So, one of my struggles in trying to read this up I stumbled on a website called www.3gpt.org and I listed out the documents in the web page. The web page is non-ending. It's like Facebook. As soon as you reach the it scrolls up again. So, there's just too many documents to read okay, I give up. I'm just going to get the project done. So, for my case, my friend comes to me and says he wants to go far monitoring in my remote location. So, the power in internet they are not readily available. There are several readings per day. So, each day there is actually one man going up into the middle of the water and taking some readings. What readings? I do not know. He doesn't tell me. All I know is an electronic device can be connected to our computers. And also many locations, not only in terms of farms, but within each pond. So, there is a need for automating such thing. The pond is only waist deep. There's no need to take a sumpan. We can actually ask the people to go there to take a read-book. So, this is a perfect opportunity to automate this readings. So, what are the considerations for designing this project? It has to have long term operation. We don't want something that we have to replace the batteries every week. So, it's he wants three months. I'm a bit more conservative. I promise one month. So, it's somewhere not between one to three months now. He must have drove us for survival. So, we describe boxes. In the past, I used to design PCBs as small as I can. I suggested this much. So, he came back and said no, something bigger. So eventually, we decided that we should fix it. So, these boxes are made from polycarbonate. Polycarbonate This comes from a popular website company called Polycase.com. They're relatively low cost. I think it's $9. But shipping is $60. The size we kind of calm it down. So, although we don't have Wi-Fi out there, they brought fiber or ABSL. But there is still a need for configuration in our development. So, we still need Wi-Fi within this design. We have to be careful of how much data we are trying to read. So, we have to be aware of the low data rate limitation. Thankfully, NBIOP maximum data rate is 250 kilobits per second. So, I guess not too bad. We just can't do webcams or videos. And the types of peripherals are not made known to me. Only that he needs like four digital inputs. RS485 strangely enough. A 4-20 milliampere loop circuit. This is common to people in the manufacturing industry when they measure oil and gas. And in a couple of interlock inputs. So, the requirements aren't hard. Any microcontroller today can do the job. It's no respect for having cellular coverage at the end of the world. There is cellular coverage. Cell phone coverage they have. So, these are the considerations, right? So, we argue he wants to use Arduino and shields. So, he gave me he really gave it to me. Nah, I use this. I like to design PCBs. Anyway, it's a pretty good module. It's a SIM 7000C. I think it's a Chinese radio module maker. He gave me a SIM card. So, I had to well, not argue. More like discussion. He finally agreed and he actually gave this to me too, right? So, he said use the SIM card from here to here. So, we got that pin down. We're going to use the VGXB. Now, this is costly. It's nowhere in price comparison against the particle. Particle, I thought I saw the price of 15 bucks. This is nearly 100. So, it's pretty costly. Oh, sure there. Ah, this is a pretty cheap development board. It's got the XB header on it too. So, it's useful for me to actually try programming this thing. So, we're not relying on the Arduino. We finally discuss and agreed to use the ESP32. So, the SIM 7000 is now the XB LGEM or MBIoG. So, the type of interface like I earlier mentioned, you want to work with input, RF5, some digital input, some digital outputs, and one relay context. Actually, is there program inside the XB? I think there is. Yes, there is. The VGXB actually runs MicroPython. So, it's a fully scriptable computer just by itself and it can do many things already. What it doesn't have is that it doesn't have Wi-Fi nor enough inputs to handle this much of peripherals. I could probably do an IO expander but it's too much trouble. I rather use this in pass-through mode as a slave. So, it wants rechargeable batteries which means I have to design the charger circuit for it too. Again, we are discussing whether the power inside 4 lithium-ion those circular cylindrical cells 186550 the 4 of them can last for 3 months. They're still available and we're going to manage that. And also a real-time plan. So, interrupts alarm interrupts. Yes. So, that's the reason why we have a charger so, within this PCB design you can't pull the top signal from sorry sorry, hang on. We've changed the batteries. No, if it's solar panel we don't have to worry about battery life anymore. Solar panel recharges the battery. So, within the enclosure we need to fit the 4 lithium-ion batteries and have a charge controller to control the lithium-ion charge. Why do you need 4 lithium-ion batteries? Back up in case we don't have time lights and stuff like that. Well, anyway it's a good point. I can bring that up in my future discussion. But that seems like that's a good thing to control the lithium-ion. Maybe we can use a smaller panel. A cute one. Oh, that's the storage that was assigned for the battery. Yes. Well, it doesn't have to be a big panel. Enough to run and keep it overnight. Ya. Well anyway if we do that we get some versatility. So these are his choices, right? Let's check it from us. Ah, there you go. Alright, here comes the fun stuff. So, testing this is pretty straightforward. I got the Leonardo with an XB header 1. Yes, slap the XB on top of it. Write some very easy code to do pass through. USB as a serial port passes through to the serial port of the XBs. So, with the Leonardo it solve a lot of wire. DG who makes the XB also gets a class let's realize only on the serial port nothing else needed. So, I ran the software. This is a successful display already. So, you've got a signal strength 2.5 bar. Ya. It's got some connection. Okay. I should have shown you the next slide first. This was my first trouble. When I got DGXB it did not have the right firmware to change its frequency bands. It was normally on a firmware of 1140B. And without knowledge of changing that frequency band or even knowing that it could be changed, I struggled for a few nights with the M1 SIM card. So, Sintel SIM card. So, in Singapore, Sintel only relies on one band called Band 8 which is 915 MHz. This is for NBIOP's usage. So, whilst the newly received XB came with the firmware 1140B, I could not change the frequency usage of the module to our Singapore's 915 MHz. It was stuck on some AT&T of Verizon frequency. And I hadn't known that until I scouted the night and stumbled upon release notes of the 1140C which actually says they now support frequency band modifications. It's necessary to inspect the SIM card. No. You have to inspect the SIM card to strictly use that band. Ya, certainly. Unfortunately, you ask that they have various high-regionations when they come to the streets. So, they have to come to the streets. So, they have to come to the streets. So, they have to come to the streets. So, they have to come to the streets. So, you ask. Updating in the XB manual they say to update. You need a third pin connected to the XB. Ya, so, on the Leonardo board, only two pins are connected to the XB. The UART receive and transmit. A third pin called the TTR go to sleep pin is required. And with this setup it failed to update the firmware. In the end, what I have to do was solder wires from this to an FPDI to UART converter just to do the update. Rip it all off again and then started using the new Leonardo. I'm sorry, but I've lost control. So, you also... If the DPR signal is required for firmware read flash. That's what it says in the data sheet. But not required for normal operations. Ya. So, finally, when I change the frequency usage to our 915MHz I finally got some bars. So, that was my first struggle. Got to that. So, for a long time after even getting 5 bars no signal, no TCPIP no IP address nothing, I trace after some testing I manage to flash update I still get no signal strength blah blah blah. Now, there's this setting called the APN I don't know what it means. So, I ask my friends at Hacker Space do you know that APN for same pill? Try EIDS Is that for WAP? It's web. They all look at it web. Oh man, you're so old fashioned. So, anyway, I tried EIDS didn't work, right? Talk to my friend, he says try internet. Oh, ya, so easy. Try internet. Didn't work also. Later, he finally say, try STM IoT. What? Ya, I'm on. Okay, so, with STM IoT I finally get 5 bar hand and IP address I don't think I captured it somewhere here but I finally managed to log on to an example server and have a TCP session So, here's Eliza one of the example servers giving me a feedback Why don't you need a therapist? I feel fine Do you often see the punch all the time? I see. It's like ask mobile. So, already that works, right? That's great. I think this was October 29 Ah, this must be October 29 I think I have to go on this. Strang girl number 2 Oh, network is failed So, with a reply code of 25 years it means cellular network registration denied. So, there's full signal strength Singtel recognises it but denies you on any services SIM card expiry So, up to today, I'm still stuck this was a few days ago only I'm still stuck and waiting for new cards So, my friend is going to do all the purchases and I'll tell him how much it costs He says it's only about 2 bucks per month per card So, that's not a bad deal So, it's a show card Yes, for NBIO 3 You have to speak to their sales and request for it I'm not sure about that When I receive a package, I'll let you know So, that's part 2 But, what if I send it There's people We need a SIM card Every 2 days Can you put it at the minimum of 6? 5 cards 5 cards That's what Singtel N1 also sells it but we've never contacted them yet So, there are 2 service providers in Singapore So, next hack I'll update you on that Part 2 update Part 2 Do I still any more time? Anyway We have a PCT in progress There's a demonstration He has a deadline At the end of this month, there's an exhibition called OSA So, he wants to demonstrate So, we are in a rush to complete something It's stuck into the box It does not fit this box because there's no time for me to do my downsizing I used a big box So, I cheated a bit So, this is in progress I hope to finish it by the end of the week Next week, I'll have Singtel and then I'll update it Our next hack, where I can show you Hopefully A demonstrable So, next hack Updates in the next week