Learning Embedded systems without hardware -for beginners

Ishna Jain
Electronic geeks
Published in
4 min readMar 11, 2023

This is a beginner-friendly, step-by-step guide to building a basic smart farming system by using virtual simulations of hardware and learning embedded concepts along the way.

Please note that hardware is not required for this tutorial. Tinkercad will be utilized for hardware simulation. It is browser-based, so there is no need to download anything.

Embedded Systems are computers embedded in objects or environments that perform tasks to accomplish a specified functionality. These are mostly hidden from the users and only limited input/output is visible.

Embedded Systems are application specific systems .

For example, a washing machine only washes clothing based on the inputs it receives. A calculator can only do calculations. Etc.

A laptop or computer is not an embedded system since it is a general-purpose device and is used for a wide range of applications.

This article will teach you how to create a smart farming system for a small field of high-yielding crops that are mostly influenced by climatic conditions.

A basic Embedded system consists of:

  • Sensors for sensing the environment.
  • Microcontroller unit (MCU) for processing and data acquisition from sensors.
  • An actuator for managing the physical environment.
  • A power source that supplies electricity to all connected devices.

The components used in this tutorial are listed below. Please keep in mind that they may not be the best components for our application, but they are the ones that are accessible in the Tinkercad library.

Sensors :

  • Temperature sensor to monitor the ambient temperature.
  • Soil Moisture sensor to monitor the moisture content in the soil.

Actuators :

  • Servo motor to trigger irrigation based on the temperature and moisture readings.

MCU :

  • Arduino for interfacing sensors and communication module

Let's start building the system :

  1. Open Tinkercad by clicking here in your browser window.

2. Click on “New” in the top right corner and select circuit from the dropdown menu.

3. A new circuit dashboard will open.

4. Click on components and select Arduino in the right sidebar.

5. Select Arduino with Breadboard.

6. Same way search for temperature and soil moisture sensors and place them on the workspace. Draw the circuit as follows :

7. Click on Code in the navigation bar and select the edit mode as text.

8. You will find a code editor like the one shown below.

9. Paste the code written below.

// C++ code
//
Servo motor;
float moisture=0.0;
float temp=0.0;

void setup()
{
pinMode(A0, INPUT);
pinMode(A5,INPUT);
motor.attach(11);
Serial.begin(9600);
}

void loop()
{
moisture=analogRead(A5);
temp=analogRead(A0);
Serial.print("temp ");
Serial.println(temp);
Serial.print("moisture ");
Serial.println(moisture);
motor.write(90);
if(temp>200){
if (moisture<50){
motor.write(90);

}
}
else{
motor.write(0);
}
delay(1000);
}

10. Click on start simulation. If everything is connected right, you will see this output in the serial monitor.

11. To manipulate sensor values, click on the individual sensor while the simulation is on. You will see a slider with both sensors. Move the slider to change the input from the sensors.

For learning more about embedded systems and IoT, do follow me and do like if you found this article helpful.

--

--

Ishna Jain
Electronic geeks

I learn, I write. Tech || Philosophy || Self-improvement