Skills Dev IV: motors and movements

Made by Sohyun Jin ·

Motors and movements: Weather notification

Created: November 28th, 2023

0

Outcome

  •  This week, I learned how to use the solenoid among the DC motors and created a simple weather indicator. 
  •   I felt the cheerful sound of a solenoid moving resembled an alarm. This alarm device provides a cute display in binary form, indicating only whether one should bring an umbrella or not.

0

Process

  • I thought I had correctly wired the transistor and diode, but it didn't work at all. It worked only when I ignored both elements. I suspected that the resistance amount of the transistor was too high, causing insufficient current. 
  • With the help of TA Zhenfang, I learned that to reach the required current of 1.1A for the solenoid used in class, the voltage assigned to the transistor needed adjustment. Using a 1000Ω resistor, the solenoid current only reached a mere 3.3mA (3.3V/1000Ω). Meaning, I decreased the resistance to increase the entire current and reduced the voltage consumed by the transistor to increase the voltage allocated to the solenoid. 
  • Even reducing it to 47Ω (70mA, Solenoid allocated voltage 4.8V according to Zhenfang), only faint sound was heard, and it didn't work. However, a 30Ω resistor worked. Referring to the collector saturation region graph from the transistor specification, 30Ω  allows 110mA (3.3V/30 Ω), the voltage allocated to the transistor subtly decreases resulting in increasing the voltage size for the solenoid. 

0

Product

  • When the Solenoid is High(1), it indicates clear weather, and when it's Low(0), it represents cloudy weather. I designed it with a paper box layer covering it to minimize interference with the operation of the solenoid.  
  • Whenever I clicked the particle.functions(Sunny, Raining) it shifts the weather display. 

0
0
int solPin = D2;

bool doSolenoidActionSun = false;
bool doSolenoidActionRain = false;

void setup() {

    Serial.begin( 9600 );
    
    pinMode( solPin, OUTPUT );
    
    Particle.function( "Sunny", handleDoSolenoidSun );
    Particle.function( "Raining", handleDoSolenoidRain );
    
}

void loop(){
    
    if( doSolenoidActionSun ){
        
            Serial.println( "Sunny" );
            digitalWrite( solPin, HIGH );
        
    }
    
    if( doSolenoidActionRain ){
    
            Serial.println( "Raining" );
            digitalWrite( solPin, LOW );
       
    }
    doSolenoidActionSun = false;
    doSolenoidActionRain = false;
    
}

int handleDoSolenoidSun( String cmd ){
    
    doSolenoidActionSun = true;
    
    return 1;
}


int handleDoSolenoidRain( String cmd ){
    
    doSolenoidActionRain = true;
    
    return 1;
}
Click to Expand
0

  • I attached the previous trial with  1000Ω below. ( Please expand the video window to view.)

0
x
Share this Project

This project is only accessible by signed in users. Be considerate and think twice before sharing.


Courses

48-675 Designing for the Internet of Things

· 11 members

A hands-on introductory course exploring the Internet of Things and connected product experiences.


About

Motors and movements: Weather notification