Projects – SYMON MUTHEMBA http://symonmk.com Let's Get Technical Mon, 28 May 2018 19:46:35 +0000 en-GB hourly 1 https://wordpress.org/?v=4.9.6 https://i1.wp.com/symonmk.com/wp-content/uploads/2018/01/symon-3.png?fit=32%2C32 Projects – SYMON MUTHEMBA http://symonmk.com 32 32 141419617 Off-Grid Communications For The Masses: Smart Metering http://symonmk.com/off-grid-communications-for-the-masses-smart-metering/ http://symonmk.com/off-grid-communications-for-the-masses-smart-metering/#comments Mon, 30 Apr 2018 20:50:28 +0000 http://symonmk.com/?p=1047 In East Africa, a large percent of the population still does not have access to electrical energy and its benefits. To address this, several companies have developed micro-grids to provide AC power to rural East Africa. In order to sustain these grids, a remote, robust communication system has to be developed for purposes of metering and billing. In this post, I propose several efficient designs of a communication system that could be used to monitor and manage off-grid customers. Specifically, it proposes the technologies that can be used, the hardware and software implementation of such as system and how it can make business sense addressing equipment and operation costs.   This post proposes a communications system that tackles the stated situation within the boundaries of the limitations set by a real-world scenario, i.e. budget, energy supply and manpower. A comprehensive approach to systems design is valuable to ensure the sustainability of such a project. Sections in this post will cover the hardware, communications channels and protocols, remote monitoring systems and software that can be used to solve the stated design issue. The goal is to provide micro-grid providers with a trustworthy system for off-grid power management as well as help the locals with a solution that sufficiently caters to their needs.   Hardware Implementation A reliable remote metering system has to have a few basic characteristics: A smart metering system that connects every household, enabling 2-way data transfer between the customer and utility provider A network technology to enable the 2-way communication (fixed wired or wireless) A software system that actively manages the billing system and analyses usage data   With a system defined as in Figure 1, we can start to see how we can bring together the hardware components.   Smart Metering Smart meters are already in the market, such as Hexing Electric HXE 110-KP single phase prepayment smart meter and ZTE ZX E211, Figure 2, single phase prepayment smart meter. These meters meet Standard Transfer Specification (STS) standards and are fit for our application. The ZX E211 is the preferred choice here as its supports a variety of communication protocols (RS485, M-BUS, ZIGBEE, RF-MESH, PLC and GPRS). We will see how these communication protocols will be used in this post. ZTE ZX E211 LoRa based meter is particularly useful in long distance communication and allows us to adjust several parameters such as the transmission rate and frequency. The main feature is its low power consumption with a transmit current of less than 90mA@ 17dBm, receive current less than 13mA and standby current less than 0.7 uA. Since data communication may occur only few times a day, a majority of the consumption will be the standby current. Depending on the data that is provided by this meter, or a comparable one in the market, we may choose to consider meters that do not conform to STS standards. This may help us with communication protocols unavailable to us but may limit us in scaling and future upgrades with the national grid. Fabrication of a communications device alongside the meter may be required to send more usage statistics and deliver the desired data. This can be used for analysis to improve the overall system. This can be covered in a future post with AVR, PIC or FPGA as the processing IC in our DIY smart meter.   Communication System This post will discuss two concepts of a smart meter communications in a rural area based on two assumptions: Location size – Are the residents physically close to each other or spread out? Terrain – Is the area flat or hilly? Dense vegetation cover or dry grassland? To meet the requirements of the location, I propose two systems that can be established. They are the RF-MESH network and RF-STAR network. Both networks rely on wireless channels to carry data.   RF-MESH Network This type of network allows for data transmission via other wireless devices via a mesh (chain) network using a low power transceiver radio. This network is suitable for close-knit residential areas with few obstacles and is cheap to implement and scale. The architecture consists of low power transceiver radios per every meter box and data concentrators as in Figure 3. A proposed transceiver is the Silicon Labs Si4463 chip that facilitates the RF communications link. This is a transceiver I’ve worked with before on a previous project. Schematics of the full transceiver system is covered here. It is a low power transceiver with up to 20dBm (100mW) transmitting output power and a receiving sensitivity of -117dBm. Its wireless frequency band is 433.4 – 473.0MHz, and up to 100 channels can be set up with a channel stepping of 400 kHz. A serial port baud rate of 2400bps allows for a baud rate in air of 5000bps and a wireless receiving sensitivity of -117dBm. This gives an operating range of 1000m at clear line of sight between modules under ideal conditions. A concentrator can then be installed somewhere central in the village to aggregate the data of multiple smart meters and one concentrator may support hundreds of smart meters. This system is immune to sudden channel blocking as communication can flow using alternative paths. The DRF1110N20-C concentrator works well with DRF1110N20-N network nodes on a sub 1GHz channel. The concentrator can then upload the received data to micro-grid databases at different times of the day depending on the availability of the data network.   RF-STAR Network This network type is of a point to multi-point (PtMP) configuration. This communication system is admittedly more expensive than the RF-MESH network but is suitable in hilly terrains with thick vegetation and obstacles. The architecture consists of high-power radio transceivers with a line-of-sight to an omni-directional antenna radio as in Figure 4.   To implement this system, a 2.4GHz ISM channel may be used. A clear line of sight from a transmitter antenna to the receiver should be established, I recently talked about the art of obtaining strong microwave links. The smart meter information […]

The post Off-Grid Communications For The Masses: Smart Metering appeared first on SYMON MUTHEMBA.

]]>
http://symonmk.com/off-grid-communications-for-the-masses-smart-metering/feed/ 2 1047
What a Systems Engineer Can Do For You: 7 Guiding Principles http://symonmk.com/what-systems-engineer-do/ http://symonmk.com/what-systems-engineer-do/#comments Thu, 29 Mar 2018 06:00:42 +0000 http://symonmk.com/?p=937 For several months now I have worked as a systems engineer in the broadcast field. Having applied myself as one during this period, I have realized there are certain best practices to consider while working as one. Research on this topic led me to understand the principles and processes guiding the work of systems engineers in all sorts of fields like manufacturing, defense, telecommunications, power systems. All follow standard models to execute their duties and in this post I shall elaborate what they are.   What is Systems Engineering? This has been defined for years as an interdisciplinary set of technical and managerial activities with the aim to bring together a functioning whole (system) with distinctive parts that solves a unique problem and meets a client’s requirements. To meet the said definition, an engineer has to employ something called systems thinking. This is a philosophical approach on design and implementation of functioning systems. The ability to see them as a sum of their parts and how causality applies among them. In addition, it requires you to think about the day to day use of the system, future improvements and upgrade-ability in order to provision and manage successfully. Fortunately, smarter people than I have been developing this idea for a while. The ISO/IEC/IEEE 15288:2015 defines the systems and software engineering – systems life cycle processes which establishes a common framework of processes and descriptions for describing the life cycle of systems created by humans. Such an example is the QFD House of Quality for Enterprise Product Development Processes as in Figure 1. It is from such work that some basic principles and models of systems engineering have been developed.     Systems Engineering Principles There are some basic procedures to undertake in order to deliver a well functioning system, these are: Systems requirements analysis Physical and functional design Effectiveness evaluation and decision System integration Simultaneous/concurrent engineering Verification and validation Support analysis and design This is quite an oversimplification and one can generate an even longer list, but those are the principles in discussion for now.   System Requirements Analysis This is the first stage of the process. You have landed a contract to set up a system with a degree of technical complexity that few can deliver. The requirements analysis is a detailed description of what the finished product should be and what problems it is supposed to solve for the user. This may be a documentation that the user develops alone or with the technical guidance that you offer. This analysis required an understanding of the following: The system requirements The user expectations, needs, wants of the final outcome Technical knowledge of feasible solutions Costs and risks involved The four items are developed in connection with each other for example a particular technology may meet the user needs but it may be too expensive to implement. It is at this stage that you breakdown the problem into sets of smaller well-defined problems, each with a different approach to execution example solving audio production, video production, transmission, streaming; these are 4 problems in a broadcast facility that a systems engineer may be tasked to solve. Strive to apply your technical understanding and design skills to ensure customer satisfaction at this level and avoid haphazard segmentation of the project just because different technologies/elements are involved. This is in order to develop an optimal system involving all of the parts avoiding developmental issues that bring increased costs and delayed schedules. The engineer’s knowledge and creativity is seen here, implementation can be seen as an artistic expression incorporating solutions developed from great ideas.   Physical and Functional Design The fun part of this entire process is trying to see how everything will come together. At the end of the day, components will have to be connected, software will have to be configured or coded and the project will come to an end. The physical design of the systems details the different physical components and how they will be linked together. Schematics and block diagrams are useful in this purpose. The physical design also takes into account the constraints in which the project is based on like the physical space, environmental factors and budget. In the real world, physical design leads to assembly and interconnection/linking of components. In contrast, the functional design is the logical framework of the system. It details how one output leads to another and how events are managed within the system. This is usually represented diagrammatically by a flowchart, logic circuit or signal flow graph. The functional design determines whether the proposed solution makes sense and the suggested components will perform as expected. The functional design is later used to configure (using hardware or software) the assembled components. An example of a functional and physical design can be seen in Figure 2, where we have an incoming signal and its desired output. The physical and logical designs can be analysed together using simulation software.   Effectiveness Evaluation and Decision This is mostly performed at the early stage with a series of meetings with the clients/users. Do the earlier analyses and design outcomes match with the customer’s expectations? This comparison is used to offer modifications and clarity about the designs as integrating prior to forming an understanding between the engineers and the clients leads to wasted time and money. Effectiveness evaluation is measuring the extent to which targets are being met, and detecting the factors that hinder or facilitate their realization. It also involves establishing cause-effect relationships about the extent to which a particular policy (or a set of policies) produces the desired outcome. businessdictionary.com   This evaluation allows the engineers to put all available alternatives on the table presented to the stakeholders, giving an elaborate outline on risks involved and expected outcome with each alternative. The engineer at this stage improves the suggested solutions using input from the stakeholders as they are most concerned with the overall benefit of the system.   System Integration The physical labor is at this point where you build […]

The post What a Systems Engineer Can Do For You: 7 Guiding Principles appeared first on SYMON MUTHEMBA.

]]>
http://symonmk.com/what-systems-engineer-do/feed/ 2 937
Getting to know Visual Radio: The Future of Radio Broadcast http://symonmk.com/visual-radio/ http://symonmk.com/visual-radio/#respond Wed, 20 Sep 2017 13:00:56 +0000 https://symonmuthemba.wordpress.com/?p=492 There comes a time when a concept that has been in use for decades is suddenly challenged by modern ideas. Such an idea is visual radio and, since its conception, has been widely adopted in Europe and America. This technological advancement is now creeping into Kenya. Will it have an impact? My recent experience setting up a visual radio studio has led me to believe it is an investment worth paying attention to. Let’s review and explore this technology and what we could expect from it.   What is visual radio? Visual radio is the amalgamation of existing radio presentation of audio production with another layer of video production normally done with automatic camera control within the studio as well as playing video content. This results into a synchronized radio and visual production, what is heard on radio can also be visually consumed whether on digital TV or through live streaming. This modern solution on radio enriches the audience’s experience of live shows as well as provide a competitive reach for the broadcasters to newer markets such as the tech savvy youth through live streaming.   Benefits of Visual Radio Should your radio studio upgrade to a visual radio one? Here are some of the reason why you should consider this shift:   1. Multi-platform reach With the rapid pace at which consumer technology is moving, visual radio seeks a new way to reach new audiences through streaming and social media platforms. Streaming services like YouTube and social sites like Facebook allow for live shows which radio presenters can take advantage of to create new ways of interaction with their audiences. This is done while still broadcasting via the usual FM channels. Now, listeners have more options to choose from depending on their preferences and access to supporting technology. In many parts of the country, 3G connectivity as well as digital TV migration is already a reality. This allows for such stations to provide richer content while still being the familiar radio their fans are used to.   2. More ways to generate revenue Setting up a radio studio to also produce video is not a complicated procedure as setting up a television studio might be, but it provides a way to present video advertisements just as television. This means that a simple visual radio studio may broadcast the same ads as a TV studio. Moreover, other creative ways of advertising may be achieved including overlays while a presenter is running a show, promotional items within the studio as well as special guests who may come in to promote their brands.   3. Simple equipment Radio presenters who are used to radio equipment will still the same type of equipment, such as audio consoles (maybe newer due to a few required functionalities) and their shows largely remain the same. The video production unit is an automated system that is linked with the audio mixer to facilitate automatic switching of the cameras such that when a mic is live, the output from camera corresponding to that source is what is displayed on the screen.   Challenges This concept has been met with some challenges which include in most part for the users to determine what video content will be on air. This may require having all the previously only audio music as video. The presenters should also get comfortable with the idea of video presentation as opposed to audio only. In a quote from Radio World magazine special issue on Visual Radio (Jan 2017) visual radio content can be grounded in the spoken word narrative style that is at the heart of radio story-telling, rather than the “visuals come first” approach of broadcast TV     What we set up In my previous article, I mentioned I worked for a broadcast systems integrator. The company was contracted to upgrade a popular radio station to have visual capabilites. The solutions we settled for were: LAWO Crystal audio mixing console – This the audio unit of the system that accepts a number of audio sources (mics and lines) as well as provide the camera control signaling for the video unit. LAWO Crystal console is a modern audio console with advanced capabilities on its fader panel, Surface, as well as its control center, the Compact Engine. HDVMixer – This serves as the video control unit. The HDVMixer is a modified tower workstation which accepts video inputs from cameras, audio input (from the Crystal console), embeds the video and audio and outputs the combined AV signal. Avipas PTZ cameras – These pan, tilt and zoom cameras function to capture video to the HDVMixer and additionally have the capability to be controlled remotely via an IP connection.   Visual radio promises to be an amazing avenue for fresh, impactful content and I can’t wait to see what our clients will do with it.  

The post Getting to know Visual Radio: The Future of Radio Broadcast appeared first on SYMON MUTHEMBA.

]]>
http://symonmk.com/visual-radio/feed/ 0 492
Recognizing “ndiyo” and “hapana” speech using MATLAB algorithms and FFT functions http://symonmk.com/recognizing-ndiyo-and-hapana-speech-using-matlab-algorithms-and-fft-functions/ http://symonmk.com/recognizing-ndiyo-and-hapana-speech-using-matlab-algorithms-and-fft-functions/#respond Tue, 18 Jul 2017 14:24:00 +0000 https://symonmuthemba.wordpress.com/?p=292 Ndiyo means yes in Swahili and hapana means no. The two words were chosen as they can be used to make very simple applications that may require a yes/no response such as an automatic telephone prompt system. Swahili translations of yes/no applies to the national language of Kenya, and an interface that recognizes the words can be used in local applications. Simple speech recognition The first step is to obtain speech samples of ndiyo and hapana from a large sample of people throughout the country. This can be done using a simple microphone and a recording instrument. For this project however, I took the generic pronunciations of the words from Google translate: ndiyo, hapana (I know, sounds weird). We can now plot the two audio files as a periodogram Power Spectral Density plot using fast Fourier transform (FFT) in MATLAB.  FFT is simply an algorithm that makes computation of discrete Fourier transforms (DFT) more efficient by reducing the amount of computations involved.   OR This gives the plots in figures 1 and 2.     According to the two plots above, we can see that the signal for ndiyo has more energy in the lower frequencies than that of hapana. We can use this feature to differentiate the two signals. When the signals approach 4kHz however, they exhibit features that are similar and harder to differentiate. Trial and error resulted in a range of 0 to 3620 Hz for the lower frequencies and 3620 to 11025 for the higher frequencies. A threshold value is necessary for the separation of the features, this value is obtained by calculating the feature for all of the audio samples and examining the histogram for the ndiyo and hapana values. I chose a threshold value of 12 as an example but in practice this figure should be computed. The speech recognition algorithm is:   Using this algorithm, the output for the speech recognition function on the two audio files is:   This shows that the algorithm exercise was successful in distinguishing the speech from two audio sources using a simple recognition algorithm.   REFERENCES AND SUPPORTING ARTICLES ‘Power Spectral Density Estimates Using FFT’ https://www.mathworks.com/help/signal/ug/power-spectral-density-estimates-using-fft.html. ‘DSP Mini-Project: An Automatic Speaker Recognition System’ http://minhdo.ece.illinois.edu/teaching/speaker_recognition/speaker_recognition.html.  ‘Basic feature extraction and classification of audio files’ https://ccrma.stanford.edu/workshops/mir2011/Lab_1_2011.pdf. Enhance your DSP Course with These Interesting Projects http://www.asee.org/file_server/papers/attachment/file/0002/2611/Enhance_your_DSP_Course_with_these_Interesting_Projects.pdf.    

The post Recognizing “ndiyo” and “hapana” speech using MATLAB algorithms and FFT functions appeared first on SYMON MUTHEMBA.

]]>
http://symonmk.com/recognizing-ndiyo-and-hapana-speech-using-matlab-algorithms-and-fft-functions/feed/ 0 292
Final Year School Project: Introduction to the Project http://symonmk.com/final-year-school-project-introduction-to-the-project/ http://symonmk.com/final-year-school-project-introduction-to-the-project/#respond Wed, 05 Apr 2017 16:07:48 +0000 https://symonmuthemba.wordpress.com/?p=113 For my 5th and final year in EEE at JKUAT, I was required to do a school project that accounted for two class units spread out over the two semesters of 2016/2017. The project I came up with is called OFFGRID MOBILE COMMUNICATION which the name suggests that communication can happen without a service provider network. Brief Abstract As communication is becoming widespread in Kenya, many people are opting for high-end smartphones that can do more than simple communication and support a variety of features. However, communication obstacles may arise due to several factors such as network congestion, deadzones within urban centers and  extreme weather conditions. Let’s also not forget the dips in cell reception when we go to the rural countryside to visit our grandfolks on Christmas. A way to mitigate this constraint in communication is completely abandoning the dependency to the service providers and creating a small network based on two available technologies Bluetooth 4.0 modules and RF Transceiver modules. Together these are enough to create a small area network (radius 1 – 1.8km). Objectives My objectives for this project include: Design and implement the internal circuitry of the device including the Bluetooth, microcontroller and RF transceiver modules which will allow the device to transmit, process and receive data. Design and implement the code to configure the Bluetooth, microcontroller and RF transceiver modules to perform as intended. Design and implement an android application user interface to allow users to connect and work with the off-grid communication device as intended. Resources My project will involve the use of an ATmega1284P microcontroller, a HM-10 Serial Bluetooth 4.0 module and a HC-12 RF Transceiver module. I am using Atmel Studio to program my microcontroller (Newbiehack.com has great tutorials on this), KiCad, discussed here, to draw my schematics and eventually my PCB and Android Studio to write the mobile interface to use with the device. As of now in my final semester already made strides with this project more posts on its progress will follow. References Some references I used in researching for this project including the communication industry in Kenya, other solutions, wireless technologies (Bluetooth, RF), antennas, microcontrollers, mobile app development can be found below: [1] CA, “Quarterly Sector Statistics Report Fourth Quarter for The Financial Year 2015-2016 (April-June 2016)”, page 5. [2] CA, “Quarterly Sector Statistics Report Fourth Quarter for The Financial Year 2015-2016 (April-June 2016)”, page 9. [3] CA, “Quality of Service,”. [4] CA, “Mobile operators Fail to Meet Quality of Service targets for the third year running,”. [5] Abdiwahid Biriq. (2014, May. 16). “Is Safaricom short-changing its customers?”. [6] Dave Aiello. (2004, Aug 13). “Mobile Carriers Ready “Cells on Wheels” in Case of Outages or Network Overloads.”. [7] Chris Woodford. (2016, March 9). “Walkie-talkies.”. [8] AARL. “What is Ham Radio?”. [9] Chris Woodford. (2016, June 13). “How Does Bluetooth Work”. [10] ATHLOS. “Bluetooth™”. [11] Robin Heydon. “Bluetooth Low Energy: The Developer’s Handbook”. Prentice Hall, 2012, pp 1-7 [12] Tarun Agarwal “Block Diagram and Explanation of RF Transceivers.”. 33 [13] antenna-theory.com. (2011) “The Monopole Antenna”. [14] Louis E. Frenzel. (2005, Mar 31). “Printed-Circuit-Board Antennas”. [15] Freescale Semiconductor, Inc. “Compact Integrated Antennas”. Freescale Semiconductor, Inc, 2015 pp 8-9 [16] CA. “Kenya Table of Frequency Allocations”. CA, 2008 pp 37-186 [17] Frank Duignan. “An Overview of Microcontrollers.”. [18] Android Developers. “Bluetooth Low Energy”.

The post Final Year School Project: Introduction to the Project appeared first on SYMON MUTHEMBA.

]]>
http://symonmk.com/final-year-school-project-introduction-to-the-project/feed/ 0 113
Using KiCad EDA to Build Electronic Components and Design Schematics http://symonmk.com/using-kicad-eda-to-build-electronic-components-and-design-schematics/ http://symonmk.com/using-kicad-eda-to-build-electronic-components-and-design-schematics/#comments Tue, 21 Mar 2017 18:23:34 +0000 https://symonmuthemba.wordpress.com/?p=30 KiCad is a free development software for electronic design automation (EDA) that I have been looking around into to designing my final year school project (more on that later) schematics. KiCad is extensively developed and used almost exclusively by CERN! With a lot of online documentation, support and large communities, the experience of using this software has been mostly uncomplicated and a lot of fun. Resources and Tutorials KiCad can be downloaded for free from their website Find component libraries here I used the Getting To Blinky 4.0 tutorial by Contextual Electronics. This is a popular tutorial series published by the CE guys and they’re even supportive enough to release an updated version. Useful Documentation From KiCad official documentation website. Also checkout this well written documentation from Gearbox Community Forum. I advise checking out the Splashboard V2 IoT thread on the same forum for best practices with KiCad. It is well discussed. Project In order to construct the internal schematic of the HC-12 Transceiver, I studied the datasheets of its main components: Si4463 transceiver, STM8S003F3 microcontroller and AS179-92 switch. These components were not in the component libraries linked above therefore I created a separate library to house these components and proceeded to construct the components in the Schematic Library Editor in KiCad. The above image is a split screen of the library component being created while referencing its datasheet and GTB tutorial. At the moment I’ve set up the HC-12 Transceiver as shown: *This is definitely not the final schematic and is my first major attempt. I will update with more in the near future.

The post Using KiCad EDA to Build Electronic Components and Design Schematics appeared first on SYMON MUTHEMBA.

]]>
http://symonmk.com/using-kicad-eda-to-build-electronic-components-and-design-schematics/feed/ 3 35