Connor DavidsonCassidy Holene
Published

Particle Audio Amp Monitoring System

This project is to monitor the temperatures of vehicle audio equipment to ensure safe operating temperatures.

BeginnerWork in progress363
Particle Audio Amp Monitoring System

Things used in this project

Hardware components

Argon
Particle Argon
Used to compile data.
×2
I2C Display Module 0.91 Inch I2C SSD1306 OLED Display Module Blue I2C OLED Screen Driver DC 3.3V~5V
Used for display of temperature of amplifiers.
×2
Temperature Sensor
Temperature Sensor
Used to monitor the surface temperature of the amplifier.
×2

Software apps and online services

Particle Build Web IDE
Particle Build Web IDE
YouTube

Hand tools and fabrication machines

Wire Stripper & Cutter, 18-10 AWG / 0.75-4mm² Capacity Wires
Wire Stripper & Cutter, 18-10 AWG / 0.75-4mm² Capacity Wires
Plier, Long Nose
Plier, Long Nose
Soldering iron (generic)
Soldering iron (generic)
Solder Wire, Lead Free
Solder Wire, Lead Free

Story

Read more

Custom parts and enclosures

Skar Audio RP-800.1 Amplifier

This is the subwoofer amplifier used in project. This amp will create more heat and has a higher change of going into protect mode.

Skar Audio RP-75.4 Amplifier

This is the mids and highs amplifier. This amplifiers is unlikely to overheat, but it will be interesting to compare it to the subwoofer amp.

Schematics

Visual of Breadboard Wiring

This picture displays how the OLED screens as well as thermistors are wired into each particle for display values. The left side is with the OLED attached and the right side is the OLED detached to show wiring. Both side are similar in this part of the wiring process.

Fritzing Assembly Schematic

Simplified wiring schematic on how to clean up wiring as well as connect OLED and TMP36

Initial LCD design

This was an initial design that took up too much space so I simplified it with OLED.

Code

Code for Thermistor and OLED

C/C++
This code allows for the thermistor to input the particle, then display a temperature in celsius on the OLED.
// This #include statement was automatically added by the Particle IDE.
#include <Adafruit_SSD1306.h>

#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 32 // OLED display height, in pixels
    #define OLED_SDA   D0
    #define OLED_SCL   D1


Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, OLED_SDA, OLED_SCL);

int ThermistorPin = 0;
int Vo;
float R1 = 10000;
float logR2, R2, T, Tc;
float c1 = 1.009249522e-03, c2 = 2.378405444e-04, c3 = 2.019202697e-07;


void setup(){
  display.begin(SSD1306_SWITCHCAPVCC,0x3C); //OLED address 
  display.clearDisplay();
  Serial.begin(9600);
}

void loop(){
  Vo = analogRead(ThermistorPin);
  R2 = R1 * (1023.0 / (float)Vo - 1.0);
  logR2 = log(R2);
  T = (1.0 / (c1 + c2*logR2 + c3*logR2*logR2*logR2));
  Tc = T - 273.15;

  display.clearDisplay();
  display.setTextSize(2);
  display.setTextColor(WHITE);
  display.setCursor(70, 0);
  display.println("C");
  display.display();
  display.setTextSize(2);
  display.setTextColor(WHITE);
  display.setCursor(3, 0);
  display.println(Tc);
  display.display();
  delay(10);
}

Particle Code 2

C/C++
This code allows for data to be sent between devices privately, This information is able to be made public, but I sent it directly to another particle. From device 2 to 1.
  
int sensorPin = A0;
int led1 = A1;
int led2 = A2; 
int led3 = A3;





bool flag = false;
int analogvalue = 0;
double tempC = 0;
char *message = "Connor Davidson Particle 2 MJ";
String aString;





   
void setup(){
      Serial.begin(9600);
      Particle.subscribe("Temperature Data", toggleLed, MY_DEVICES); 
      
pinMode(D7, OUTPUT);
     
     
     
     
     
     
       Particle.variable("flag", flag);
  Particle.variable("analogvalue", analogvalue);
  Particle.variable("temp", tempC);
  if (Particle.variable("mess", message) == false)
  {
      // variable not registered!
  }
  Particle.variable("mess2", aString);

  pinMode(A0, INPUT);
  
  
  
  
     
}
void loop() {




 digitalWrite(D7, HIGH);
        Particle.publish("Temperature Data2", PRIVATE);
        
        delay(300);
        digitalWrite(D7, LOW);
        
        delay(4000);
        
        
        
        
        
     int reading = analogRead(sensorPin);  
     
     // converting that reading to voltage, for 3.3v arduino use 3.3
     float voltage = reading * 3.3;
     voltage /= 1024.0; 
     
     // print out the voltage
     Serial.print(voltage); Serial.println(" volts");
     
     // now print out the temperature
     float temperatureC = (voltage - 0.5) * 100 ;  //converting from 10 mv per degree with 500 mV offset
                                                   //to degrees ((voltage - 500mV) times 100)
     Serial.print(temperatureC); Serial.println(" degrees C");
     
     // now convert to Fahrenheit
     float temperatureF = (temperatureC * 9.0 / 5.0) + 32.0;
     Serial.print(temperatureF); Serial.println(" degrees F");
     
     delay(1000); //waiting a second

     
     
     
     {
  // Read the analog value of the sensor (TMP36)
  analogvalue = analogRead(A0);
  // Convert the reading into degree Celsius
  tempC = (((analogvalue * 3.3) / 4095) - 0.5) * 100;
  delay(200);
}



}





void toggleLed(const char * event, const char * data) {
    digitalWrite(D7, HIGH);
    delay(500);
    digitalWrite(D7, LOW);
    delay(500);
}

Particle Code 1

C/C++
This code is used to convert voltages into degrees celsius then fahrenheit and communicate to particle 2
// This #include statement was automatically added by the Particle IDE.
#include <Adafruit_SSD1306.h>


  
int sensorPin = A0;
int led1 = A1;
int led2 = A2; 
int led3 = A3;

   
   
  
   
   
   
   
   
   
bool flag = false;
int analogvalue = 0;
double tempC = 0;
char *message = "Connor Davidson Particle 1 3M";
String aString;



void setup(){
      Serial.begin(9600);
      
Particle.subscribe("Temperature Data2", toggleLed2, MY_DEVICES);

pinMode(D7, OUTPUT);
     
     {
  Particle.variable("flag", flag);
  Particle.variable("analogvalue", analogvalue);
  Particle.variable("temp", tempC);
  if (Particle.variable("mess", message) == false)
  {
      // variable not registered!
  }
  Particle.variable("mess2", aString);

  pinMode(A0, INPUT);
}









     
     
     
}
void loop() {
        
        
        
        
        digitalWrite(D7, HIGH);
        Particle.publish("Temperature Data", PRIVATE);
        
        delay(300);
        digitalWrite(D7, LOW);
        
        delay(4000);
        
        
        
        
        
        
     int reading = analogRead(sensorPin);  
     

     float voltage = reading * 3.3;
     voltage /= 1024.0; 
     

     Serial.print(voltage); Serial.println(" volts");

     float temperatureC = (voltage - 0.5) * 100 ;  
     Serial.print(temperatureC); Serial.println(" degrees C");
     
     float temperatureF = (temperatureC * 9.0 / 5.0) + 32.0;
     Serial.print(temperatureF); Serial.println(" degrees F");
     
     delay(1000); 
     
     
     

     
     
     
     
     
     
     
     
     
     
     
     
     
     
{
  // Read the analog value of the sensor (TMP36)
  analogvalue = analogRead(A0);
  // Convert the reading into degree Celsius
  tempC = (((analogvalue * 3.3) / 4095) - 0.5) * 100;
  delay(200);
}
     
}





void toggleLed2(const char * event, const char * data) {
    digitalWrite(D7, HIGH);
    delay(500);
    digitalWrite(D7, LOW);
    delay(500);
}

WebHook for Publishing data

C/C++
Additional code on how data is published
{
  "eventName": "Metric",
  "url": "http://example.com",
  "headers": {
    "X-Timestamp": "{{PARTICLE_PUBLISHED_AT}}"
  },
  "auth": {
    "username": "USERNAME",
    "password": "API_KEY"
  },
  "json": {
    "field1": "{{{indoorTemp}}}",
    "field2": "{{{outdoorTemp}}}",
    "created_at": "{{SPARK_PUBLISHED_AT}}"
  }
}

Credits

Connor Davidson

Connor Davidson

1 project • 0 followers
Cassidy Holene

Cassidy Holene

1 project • 0 followers

Comments

Add projectSign up / Login