19 March 2012

ARDUINO WORKSHOP BY SIR ZUL


18 MARCH 2012


This weekend, Medical Section committee conducted Arduino workshop. It is open for any course, but targeted especially for FYP student. There is lots of things that we get from this workshop as it is conducted for the beginners ; from Introduction to Arduio, how to install the software, run simple program such as running LED and switches, be guided line-by-line and the important command that should have in the programming and many more.  
we also being provided with CD that consists of Arduino e-book, example of program, power point notes, support program such as Fritzing and Toolduino software.  


Here is some interesting point that can be highlighted through out these workshop:

ABOUT ARDUINO:

Arduino is great because it can give you results right away, and quickly build your confidence and understanding. Confidence is the only real currency of innovation after all. Once you have that, you can move on to more sophisticated projects. But without an easy-to-understand entry point, you’ll never get there at all.


  •       It's an open-source physical computing platform based on a simple micro-controller board, and a development environment for writing software for the board.
  •       Arduino projects can be stand-alone, or they can be communicate with software running on your computer (e.g. Flash, Processing, Max MSP.)

  •       The boards can be assembled by hand or purchased pre-assembled; the open-source IDE can be downloaded for free. 
SPECIFICATIONS OF ARDUINO:
  •        Microcontroller: ATmega328
  •        Operating Voltage: 5V
  •        Input Voltage (recommended): 7-12V
  •        Input Voltage (limits): 6-20V
  •        Digital I/O Pins: 14 (of which 6 provide PWM output)
  •        Analog Input Pins: 6
  •        DC Current per I/O Pin: 40 mA
  •        DC Current for 3.3V Pin: 50 mA
  •        Flash Memory: 32 KB (ATmega328) of which 0.5 KB used by bootloader
  •        SRAM: 2 KB (ATmega328)
  •        EEPROM: 1 KB (ATmega328)
  •        Clock Speed: 16 MHz
Runs on: Windows, Mac OS X, Linux
Languages: Wiring/Arduino, C/C++
Getting Started guides: Clear step-by-step instructions, from download to blinking LED.
Knowledge base:
• Many simple examples included with download
• Good reference guide to the commands
• Large knowledge base on Arduino site and elsewhere
Advantage:
• Can be run as I/O board, using Firmata firmware
• Very large knowledge base
• Simple language, but expandable using C/C++
• Multiple models, for shields, breadboards, wearable, extra I/O pins
• Many shield modules
• Large number of open source derivative boards
Disadvantage:
• C language constructs (semicolons, brackets, case sensitivity) are confusing

:: Arduino also can be stand alone. it is impossible for FYP student to attach Arduino board in their project. so, to make it stand alone, it just requires two capacitors, and oscillator; connected Atmega 328P and 5V supply. 



NOTE: I can try applying Aduino in my project to add function such as alarm if the tube disconnect from the mattress, or add LCD display; for example, to display amount of pressure delivered into or sucked out of the mattress.    

12 March 2012

week 8


 12 march 2012



As i have mention before, i think stepper has the best characteristic to be use in my project. so, i learn more about stepper this week. Stepper has many types. we have to choose it based on number of step that it produce. 








First of all, I simply choose a stepper with 50 number of step. There are six wires emerging from the stepper motor: two red, two yellow, and two grey. We will call the wires R1, Y1, G1, R2, Y2, and G2 where the letter is the first letter of the wire's color and the number is to differentiate them. The next step is, measuring the resistance to determine the connection. Systematically we connected the testing leads of the multimeter to pairs of wires coming out from the stepper motors and put the measured results into the following simple table:



R1
R2
G1
G2
Y1
Y2
R1

-
117
-
117
-
R2
-

-
117
-
117
G1
117
-

-
234
-
G2
-
117
-

-
236
Y1
117
-
234
-

-
Y2
-
117
-
234
-

    All of the above results are measurements taken in Ohms. Infinite resistance is represented by a '-'. 

Where the resistance between two wires is infinite we know there is no connection between those two wires within the stepper motor. For example, between R1 and R2 or G1 and G2. We have two different values of resistance between the other wires - 117 Ohms and 234 Ohms with one being half of the other. This is because this stepper motor has four phases and therefore four identical coils. When the resistance measured between two wires is 117 Ohms, the wires are connected across one coil, and when the resistance is 234 Ohms the wires are connected across two coils.

R1 is connected to G1 and Y1 across one coil. R2 is connected to G2 and Y2 across one coil. G1 and Y1 are connected across two coils, and G2 and Y2 are connected across two coils. None of the 2's are connected to any of the 1's. Therefore we can draw the following simple diagram of the wiring of this stepper motor:
Stepper Motor Wiring Diagram

The four live wires are G1, G2, Y1, and Y2, and there are two common wires R1 and R2


Here i attached some picture as for reference:
.




Now, I know how to connect stepper motor and do simple programming to test it. =) 



2 March 2012

week 7


1st of March


Nothing much i can do this week as it is a phase tests week. 


I didn't have much time to have a discussion with Mdm. Naza as the time is quite limited. But i do meet her in a short period to discuss about using two motor; based on Sir Zubir suggestion. So, one is for pumping air and the other for sucking. 


Mdm Naza advise me to do more research regarding the motor.Yes, it is not efficient to use two motor just for pumping and sucking the air. I need to research more about this. 


Next week will be mid-term break.. I plan to come back earlier to complete my project. but then, all Medical Section staff are not around for the entire week. =(
So, i'll proceed with my research regarding selection of pump and motor.   

24 February 2012

week 6


23  February 2012


This is already week 6, and I haven't chosen motor and suitable pump for my project yet. I really have to speed up, since time is running out..! i did do some research regarding the motor... and I found that stepper is the best choice for my project. I need to use motor rotating with constant step angle; which is connected to the valve. The valve will rotate and alternately open one chamber at once to deliver air in the mattress. It will then produce alternating flow of air in the mattress.




WHAT IS STEPPER MOTOR??


             Stepper motor (or step motor) is a brushless DC electric motor that can divide a full rotation into a large number of steps. Stepper motors consists of permanent magnet rotating shaft; called rotor and electromagnets on the stationary portion that surrounds the motor, called staror. Unlike the permanent magnet DC motor, stepper motors move in discrete steps as commanded by the stepper motor controller. Because of their discrete step operation, stepper motors can easily be rotated a finite fraction of a rotation. Another key feature of stepper motors is their ability to hold their load steady once the require position is achieved. 
                A stepper motor often has an internal rotor with a large number of permanent magnet “teeth”. A large number of electromagnet "teeth" are mounted on an external stator. Electromagnets are polarized and depolarized sequentially, causing the rotor to spin one "step". Full step motors spin 360o/(# of teeth) in each step while half step motors spin 180o/(# of teeth) in each step. Micro-step motors further decrease the rotation in each step. A stepper motor controller can move the electric motor one step (in either direction) by applying a voltage pulse and rotational speed is controlled by changing the frequency of the voltage pulses Diagram below shows one full rotation for stepper motor.







          There are several types of stepper motors. 4-wire stepper motors contain only two electromagnets, however the operation is more complicated than those with three or four magnets, because the driving circuit must be able to reverse the current after each step. Usually, people use  6-wire motor.

On 23 February, I attend a short and brief workshop conducted by Sir Zul regarding Arduino. In this two hours workshop, Sir Zul give introduction of Arduino, highlight few importance command in Arduino program, introduce several type of Arduino board; each of it has its own function and application, did some demo, and open Q&A session to ask regarding FYP.
      From this workshop, i knew that, to drive a motor using Arduino, we have to choose Arduino Romeo. it can be done by normal Arduino, but have to add H-bridge. For the Arduino to stand alone, (since student will face trouble if attached Arduino board in FYP circuit) it requires two capacitors and one oscillator, plus 5V supply, connected to Atmega 328. 

20 February 2012

week 5


20 February 2012

Again, about the mattress, I have design the prototype, but haven’t choose the material. In my mind, I’m planning to produce something like this:

In order to produce something like this, I have to consider the type of material to be used. If I'm using 220V supply, I cannot use balloon. I also cannot use tube; because we cant see the alternating of air flow, inflate and deflate of the mattress. 

Forgetting about the mattress, now I want to focus with the circuit. I'll think again how to produce the prototype to test the pump.

Before selecting suitable motor to be used, i need to identify the system operation. From my observation, the principle of the pumping is :

:: At first, when user ON the switch, they have to set to the maximum pressure; by adjusting  the knob. Maximum pressure is about 400kpa. It is to inflate the mattress. It can be done although patient is lying on the bed. After the entire mattress is filled, users need to slow down the pressure by adjusting the knob. 
:: Motor will make the pump to suck air, and push it into the tube which is connected to the valve. The valve consists of three chamber. 
:: The valve will rotate, and pump air into the mattress at several minutes; via two other chamber. The first chamber will deliver air at several minutes to the mattress, then stop, and second tube will repeat the operation. ( in order to produce alternate flow in the mattress)
:: The process will repeat. 

Below is the image of the valve and the chamber:

Center tube is from the pump, the other two is connected to the mattress





12 February 2012

week 4


11 February 2012




So, regarding the mattress, I think I wanna buy the existing one; which in single bed size. It is because, it is impossible for me to design the same design for the air to flow in the mattress (design for the air to flow alternately). My plan, I will try to make some modification to the mattress; to add some features such as extra deflate tubes.

single bed size mattress

After buying the mattress, i'm thinking of adding the tube, which has the same concept like the one at the buoy. The tube will be inserted at the end of the mattress, so that deflating process will be faster. Below is the picture of the deflate tube that i'm planning to add at the end of the mattress. 


Although i have to think how to insert the tube to the mattress without make any holes on it, i still proposing the idea to Mdm Naza. Unfortunately, Sir Hisyam said that it is impossible for me to add the tube at the mattress. It is because, the mattress is "sealed" at every end. How i'm going to insert it ? I'm advised to think another method, because, any mistake that i make in order to insert the  tube will cause a hole to the mattress. So, I'm advised to just producing the prototype. About the design, I have to think how to produce something that can flow alternately, with the same concept like the existing, using what material and many more ...




  

7 February 2012

week 3


7 february 2012



As mentioned last time, I aleady went to Jalan Pasar and bought some component. For this time being, I'm focusing on my pressure control circuit. For this circuit, the component used are:


  • variable resistor 500K
  • MAC 97A8
  • resistor and 
  • capacitor 104 (0.1 nF)
  • DIAC D83
  • PC board
I'm planning to construct and test the circuit as soon as posibble, and move to next part. 


next, i did do some survey regarding the mattress. my plan, i want to give the supplier my spec for the mattress. because, i'm going to add up some features from existing mattress. but, generally, most of the supplier cannot produce it; due to the production is fix and done at the factory. so, it is impossible for them to take my design and produce just one piece of the mattress. because of this, i need to discuss with my supervisor regarding the improvement of the project. maybe, other add up features on the circuit, rather than at the mattress. 
:: planning to just buy the ready made mattress; which is single bed size.  below is the picture of the component that I've bought.