Solar-Powered IoT Environmental Monitoring Station
Summary
In this four-week project, students worked in groups to develop a **Solar-Powered IoT Environmental Monitoring Station** using MATLAB. The project was designed to help students apply the programming skills learned in class to a practical engineering problem. Students worked with simulated data such as temperature, light intensity, and battery level, and used MATLAB for data analysis, visualization, regression, prediction, and simple decision-making.
The class was divided into two groups with different responsibilities. One group focused mainly on data generation and simulation, while the other focused on modeling and analysis. The groups later exchanged their work and combined the different parts into a final solution.
The project allowed students to see how programming can be used in a real engineering application while also developing skills in teamwork, problem-solving, code sharing, and technical communication.
Keywords: MATLAB, engineering programming, project-based learning, solar-powered systems
Learning Goals
The main goal of this activity is to help students move beyond learning MATLAB commands individually and begin using programming as a tool for solving an engineering problem. Through the project, students apply concepts such as data generation, data organization, visualization, regression, prediction, and simple decision-making within the context of a solar-powered environmental monitoring system.
MATLAB is used throughout the activity to create and manage data, develop scripts, visualize system behavior, perform analysis, and build simple predictive models. The activity also reinforces basic programming habits that students sometimes overlook, such as using MATLAB `help` to understand unfamiliar functions or syntax and adding meaningful comments to scripts so that the purpose and flow of the code are clear. Emphasizing these simple practices helped students become more independent and intentional in how they approached programming problems.
The activity also develops higher-order thinking skills. Students must interpret data, make decisions about how to organize and analyze it, develop and test models, troubleshoot their code, and combine different parts of the project into one working solution. Because the two groups have different responsibilities, students also have to understand code and data developed by others and determine how to integrate them successfully.
Another goal was to give students a small taste of how programming skills are actually used and practiced in industry. They had to work with other people's code, explain their decisions, document their work, and present a final solution as a team. I also made professional dress somewhat mandatory for the final presentation; I often told them that if we are going to pretend this is a real engineering project, we might as well look the part too.
In addition to technical skills, the project develops teamwork, communication, project management, and presentation skills. Students document their weekly progress, exchange files and code with the other group, explain their methods and results, and participate in a final class presentation. The goal is for students to leave the project not only more comfortable with MATLAB, but also with a better sense of what it feels like to work through a collaborative engineering problem from beginning to end.
Context for Use
This activity was developed for an undergraduate Computer Programming for Engineers course. It was used as a four-week group project after students had completed the introductory MATLAB topics in the course. The class was relatively small, which made it possible to divide students into two groups and provide regular guidance as the project progressed.
One group focused mainly on data generation and simulation, while the second group focused on modeling, analysis, prediction, and decision-making. The groups later exchanged their work and brought the different parts together as one final project.
Before starting the activity, students should have a basic working knowledge of MATLAB. They should be able to create and run scripts, work with variables, vectors, and arrays, perform basic calculations, create plots, use simple conditional statements, and work with tables or CSV files. Some familiarity with basic data analysis or regression is helpful, but these can also be introduced during the project.
Students do not need prior experience with solar energy systems, IoT, or advanced modeling. The engineering concepts are kept simple so that the main focus remains on applying programming skills to a practical engineering problem.
The project works well near the middle or later part of an introductory programming course, when students are ready to bring several skills together in one larger application. It can also be adapted for other introductory engineering or engineering computing courses by changing the project duration, dataset, or level of modeling.
MATLAB skills students should have before beginning the activity include: creating scripts; working with variables, vectors, arrays, tables, and CSV files; creating and labeling plots; using simple logical conditions; and organizing code clearly.
Description and Teaching Materials
This activity was designed as a four-week MATLAB project completed toward the latter part of an introductory Computer Programming for Engineers course. By this point in the semester, students had already worked with basic MATLAB programming concepts, so the project allowed them to bring several of those skills together in one larger engineering problem.
The class was divided into two groups with complementary responsibilities. **Group 1 focused on data generation and simulation**, while **Group 2 focused on modeling, analysis, prediction, and decision-making**. The overall problem was framed around a solar-powered environmental monitoring station, with variables such as temperature, light intensity, and battery level.
During the first part of the project, students planned what information the monitoring system would need and how that information should be represented. Group 1 then developed simulated environmental and system data in MATLAB and organized the data into tables and CSV files. Group 2 used the resulting data to perform analysis, develop simple regression or predictive models, and create decision rules based on the behavior of the system.
An important part of the activity was that the groups did not work completely independently. They had to exchange their files and scripts and work with code that someone else had written. This was intentional. I wanted students to experience some of the realities of collaborative programming: your code has to make sense to someone other than you, your variable names matter, and comments suddenly become much more important when another person has to figure out what you were thinking.
For that reason, relatively simple MATLAB skills were emphasized throughout the project. Students were expected to comment their scripts clearly, organize their code, use meaningful variable names, and use tools such as the MATLAB `help` command when they encountered unfamiliar syntax or functions. Troubleshooting and figuring out how to proceed when the code did not work exactly as expected were also part of the learning experience.
Students were also allowed to use MATLAB Copilot during the project. I did not restrict its use, because I wanted students to become comfortable with the kinds of AI-assisted tools they are increasingly likely to encounter in real programming and engineering environments. Copilot could be used at any stage of the activity—for help with syntax, understanding an error message, generating a starting point for a script, suggesting a plotting approach, or helping explain unfamiliar code. The expectation, however, was that students still needed to understand, test, modify, and explain the code they submitted. In other words, Copilot could help them get unstuck, but it could not do the understanding for them.
By the final week, students brought the separate components together into a final MATLAB solution and explained how their portion contributed to the overall monitoring system. The project concluded with a class presentation. Students were randomly called upon to explain different portions of the project, which encouraged everyone to understand more than just the small piece they personally worked on. Professional dress was also part of the presentation expectations—somewhat intentionally—because the goal was to make the final presentation feel a little more like presenting an engineering project in a professional setting and a little less like simply submitting another class assignment.
How MATLAB Is Used
MATLAB serves as the main computational environment for the entire project. Students use it to:
- Generate and organize simulated environmental data.
- Create tables and import/export CSV files.
- Visualize temperature, light, battery, and other system variables.
- Perform basic statistical and regression analysis.
- Develop simple prediction models.
- Implement logical and threshold-based decision rules.
- Integrate scripts developed by different members or groups.
- Test, troubleshoot, and document their programs.
- Use MATLAB `help` and MATLAB Copilot as resources when they encounter unfamiliar syntax, functions, or errors.
The project could certainly be implemented using another programming language, such as Python. I chose MATLAB because it was already the programming environment used throughout the course and allowed students to move easily between programming, data analysis, visualization, and basic modeling without introducing another software platform. MATLAB also provided a good bridge between the programming concepts being taught in the course and tools students are likely to encounter again in later engineering courses.
The addition of MATLAB Copilot also made it possible to introduce students to AI-assisted programming in a controlled academic setting. Rather than banning the tool, I treated it as another resource students could learn to use responsibly. This created opportunities to reinforce an important point: being able to generate code is not the same as being able to understand or defend it.
The purpose was therefore not simply to teach students how to complete one task in MATLAB, but to help them see MATLAB as an engineering problem-solving environment.
Materials Needed
1. Project Description/Student Instructions
An editable document describing the overall Solar-Powered IoT Environmental Monitoring Station project, project expectations, group responsibilities, timeline, and final deliverables. This serves as the primary student project guide.
2. Group 1 Instructions – Data and Simulation
An editable document outlining Group 1's responsibilities for planning the dataset, generating simulated environmental and system data, organizing the data, and preparing files for use by the second group.
3. Group 2 Instructions – Modeling and Analysis
An editable document outlining Group 2's responsibilities for analyzing the generated data, developing simple models or predictions, creating system decision rules, and interpreting the results.
4. Weekly Project Tasks/Timeline
A short week-by-week guide identifying what students are expected to accomplish during each stage of the four-week project. This helps keep the groups working at approximately the same pace and provides checkpoints for instructor feedback.
5. MATLAB Starter Files or Example Script
Any instructor-created starter scripts or examples used to demonstrate data generation, tables, plotting, regression, or conditional decision-making. These can be provided in `.m` format so that faculty and students can easily modify them.
6. Example or Simulated Dataset
A sample CSV or MATLAB data file containing variables such as time, temperature, light intensity, and battery level. This can be used as a backup dataset or as an example of the expected data structure.
7. Weekly Progress Log
An editable document students use to briefly document what was completed, problems encountered, individual contributions, and plans for the following week. This is especially useful for monitoring group participation.
8. Code/Data Exchange Instructions
A short set of instructions for the point in the project when groups exchange scripts and datasets. Its purpose is to reinforce code readability, documentation, and the ability to work with files created by another team.
9. Final Presentation Guidelines and Rubric
A document describing the final presentation expectations, including technical content, understanding of the overall project, teamwork, professional communication, and professional dress. Since students may be randomly selected to present different parts of the project, the guidelines encourage all students to understand the complete system.
10. MATLAB Software and MATLAB Copilot
Students need access to MATLAB. MATLAB Copilot can be used as an optional support tool throughout the project for syntax assistance, debugging, code explanation, and brainstorming possible approaches. No specialized hardware is required for this version of the activity because the environmental and solar-system data are simulated.
Adapting the Activity
The activity is fairly easy to modify. In a shorter course, an instructor could provide the dataset and focus only on analysis and decision-making. For a longer project, students could collect real sensor data rather than simulate it, incorporate hardware, or develop more advanced predictive models. The environmental monitoring context could also be replaced with another engineering application while keeping essentially the same programming structure.
The core idea is the progression from data → analysis → model → decision → communication, with MATLAB serving as the tool that connects each stage.
Student Project contribution log template (Microsoft Word 2007 (.docx) 18kB Sep30 26)
Project matlab template (Matlab File 2kB Sep30 26)
Teaching Notes and Tips
Students may know individual MATLAB commands but still struggle when they have to decide what to do next. I encouraged them to use MATLAB `help`, read error messages carefully, test small sections of code, and think through what each part of the script is doing before looking for a complete solution.
Code readability should be reinforced throughout the project. Students should use meaningful variable names, comments, and clear organization so that someone else can run and understand their work. This becomes especially important when the groups exchange scripts.
MATLAB Copilot can be used during the activity. I did not restrict its use like I ususaly would in class. The students found that it can be helpful for syntax, debugging, or explaining unfamiliar code. However, students should still be expected to test, modify, and explain any code they submit.
Students may also need support with regression and prediction. For an introductory course, simple models are sufficient as long as students understand what they are predicting and can explain whether the results make sense. I provided some templates for them to help them become familiar with those concepts.
Weekly checkpoints and individual progress logs are helpful for keeping groups on track and monitoring participation. For the final presentation, letting students know that anyone may be asked to explain any part of the project encourages them to understand the full system rather than only their assigned portion.
No special safety precautions are needed for the simulated-data version.
Finally, I found that avoiding solving every problem for the students gave them the best learning outcomes from troubleshooting errors, working with another group's code, and discovering where their own documentation could be clearer.
Assessment
Student learning was assessed through a combination of weekly contribution logs, submitted MATLAB scripts, and the final presentation.
The weekly contribution logs accounted for 20% of the project grade and were used to evaluate each student's individual participation, progress, problem-solving, and contribution to the group.
Each week, I also ran and evaluated the submitted MATLAB scripts, looking at whether the code worked, how clearly it was written and commented, and how well students applied concepts taught in class. Weeks 1–3 each accounted for 15% of the project grade.
Week 4 accounted for 35% of the project grade and included the final integrated submission and presentation. During the presentation, students were expected to explain the project, their code, and the reasoning behind their approach, which helped assess both technical understanding and communication skills.