Research and Teaching Blog

8 Posts with tag: ABE425

ABE425 Notes

This post will serve as a location to collect miscellaneous information about the lectures. 

Solution for problem shown on April 16th

Posted on April 16, 2012 0 Comments
Tags: ABE425

ABE425 Project Report

Here is the link to the project template (MS Word .docx). 

Here's a link to the grading rubric and the names of the projects.  

Posted on April 15, 2012 0 Comments
Tags: ABE425

Serial communication demo

Demo code for connecting two computers using an Arduino-mediated serial connection. Needs fixing.. 

// An Arduino-mediated serial communication device
// Kaustubh D. Bhalerao

/* Device topology:

  Computer1--USB--Arduino1==Serial==Arduino2--USB--Computer2
  
  We are going to try this....
  
  Computer --TX0---> Arduino
      #    <--RX0--- USART0
                       ##
                     SWSerTX <===|
                                 |
                     SWSerRX <===|
  
  The computer sends a packet over USART/USB to the Arduino
  The arduino relays it to the SWser transmit port which is 
  received on the SWSer RX port, which relays it back to the 
  computer
*/

// Pin Layout

// Pins 2 and 3 ...

Posted on April 12, 2012 0 Comments
Tags: ABE425 , programming

Sensors and actuators

Sensors

Actuators

Posted on March 14, 2012 0 Comments
Tags: ABE425

PID Control using the arduino

The Arduino comes with a beautiful contributed PID library. The following code demonstrates how to use the PID library to control the voltage level in a 'leaky' capacitor. 

 

#include <PID_v1.h> 
// This file loads the PID_v1 library. 
// make sure the PID library is stored in
// Path/to/Arduino/libraries/ folder
// http://arduino.cc/playground/Code/PIDLibrary 
// PID library
// http://arduino.cc/en/Reference/Libraries 
// How to install the library


/* Tank filling PID controller. 
 Kaustubh Bhalerao
 ABE 425 Demo
 
 In this ...

Posted on March 8, 2012 0 Comments
Tags: ABE425 , programming

Analog In and Debounce

/* 
A control system based on the Arduino microcontroller platform

Copyright: Kaustubh D. Bhalerao. All rights reserved

System specifications:
1) Toggle switch for toggling the controller
2) LED output showing the state of the controller
3) A digital output for controlling a heater
4) An analog input for reading temperature

Resource Allocation: 
1) Momentary ON switch - Pin 2 (Interrupt capable)
2) LED status output - Pin 13 (Using the built-in LED)
3) Digital output for heater - Pin 5 (PWM capable for future ...

Posted on March 1, 2012 0 Comments
Tags: ABE425 , Instrumentation

Digital IO with interrupts

Here is an improved version of the code. Note that the digital input pin is actually never even read! It is only used to detect the state changes (Here falling edges). 

It is simple enough (and robust enough). As you can see my two-yr old can operate the circuit. It is unbelievable he has  more fun with this switch than with an iPad!

Sammy on the arduino

 

/* 
A control system based on the Arduino microcontroller platform

Copyright: Kaustubh D. Bhalerao. All rights reserved

System ...

Posted on February 24, 2012 0 Comments
Tags: ABE425 , Instrumentation , programming

Demo code for the arduino

Here's the ugly version first

 

int b = 0; 
void setup() {
pinMode(2, INPUT);
digitalWrite(2, HIGH);
pinMode(13, OUTPUT);
pinMode(5, OUTPUT);
}

void loop() {
b = digitalRead(2);
if(b) {
digitalWrite(13, 1);
digitalWrite(5, 0);}
else {digitalWrite(13, 0);
    digitalWrite(5, 0);}}

This is the nicer looking (and therefore more correct) version. You should be able to cut and paste the following straight into your arduino sketch. 

 

/* 
A control system based on the Arduino microcontroller platform

Copyright: Kaustubh D ...

Posted on February 21, 2012 0 Comments
Tags: ABE425

 
Loading