Tools & Downloads   /   Programmers & ICSP

dsPIC33 Recorder using dsPIC33FJ12GP201 with Proteus Simulation

Low-power dsPIC33 recorder project for logging temperature, humidity, and pressure using sensors, EEPROM storage, and Proteus simulation.

Published
Updated

At a glance

CategoryProgrammers & ICSP
IncludesCode · Circuit diagram · Proteus · Download files
Reading time~4 min
Jump to a section
  1. Introduction
  2. How the Project Works (Overview)
  3. Block Diagram / Workflow Explanation
  4. Key Features
  5. Components Used
  6. Applications
  7. Explanation of Code (High-Level)
  8. Source Code
  9. Complete Source Code
  10. Proteus Simulation
  11. (FAQs)
  12. 1: Why does the Proteus simulation pause periodically?
  13. 2: Can I change the sampling interval?
  14. 3: Why is I²C turned off during sensor reading?
  15. 4: Can this run on other dsPIC33 devices?
  16. 5: Why is data averaged for pressure readings?
  17. 6: Can I log more sensors?
  18. 7: Why use ferroelectric EEPROM?
  19. Conclusion
  20. Complete File
  21. dsPIC33 Recorder using dsPIC33FJ12GP201 with Proteus Simulation
  22. Quick Solutions to Questions related to the dsPIC33 Recorder:
  23. Related projects

Summary of dsPIC33 Recorder using dsPIC33FJ12GP201 with Proteus Simulation

The dsPIC33 Recorder is a low-power data-logging project using a dsPIC33FJ12GP201 to periodically read temperature, humidity, and analog pressure, store records in I²C ferroelectric EEPROM, and return to ultra-low-power sleep. It uses timer and external interrupts, ADC averaging for pressure, UART command interface, and is fully simulated in Proteus VSM for educational and portable environmental monitoring applications.

Parts used in the dsPIC33 Recorder:

  • dsPIC33FJ12GP201 microcontroller
  • Digital temperature and humidity sensor (SHT series)
  • Analog pressure sensor
  • I²C Ferroelectric EEPROM
  • 32.768 kHz crystal oscillator
  • UART serial interface (for terminal)
  • Resistors
  • Capacitors
  • Power conditioning components
  • Proteus VSM simulation environment (for testing)

Introduction

The dsPIC33 Recorder is a low-power microcontroller project designed to periodically record environmental data using a dsPIC33 digital signal controller. Built and tested in Proteus simulation, this project demonstrates how embedded systems can efficiently collect, process, and store sensor data over long periods.
It combines digital and analog sensing, non-volatile memory storage, and serial communication in a compact design.
This makes it an excellent practical electronics example for learning data logging, power management, and firmware structure on dsPIC devices.
The project is ideal for students and engineers exploring embedded systems, sensor interfacing, and low-power firmware design.

Embedded electronics prototyping setup
Illustrative View of the Concept.

How the Project Works (Overview)

The system periodically wakes up from low-power sleep, measures environmental parameters, stores them in non-volatile memory, and then returns to sleep.
A timer interrupt controls the sampling interval, while an external interrupt allows a serial terminal to interrupt normal operation.
The dsPIC33 reads temperature and humidity from a digital sensor, pressure from an analog sensor, and logs the values into I²C ferroelectric memory.
All timing, memory management, and sensor handling are managed in firmware.

Block Diagram / Workflow Explanation

  1. Timer1 Wake-Up

    • Low-power oscillator drives Timer1

    • dsPIC33 wakes up at a programmed interval

  2. Sensor Acquisition

    • Digital temperature & humidity read via sensor interface

    • Analog pressure read using ADC with averaging

  3. Data Processing

    • Raw sensor values combined into structured data

  4. Non-Volatile Storage

    • Measurements written sequentially into I²C memory

    • Memory header updated with new address

  5. Sleep Mode

    • MCU returns to ultra-low-power sleep until next cycle

  6. User Interrupt (INT0)

    • Serial terminal can interrupt recording for commands

Key Features

  • Periodic environmental data logging

  • Ultra-low-power sleep operation

  • Digital temperature and humidity measurement

  • Analog pressure measurement with averaging

  • I²C non-volatile memory storage

  • Interrupt-driven command interface via serial port

  • Fully simulated in Proteus VSM

Components Used

  • dsPIC33FJ12GP201 – Main controller

  • Digital Temperature & Humidity Sensor (SHT series)

  • Analog Pressure Sensor

  • I²C Ferroelectric EEPROM

  • 32.768 kHz Crystal Oscillator

  • UART Serial Interface

  • Resistors, capacitors, and power conditioning components

Applications

  • Environmental data logging

  • Portable weather monitoring devices

  • Battery-powered sensor nodes

  • Industrial condition monitoring

  • Embedded systems training and education

  • Low-power data acquisition systems

Explanation of Code (High-Level)

The firmware is structured into clear functional modules:

  • Initialization
    Sets oscillator, pin remapping, ADC, Timer1, UART, and interrupts.

  • Interrupt Handling

    • INT0 interrupt pauses logging and processes serial commands.

    • Timer1 interrupt handles periodic data acquisition and logging.

  • Sensor Functions
    Dedicated functions read pressure, temperature, and humidity.

  • Memory Management
    EEPROM header tracks memory usage and configuration parameters.

  • Power Management
    MCU enters sleep mode between measurements to minimize power draw.

dsPIC33 data logger schematic

Source Code

Download
C source
#include "p33FJ12GP201.h"
#include "timer.h"
#include "utilities.h"
#include "analog.h"
#include "i2c_eeprom.h"
#include "SHTxx_drivers.h"
#include "serial.h"
#include "command_proc.h"
#include "common.h"

⬇ Download file

Complete Source Code

Proteus Simulation

In Proteus VSM, the recorder shows periodic wake-ups driven by Timer1.
Sensor values update during each active cycle, EEPROM addresses increment correctly, and UART communication responds immediately to external interrupts.
Power-down behavior is clearly visible as the MCU returns to sleep between samples.

(FAQs)

1: Why does the Proteus simulation pause periodically?

Because the dsPIC enters sleep mode between timer interrupts.

2: Can I change the sampling interval?

Yes, modify the time-base value stored in the EEPROM header.

3: Why is I²C turned off during sensor reading?

To avoid bus conflicts since sensors and EEPROM share clock lines.

4: Can this run on other dsPIC33 devices?

Yes, with minor pin-mapping and configuration changes.

5: Why is data averaged for pressure readings?

Averaging improves ADC stability and noise reduction.

6: Can I log more sensors?

Yes, if memory space and I/O pins are available.

7: Why use ferroelectric EEPROM?

It offers fast writes and very low power consumption.

Conclusion

This dsPIC33 Recorder project is a strong example of low-power embedded systems design using Proteus simulation.
It demonstrates real-world techniques such as sensor interfacing, EEPROM data logging, interrupt handling, and power optimization.
Perfect for learning and experimentation, this project provides solid hands-on experience with microcontroller projects and professional firmware structure.

Complete File

⬇ Download file

dsPIC33 Recorder using dsPIC33FJ12GP201 with Proteus Simulation

  • Why does the Proteus simulation pause periodically?
    Because the dsPIC enters sleep mode between timer interrupts.
  • Can I change the sampling interval?
    Yes, modify the time-base value stored in the EEPROM header.
  • Why is I²C turned off during sensor reading?
    To avoid bus conflicts since sensors and EEPROM share clock lines.
  • Can this run on other dsPIC33 devices?
    Yes, with minor pin-mapping and configuration changes.
  • Why is data averaged for pressure readings?
    Averaging improves ADC stability and noise reduction.
  • Can I log more sensors?
    Yes, if memory space and I/O pins are available.
  • Why use ferroelectric EEPROM?
    It offers fast writes and very low power consumption.
  • How does the system wake up to take measurements?
    Timer1 driven by a low-power oscillator wakes the dsPIC at the programmed interval.
  • How can a user interrupt recording?
    An external INT0 interrupt from a serial terminal can pause logging and process commands.
Programmers & ICSP

Calculator Test using PIC24FJ64GA006 with Proteus Simulation

Introduction The Calculator Test using EASYHDL is a practical microcontroller project built on the PIC24FJ64GA006 and simulated in Proteus. This project demonstrates...

Programmers & ICSP

PID Controlled Oven using TMS320F28027PT with Proteus Simulation

IntroductionThis project demonstrates a PID controlled oven implemented using a PICCOLO TMS320F28027PT microcontroller and verified through Proteus simulation.It is a practical microcontroller...

Programmers & ICSP

PICCOLO Motor Controller Sample Design using TMS320F28023PT with Proteus Simulation

IntroductionThis project demonstrates a PICCOLO motor controller sample design implemented using the TMS320F28023PT Piccolo microcontroller and tested through Proteus simulation. It focuses...

Programmers & ICSP · PIC16F84A

PIC Musical Doorbell using PIC16F84A with Proteus Simulation

IntroductionThis microcontroller project demonstrates a musical doorbell built around a PIC16F84A and a simple piezo sounder.Using two push buttons, the system allows...

Programmers & ICSP · PIC16F877A

EPE PIC/LCD Demo using PIC16F877 with Proteus Simulation

IntroductionThe EPE PIC/LCD Demo is a classic microcontroller project that demonstrates how a PIC16F877 can fully control a PG12864F graphical LCD.Designed as...

Programmers & ICSP · PIC16F628A

DHT11 Low Cost Humidity Sensor using PIC16F628A with Proteus Simulation

IntroductionThis microcontroller project demonstrates how to interface a low-cost DHT11 temperature and humidity sensor with a PIC16F628A using a Proteus simulation environment.The...

Ibrar Ayyub

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough...