The majority of sensors have an analog output. Few sensors come with a built-in controller and can stream the output measurements over a digital protocol. That is why analog to digital conversion is one of the basic features that every microcontroller/port has. The other basic features include digital input/output, analog output, PWM generation, and serial…
MicroPython – Generating PWM on ESP8266 and ESP32
Pulse Width Modulation (PWM) is one of the five basic functionalities in any microcontroller. The other four are digital input, digital output, analog input, and serial data communication. Most microcontrollers do not have a built-in digital-to-analog converter to output analog signals. However, most of the microcontrollers have one or more PWM output interfaces. PWM signals…
Adjustable 0 to 30V 2A DC Power Supply Circuit (Part 1/13)
The power supplies are the mainstay of electronic circuits. The power supply circuits can be designed in many ways. There can be adjustable power supplies or can be fixed voltage power supplies. A power supply circuit is rated by the voltage or range of voltage it supplies and the maximum current it allows to draw by a load. Secondly, the households are provided with AC voltages as main supplies. A lot of electrical appliances like fans, fluorescent tubes, and others are capable of using AC voltages directly but most of the electronic devices require conversion of AC voltage to DC voltages for their operation. Any external power supply circuit needs to convert AC voltage to DC voltage for use by the electronic devices. In this project, an adjustable power supply circuit is designed which inputs AC mains and provides 0 to 30V 2A DC Voltage as output.
Adjustable +/- 1.25V to +/-22V 1A Power Supply Circuit (Part 2/13)
In the previous project, an adjustable power supply circuit having an output voltage in the range between 0V and 30V with the maximum current capacity of 2A was designed. A lot of times required DC supply should have both positive and negative voltages. In the previous project, the negative voltage could be provided to a device only by reversing the terminal connections manually. The circuit will input 220V-230V AC and generates a variable DC voltage in the range of +/- 1.25 V to +/-22V at the output. This power supply can provide a maximum current of 1A at the output. For making an adjustable power supply that would have both negative and positive voltages, a center tape transformer needs to be employed in the circuit design.
Adjustable 0 to 15V 1A Mini Power Supply (Part 3/13)
This project aims to build an adjustable 0 to 15V 1A power supply circuit. The circuit will work as a portable mini power supply for most of the electronic gadgets. The circuit could be used as power adaptor for smartphones, wearables, and computer gadgets. In this project, an adjustable regulated symmetrical positive power supply is designed.For reducing any fluctuation and ripples at the output the supply needs to be regulated so that it can provide a constant voltage at the output. Again like previous projects, the voltage is adjusted using a variable resistor. This power supply provides regulated as well as the adjustable voltage at the output.
Constant 12V Power Supply for LED Circuits (Part 4/13)
In the previous projects, adjustable power supply circuits were designed. Sometimes, the voltage to drive a specific circuit is already known and power supply circuit to output a constant voltage needs to be designed. In this project, a constant 12V power supply circuit is designed with an aim to power LED circuits.The circuit needs to be designed in a way that it should be void of any fluctuations or ripples. The circuit will input supply from main AC supplies and will convert it to a ripple free 12V DC supply. The circuit will be able to draw a maximum current of 1A.
Constant +/-9V DC Symmetrical Power Supply Circuit (Part 5/13)
In the previous project, a constant 12V DC power circuit with current limitation of 1A was designed. In this project, a symmetrical dual power supply with constant voltage outputs will be designed. A symmetrical dual power supply can provide two symmetrical voltages at the output with opposite polarity with respect to a common ground reference.Every electronic circuit needs a proper power supply at the input for its optimum functioning. The power supply of any device or circuit should be chosen as per its power requirements. In this project, a regulated power supply circuit which can output constant voltages of 9V and -9V with 1A maximum current is designed.
Making a Circuit Breaker (Part 6/13)
Protecting circuits from over current is an important aspect of circuit designing. The cause for over current can be intolerable voltage fluctuation in the power supply, short circuiting, failure of a device or component and overloading. Usually, for the protection of circuits from over current and so the damage from overheating of components, electronic fuses are used in their power supply sections. Electronic fuses are thin metallic wires which melt down over the passage of a threshold current. In the design of power circuits, apart from electronic fuses, circuit breakers are also used for circuit protection. Any circuit breaker operates like a relay which has the ability to detect a threshold current level and disconnect the rest of the circuit by tripping off the supplies.
MicroPython – Digital input/output in ESP8266 and ESP32
The first step in programming embedded devices is to perform digital input/output. Digital input/output refers to reading parallel data. The same logical signals are utilized for switching and control operations. MicroPython, an embedded firmware, essentially includes libraries to control digital input/output and other hardware functions. MicroPython can be uploaded and run on a variety of…
Automatic Software Update by IoT Device over FTP Protocol – IOT Part 44
In the previous tutorial, FTP protocol and file transfer over it between a Client and Server was discussed. The FTP protocol can really useful in many IoT applications. Many IOT devices are installed in places like nuclear plant, electrical grids and other industrial setups where these types of devices can get some bugs and need application software updates to fix them. On standard IoT protocols like MQTT, CoAP, etc, it is hard to update and reinstall application software because most of the IoT protocols are designed for IoT communication between devices and network but not for tasks like application updates.
Application of FTP Protocol in Internet of Things – IOT Part 43
File Transfer Protocol (FTP) is a standard protocol for transferring files between a client and server over an internet network. The FTP protocol was written by Abhay Bhushan (IIT Kanpur) in 1971. In 1980, a TCP/IP version of the protocol as RFC 765 was introduced which became the de facto standard worldwide. in 1998, the protocol stack was updated for IPv6 support. Within this protocol, the security features were enabled by a TLS/SSL layers called FTP Secure (FTPS). A new secured version of FTP is also widely used called SSH File transfer protocol (SFTP). The SFTP is quite different protocol than the traditional FTPS.
SSH File Transfer Protocol – IOT Part 45
In the previous tutorial, it was seen how FTP protocol can be used to update application software on an IoT device. However, FTP protocol has some security concerns as it is vulnerable to several kind of attacks like Brute force attack, FTP bounce attack, Packet capture, Port stealing (guessing the next open port and usurping a legitimate connection), Spoofing attack, Username enumeration etc. Therefore, secure variants of FTP protocols were developed. SSH File Transfer Protocol is one of the secure variants of the FTP protocol.
Raspberry Pi Server based Hotel/Restaurant Order Management System on IoT – IOT Part 46
Nowadays, most of the hotels and restaurants take online orders of food. Many hotels and restaurants either facilitate pre-ordering or even render delivery services in the local areas. In this project, an Hotel Order Management System is designed where a customer can pre-order food items using a mobile app and a Raspberry Pi based Server manages to cater menu items and book orders.
IMAP Protocol- IOT Part 47
Emails are the most commonly used communication in the today’s digital era. The emails can also be way of communication with IoT devices. The emails can be used to pass commands to IoT devices. The devices can then be programmed and configured to read emails received and act accordingly. There can be interesting applications built this way. For receiving emails, the IoT devices need to configure as an Email Client. They can retrieve emails only over a standard email protocol. Internet Message Access Protocol (IMAP) is one of the standard email message protocols.
Controlling IoT Devices through Emails over IMAP Protocol – IOT Part 48
In the previous tutorial, it was mentioned that IMAP protocol is a standard email protocol which is used to store email messages and retrieve them. It was also mentioned that IMAP protocol can be used in IoT applications where commands can be passed to IoT devices by emails. This can be really helpful in certain situations like when security might be the main concern. Also, emails can be sent on any network without any special application or permissions. The IoT devices can receive emails as email clients where they can read emails and process information contained in them.
What is MicroPython?
MicroPython implements the Python 3 programming language for microcontrollers and microcomputers. It is a firmware solution designed to implement high-level language features of Python into low-level hardware platforms. The firmware is optimized to run in constrained environments while allowing a small subset of Python 3 standard libraries into embedded programming. MicroPython firmware can run in…
RPi Python Programming 07: Python basics (part 2)
In the previous tutorial, we learned about Python’s syntax — meaning its identifiers, keywords, comments, statements, literals, and data types. We also learned that Python is object-oriented and that these objects can be mutable or immutable. Python objects that point to a group of values are iterable, which, in this case, is referred to as…
RPi Python Programming 08: Python lists and byte arrays
In the previous tutorial, we learned about basic syntax and several elements of Python’s language. Python offers six types of sequences: strings, bytes, byte arrays, range, tuples, and lists. Importantly, the strings, bytes, range, and tuples are immutable sequences that cannot be modified once defined. It’s only possible to create or destroy these sequences. This…
RPi Python Programming 09: Python sets and dictionaries
In the previous tutorial, we learned about manipulating data values in lists and byte arrays. Python also has mutable unordered collections, including sets and dictionaries. Let’s review these two and learn how to manipulate the data values/objects in sets and dictionaries. Sets Sets are unordered mutable collections of items. The items in a set can…
RPi Python Programming 10: Object-oriented Python
In the previous tutorial, we learned about the sequences and unordered collections in Python, including the operations, functions, and methods applicable to them. However, there can be more complex data structures in an application, which are known as user-defined classes and objects. Any application uses data (values/objects/user-defined classes/objects) and code behavior (how the data is…