This project was designed to be a lab setup I could use in class and have students test and collect data on an "Industrial Machine", where they could set up and collect data off a DC motor. The plan was to collect temperature data, current and voltage, vibration, and tachometer data. We would be able to simulate changes over time, and as they gather data, they would be able to make predictions as to possible preventative maintenance they should do
This was an interesting project, but as a HighSchool STEAM Engineering teacher I found it quite frustrating. I have only been teaching for 8 years. Before that I was an engineer working here in Silicon Valley. I did lots of Engineering roles and even crossed over to the "Dark Side" into Technical Marketing. I know that rolling out a new product takes time and having all the resources in place sometimes doesn't fit with the release schedule. I know that release in a product into the wild can be fraught with issues. Handing a product off to Engineers, and other DIY hobbyists is one thing. And you can set some expectations that they are going to have to really dig into it to get it to work… But as a teacher I only had limited bandwidth to learn, and then roll it out to my students.
Having Highschool students jump into this pool was problematic. I'm a bit unique, and as a STEAM teacher, I had a bit more skin in the game, but to really get products into the academic world, you need to have more than a quick start guide and a few tutorials.
Teacher, to be able to integrate new tech into their classrooms, need to have some lesson plans, more than a few working "Hello World" examples. I was hoping to have a working example that would let me send a txt, or SMS, or other cellular communication data.
While there might be some examples, I really could not find any, my students could not find any, and the sim card, while it would connect to local cellular providers, was targeted to an EU environment.
OK, what did I do and what will I do?
First, "What will I do"? I'm going to check out all the submitted designs, and after the contest winners are revealed, I'm going to take a few of the example designs, and create a set of labs that will build on sending a txt message. Then I'll have some labs where we can collect some sensor data and pass it on as a txt. Also I want to setup method to replicate the sandbox communication to a web page or PHP and be able to stream to my own page.
Now… What did I do?
Ok, I figured out ot connect my own temperature sensor(PIN_PD1) and my own Hall effect sensor (PIN_PD3) to the analog pins.
int motorTemp() {
analogRead(PIN_PD1);
float motor_analog_value = (float)analogRead(PIN_PD1);
//Serial3.println(motor_analog_value);
Serial.println(motor_analog_value);
//delay(1000);
return motor_analog_value;
}
int RPM() {
analogRead(PIN_PD3);
float motor_RPM_Pulse_value = (float)analogRead(PIN_PD3);
//Serial3.println(motor_RPM_Pulse_value);
//delay(1000);
return motor_RPM_Pulse_value;
}
I then "hijacked" the streaming data that was getting sent through the USB serial port to the HTTP browser connection at… OK <RANT ON>… this page AVR-IoT Cellular Mini On-Boardingseems to be hard to find, and my expectation would be that it would be on the contest page https://www.hackster.io/contests/avriot, but no… and I kept losing it… I know I should have bookmarked it, but I did not, and even as I'm writing this project overview, I spent about 6 min looking for it… it's stuff like this that really makes it hard for a teacher to get tech like this integrated into their classrooms. <RANT OFF>...
I used the onboarding page and then clicked over to the "connect" board page…
<RANT ON>It literally took me another 10 min to find this page, with the aws code on it…
https://iot.microchip.com/avr-iot-cellular-mini?cloud=aws&id=45FEED26C40EDFCE68F8311D847649B16B55AA79
<RANT OFF>
I update the streaming data code:
sprintf_P(transmit_buffer,
PSTR("{\"type\": \"data\", \
\"data\": { \
\"Motor Temperature\": %d, \
\"RPM Pulse\": %d \
} \
}"),
// add motor_analog_temp
//int(Mcp9808.readTempC()),
motorTemp(),
//Veml3328.getRed());
RPM());
and updated and streamed data to this page, where you could see my data from my sensors displayed.
So, yes I know this is a super lame project submission, but it's what I have on a Sunday afternoon, as the 4:00 PM PST deadline approaches….
See you after the contest with some updates.
Comments