Wednesday, June 29, 2022

How to Add and Simulate Soil Moisture Sensor in Proteus 8 | Electrical Resistance

Today, I will share how to add and simulate a soil moisture sensor with Arduino in Proteus 8 software. Most soil moisture sensors use two probes to measure the soil water value and are available in analog or digital outputs. There got two versions of the soil moisture sensor:

  1. Soil Moisture V1 - 1 sensor only.
  2. Soil Moisture V2 - 3 sensors are available in different colors and shapes.


References:

Components:

  1. Soil moisture sensor
  2. Inductor
  3. Capacitor
  4. Potentiometer
  5. DC voltmeter

Steps (Add Library)
  1. Download the soil moisture sensor library file at TheEngineeringProjects.com or click the link HERE. The download link will appear after 20 seconds.

  2. Open the zip file and go to the folder Proteus Library Files. You will find three files on the downloaded zip file named:
    -SoilMoistureSensor2TEP.IDX
    -SoilMoistureSensor2TEP.LIB
    -SoilMoistureSensor2TEP.HEX


  3. Extract these three files to the Proteus libraries folder (C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\DATA\LIBRARY).

Steps (Soil Moisture Sensor 1):
  1. Open your Proteus software and add SOIL MOISTURE, CAPACITOR, INDUCTOR, and POT-HG components to the workspace.


  2. Wiring components:
    -Connect the Test pin of the sensor to the POT-HG wiper pin and end to the POWER and GROUND.
    -Connect GND and VCC of sensor pins to the GROUND and  POWER.
    -Connect the A0 pin of the sensor to the INDUCTOR through CAPACITOR and end to the GROUND.
    -Connect the DC VOLTMETER across CAPACITOR


  3. Double click the soil moisture sensor and click the folder icon at the Program File box. Go to Local Disk (C:) > Program Files (x86) > Labcenter Electronics > Proteus 8 Professional > DATA > LIBRARY > SoilMoistureSensor2TEP.HEX > Open > OK.


  4. Start the simulation. The DC voltage of the sensor will change if the value of the potentiometer change.



Steps (Soil Moisture Sensor 2):
  1. Add SOIL MOISTURE 2, CAPACITOR, INDUCTOR, and POT-HG components to the workspace. The difference between SOIL MOISTURE and SOIL MOISTURE 2 is color. 

     
  2. Wiring components:
    -Connect the Test pin of the sensor to the POT-HG wiper pin and end to the POWER and GROUND.
    -Connect GND and VCC of sensor pins to the GROUND and  POWER.
    -Connect the A0 pin of the sensor to the INDUCTOR through CAPACITOR and end to the GROUND.
    -Connect the DC VOLTMETER across CAPACITOR.


  3. Double click the soil moisture sensor and click the folder icon at the Program File box. Go to Local Disk (C:) > Program Files (x86) > Labcenter Electronics > Proteus 8 Professional > DATA > LIBRARY > SoilMoistureSensor2TEP.HEX > Open > OK.


  4. Start the simulation. The DC voltage of the sensor will change if the value of the potentiometer change.


Steps (Soil Moisture Sensor 3):
  1. Add SOIL MOISTURE 3, CAPACITOR, INDUCTOR, and POT-HG components to the workspace. The different SOIL MOISTURE 3 compared to SOIL MOISTURE 1 and 2 are shaped.
     

  2. Wiring components:
    -Connect the Test pin of the sensor to the POT-HG wiper pin and end to the POWER and GROUND.
    -Connect GND and VCC of sensor pins to the GROUND and  POWER.
    -Connect the A0 pin of the sensor to the INDUCTOR through CAPACITOR and end to the GROUND.
    -Connect the DC VOLTMETER across CAPACITOR.


  3. Double click the soil moisture sensor and click the folder icon at the Program File box. Go to Local Disk (C:) > Program Files (x86) > Labcenter Electronics > Proteus 8 Professional > DATA > LIBRARY > SoilMoistureSensor2TEP.HEX > Open > OK.


  4. Start the simulation. The DC voltage of the sensor will change if the value of the potentiometer change.


Video:


If you have any suggestions, please write in the comment section. Thank you for your time 👷.

Tuesday, June 14, 2022

IoT Based Servo Motor Control using Blynk Apps and Nodemcu | ESP8266 | Project

Today, I will share how to control a servo motor using Blynk web or apps via the internet. The project controls the position of a servo motor using Blynk apps. I'm using an SG90 180-degree micro servo. Nodemcu board can drive this servo motor without an additional power supply.


Related Post:

References:

Steps: 

  1. Prepare 3 jumpers, servo motor, and Nodemcu module.


  2. Connect servo motor GND (brown wire), VCC (red wire), and DATA (orange wire) pins to the GROUND, 3V/5V, and D2 (GPIO 4) of the Nodemcu.


  3. Connect micro USB to Nodemcu module.


  4. Go to the blynk.io website and log in. If you do not have an account yet, click "Create new account".




  5. Create New Template > Type NAME "Servor Control" > Select HARDWARE "ESP8266" > Select CONNECTION TYPE "WiFi" > Done.




  6. Go to Datastreams Tab> New Datastream > Virtual Pin > Type NAME "SERVO" > Select PIN "V0" > Select DATA TYPE "Integer" > Set MIN 0 > Set MAX 180  > Set DEFAULT VALUE 0 > Click Create.



  7. Go to Web Dashboard Tab > Select Slider widget to the canvas.



  8. Select Slider widget setting > Type TITLE "SERVO" > Select Datastream SERVO (V0) > Save. Then, save the Web Dashboard.




  9. Go to Info Tab > Copy FIRMWARE CONFIGURATION.


  10. Open the Servo Control coding project and paste the FIRMWARE CONFIGURATION. Click HERE to download the project code.


  11. Verify and upload the project.


  12. Download and Log In Blynk IoT app on Google Playstore.


  13. Click Add new device > Connect to Wi-Fi > Start > Continue > Connect Blynk Servo Control-57CBF.






  14. Click Ready > Choose your Wi-Fi network > type Wi-Fi password > Continue > Finish.





  15. Click Spanner symbol 🔧 > Click + > Choose Slider widget.




  16. Click Slider Widget > Type Title "SERVO" > Select Datastream "SERVO" > Change SHOW VALUE "ON" > Click back arrow "←".



  17. Lastly, exit the canvas by clicking the back arrow "←".


  18. Test from Phone Apps by sliding the slider widget to the left or right (Minimum value 0 degrees, Maximum Value 180 degrees). The servo motor will position according to the slider value.


  19. To test from the website, go to the 🔍 icon at Tab > Click Servo Control 57CBF.



  20. Slide the slider widget to the left or right (Minimum value 0 degrees, Maximum Value 180 degrees).




Video:


If you have any suggestions, please write in the comment section. Thank you for your time 👷.