Friday, 16 March 2012

Week 8

After mid term break,i start to find component that i needed to construct a circuit.First, i sketch it like below:



I do not have chance to go to Jalan Pasar yet,but i have 16x2 LCD display in my toolbox, so i decided to construct circuit from Arduino to LCD display first.


LCD display is great way to display output from  arduino when it not connected to my computer. The common display used in arduino projects is 16×2 parallel LCD display which compatible with the Hitachi HD44780 driver. It can easily recognize with it 16 pin interface.


I try to print out text message “welcome mc-ergocycle” .


Parts List that i needed :


1) 1x 16×2 parallel LCD display
2)  Arduino board
3) 1x 10kΩ potentiometer
4) Jumper wire
5) Breadboard


Procedure:
1) I constructed a circuit as shown on below:
(refer from arduinoprojects101 )






2) The potentiometer use for adjusting the contrast of the LCD character.
3) Then i edit some part of code of 'hello world' then upload to my arduino as below:




4)As a result, i succeed to display welcoming message as shown below:


Friday, 2 March 2012

Week 7

This week is phase test week, i have problem to balance my time  between fyp and phase test. I am also did not get chance to go to see madam Naszariah. But, after my last paper on 29 march , i manage to go to Jalan Pasar with my friends to buy Arduino kit  as picture below:
Arduino Uno R3
I am also make some tutorial to test Arduino board that i have bought with led blinking as below:
First, before i start to test my arduino , i need to setup the connection between my PC and arduino board. I need arduino board and USB cable as below:




Arduino board
USB cable


 Arduino Environment Software  


Step to be done on my laptop:
1) Connected arduino board with USB cable and USB port at my laptop



2) Select my arduino board type: Tools>Boards>Arduino UNO


3) Select my serial port: Tools>Serial Port>COM 25. Serial Port selection is depending on what COM port is free during setup. 


4)Open sketch example, File>Examples>1.Basics>Blink









5) Click upload button to upload the code to
arduino. Wait until “Done Uploading” message status appear. 

6) This video show LED was blinking and i have succesfully install my arduino.

Friday, 24 February 2012

Week 6

Microcontrollers are low power devices "embedded" inside some other device so that they can control the features or actions of the device.A microcontroller also is often small and low cost.


After doing some research, i decided to use Arduino software as microcontroller for my circuit. I have my own reason why i choose this software and will give an explanation later. How i know about this sofware? I was introduce to this software when i have to do a mini project using this software in semester 5 for Medical Instrumentation subject.For this semester also i have  learned to built a programme of motor system with Arduino in Electromechanics of Drives and Actuators in Medical Applications subject. So that, it will give me advantages because i have used it before and i can refer to my lecturer if i have any problem with this microcontroller.                                                                                                              


Some information about Arduino :


Arduino Uno
What is Arduino?
- A physical piece of hardware
- A programming environment
- A community & philosophy
- Open Source Hardware Development Platform
- USB Programmable Microcontroller (MCU)


Description :
 - It's an open-source physical computing platform based on a simple microcontroller 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, MaxMSP.)
- The boards can be assembled by hand or purchased preassembled; the open-source IDE can be downloaded for free.


                                                                                    
                                            Atmega328 Information:

Microcontroller use?  
- Processor, Storage and RAM all in one tiny   package!
- Atmel Microcontroller (MCU), typically Atmega328                  







Why i choose Arduino ?
- Simplifies the process of working with microcontrollers
- Inexpensive
- Cross platform – runs on windows, mac and Linux
- Simple, clear programming environment
- Open source and extensible

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
Pros:
• 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,wearables, extra I/O pins
• Many shield modules
• Large number of open source derivative boards
Cons:
• C language constructs (semicolons, brackets, case sensitivity) are confusing



Friday, 17 February 2012

Week 5

     I have successfully completed hardware part. Now I can concentrate on the software part where i need to construct the circuit for display. The cycle ergometer will display on LCD the information about  revolution per minute (RPM), distance,speed and time . Anything device that have LCD will use the microcontroller. 

Block Diagram for Sofware Part

 For this week, i was concentarte to Sensor.After some research, i found that magnet and reed switch  will be attach to the bicycle and use as a sensor. What i have to find out is the suitable microcontroller that i can use to built a programmed for RPM, distance,speed and time to be display on LCD. 

Some information about Reed switch : 
        What is a reed switch ?
        The basic reed switch consists of two identical flattened ferromagnetic reeds, sealed in a dry inert-gas atmosphere within a glass capsule, thereby protecting the contact from contamination. The reeds are sealed in the capsule in cantilever form so that their free ends overlap and are separated by a small air gap.  A reed sensor is a device built using a reed switch with additional functionality like ability to withstand higher shock, easier mounting, additional intelligent circuitry, etc.
Reed switch

        How does a reed switch work ?
       When a magnetic force is generated parallel to the reed switch, the reeds become flux carriers in the magnetic circuit. The overlapping ends of the reeds become opposite magnetic poles, which attract each other. If the magnetic force between the poles is strong enough to overcome the restoring force of the reeds, the reeds will be drawn together.

Reed switch operation

What are the advantages in using reed switches ?
- Hermetically sealed in glass environment.
- Free from contamination. 
- Safe to use in harsh industrial and explosive environments. 
- Immune to electrostatic discharge (ESD) .
- Do not require any external ESD protection circuits. 
- The isolation resistance between the contacts is as high as 1015ohms. 
- Contact resistance is as low as 50 milli-ohms.
- Directly switch loads as low as a few micro-watts without needing external amplification circuits, to as high as 120W.
- When used in combination with magnets and coils, they can be used to form many different types of relays.
- Low Price. 


Saturday, 11 February 2012

week 4

     For week 4, I asked my advisor for her opinion about resistance level for pedalling .For resistance level, I have either to install gear in bicycle or brake system. If I choose brake system, bicycle will be cycled with permanently resistance.While if i choose gear system, bicycle pedalled with difference level of resistance . Convertible resistance level is relying on the strenght of  hand or leg.

                                  Low resistance = low strenght of hand or leg ,
                                  High resistance = Increased the strenght of hand or leg

     Then, I decide to install gear as resistance . The problem is, small bicycle that i have is not suitable to install gear.Luckily, my freind ,Elyana Shahrin have one more suitable bicycle that no longer being used and she want giving to me. I'm very grateful and plan to give her treat....=)

      I'm plan to cut the bicycle and make some modification. I send the bicyle to Seng Hock Metal shop at Jalan Gombak to cut the bicycle.Then i go to bicycle shop at Setapak to buy cycle part that i want to modified. As a result, u can see the picture below: 


Part of cycle that was modified