Wednesday, December 11, 2013

Basics of connecting HDF27 relay using

HFD27/005-S is a relay that is used commonly in many embedded circuits. In the post we will see the basics of using the HFD27 relay using the Arduino uno board.

A relay is used to connect or disconnect a circuit based on a trigger signal.

The following figure shows the wiring diagram for the HFD27.

 photo HFD27_witing.png

The pins 1 and 16 are the pins where we need to give the trigger pulse.

The pins 4,6,8 is one set of terminals which can be used to connect/disconnect a circuit and smilarly 13,11,9 are another set of terminals. Thus we have two relays in the HFD27 but both are controlled by the same trigger signal.

Among the three pins 4,6,8 4 and 6 are normally closed that is 4 is be default connected to 6 and when the triggering signal or pulse is given to pin1 the connection between 4 and 6 is broken.

Connection between 4 and 8 is normally open and when a signal/pulse is given to the pin1 4 and 8 get connected to each other.

Which means the arm of the switch is connected between 4 and 6 by default and when a pulse is given to the relay the arm moved from 6 to 8, thus disconnecting 6 and connecting 4 to 8.

The same it true for the pins 13,11 and 9 respectively.

To test its using Arduino make the following connections

Connect pin1 of HFD27 to digital I/O Pin4 of Arduino.
Connect pin 4 to 5v pin on Arduino board.
Connect pin 6 to a 1K resistor
Connect the other end of the resistor to a the anode of an LED,LED1.
Connect pin 13 also the 5v pin on Arduino board
Connect pin 9 to a 1k Resistor
Connec the other end of the resistor to the anode of an LED,LED2.
Connect pin 16 and cathode of the LEDs to a common point and connect the common point to the ground pin on the Arduino board.

In the circuit we are going to use send the trigger pulse to pin 4 of Arduino which will send the signal to the relay hence make/break the connections.

From the connections that we made above the LED1 will be on by default and LED2 will be off. To test it just connect the Arduino board with out laoding any program and the LED1 should turn and LED2 should be off.

Now load the following program into the board.



Once the program is loaded and run, we should see the LED1 and LED2 turn on and turn off alternately every 4 seconds as we are changing the state of the triggering signal every 4 seconds.

Monday, April 1, 2013

Quiz on embedded systems

Quiz on embedded systems

Quiz based on embedded systems

Quiz based on chapter 1 of book : "Embedded Systems" byfrank Vahid
  1. Which of the following is not a charaterstic of an embedded system

  2. Real time
    Tightly constrained
    Independent
    Reactive and realtime

  3. Which of the design metrics is only one time expenditure for the embedded system

  4. NRE
    Unit cost
    Manufacturing cost
    Safety

  5. Which of the following is not present in a single purpose processor

  6. Data memory
    Program Memory
    Controller
    Datpath

  7. PLD stands for

  8. Progammable logic drive
    Progammale logic device
    Progammale logic disk
    Progammale logic dump

  9. According to mythical man month theory, the time taken to finish a project increases with increase

  10. True
    False
    Increases after team strength reaches a specific number
    Decreases after team strength reaches a specific number

  11. NRE is maximum for

  12. Full custom VLSI
    Semi Custom VLSI
    PLD
    All have the same NRE

  13. The metrics that can be used to measure performance of a system are

  14. Safety and correctness
    Cost and Profit
    Latency and Throughtput
    NRE and Time to market

  15. The processor technology with least time to market is

  16. General purpose processor
    ASIP
    Single purpose processor
    All have the same time to market

  17. Moore predicted that the transistor desnsity on an IC will

  18. Double every 18 to 24 months
    Thrible every 18 to 24 months
    Double every 18 to 24 weeks
    Double every 18 to 24 years

  19. The effect of NRE cost on unit cost will be reduced

  20. With increase in quantity
    With increase in quality
    It is independent of quantity
    Depends on Performance of the product.


Sunday, March 17, 2013

Answers to basic microprocessor quiz

Here are the answers to the questions in the post "Basic Microprocessor quiz"

1) IR in a microprocessor stands for
Ans) Instruction Register

2) PC is used in microprocessor for
Ans) Holding the address of next instruction to be executed

3) In von numan architecture
Ans) Program and data memory are same

4) Intel 4004 was
Ans) 4 bit microprocessor

5) 68000 series microprocessor are from
Ans) motorola

6) ALU in a microprocessor stands for
Ans) Arithematic Logic Unit

7)Bus in a microprocessor is used for
Ans) All of the above

8) Routines written to be executed on interrupt are generally called as
Ans) ISR

9) Registers in microprocessors are generally made of
Ans) Flip Flops

10) Which of the following might be present in microcontroller but not in microprocessor
Ans) Internal RAM


Saturday, March 2, 2013

Basic Microprocessor Quiz

Basic Microprocessors Quiz

Basic Microprocessors Quiz

  1. IR in a microprocessor stands for

  2. Instruction Register
    Important Register
    Instruction Register
    Internal Register

  3. PC is used in microprocessor for

  4. Holding the address of next instruction to be executed
    Holding the address of the previous instruction
    To keep count of the number of instructions executed
    To keep track of time delays.

  5. In von neumann architecture

  6. Program and data memory is common
    Program and data memory are different
    There is no data memory
    There is no program memory

  7. Intel 4004 was

  8. 4 bit microprocessor
    8 bit microprocessor
    12 bit microprocessor
    16 bit microprocessor

  9. 68000 series microprocessor are from

  10. Intel
    AMD
    Motorola
    Microchip

  11. ALU in a microprocessor stands for

  12. Arithematic Logic Unit
    All Logic Unit
    Array Logic Unit
    Alternate Logic Unit

  13. Bus in a microprocessor is used for

  14. Data Transfer
    Address Transfer
    Signal Transfer
    All of the above

  15. Routines written to be executed on interrupt are generally called as

  16. RIS
    SIR
    ISR
    MicroSR

  17. Registers in microprocessors are generally made of

  18. Flip Flops
    Latch
    RAM
    ROM

  19. Which of the following might be present in microcontroller but not in microprocessor

  20. Register
    ALU
    Internal RAM
    Accumulator

Answers to the above quiz are available at : "Answers to Basic Microprocessor quiz"

Monday, February 11, 2013

Stack animation

A stack can be defined as a data structure in which the data that enters first gets out last,i.e. first in last out(FILO) or the the data that enters last gets out first, i.e. last in first out.(LIFO)

A stack is used in microprocessors generally to hold the return memory addresses while function calls. For example, if funcA calls funcB at the 10th line of its execution, and funcB calls funcC at its 20th line of execution,then after executing funcC, control should come back to the 21st line of funcB and after executng funcB control should come back to 11th line of funcA.

In the above case we can see that the first function call was made buy funcA, but its return address is being accessed at the last, which is a clear case of first in last out which indicates towards a stack.

The following is an animation of stack. The operation of putting data into a stack is called as the PUSH and the operation of removing hte data from the stack is called as the pop operation.

Follow by Email