Friday, 28 September 2012

ETCHING NEW BOARD.(WEEK 7)

On the week 7,we have already buy a new UV board,so that we can continue where we had stopped last week.This time,we manage to make a perfect board without having any dificulties.The etching process take time of 1hour to complete because we had to refill the echant liquid.



Wednesday, 19 September 2012

ETCHING.(WEEK 6)

Thursday on Week 6,we go to etching our PCB UV board.First,we had to print out the PCB layout of the swimming pool alarm.Then,we scan the printout onto the UV board.We had done the task but make a mistake which is we had print on the wrong side of the board.So,to overcome this problem,we had to buy new board and start all over again.

Tuesday, 18 September 2012

About the IC-INSTRUMENTATION AMPLIFIERS(WEEK 6)

Last week,we bought two IC(LMC6064n) at Jalan Pasar.This IC is a quad op amplifier.The datasheet is given below.

This type of IC is very rare.This IC we need to order from Singapore because shop at Malaysia does not have this type of sensor.We bought two of these but we just use only one.The other one is for spare part.

Tuesday, 11 September 2012

More about components~(WEEK 5)


This is our components that we have bought from Jalan Pasar.


The most expensive component is our pressure sensor MPX2010DP.Cost around RM67.00 including courier.We need to order from Singapore because Malaysia doesnt have this type of sensor sold in shop.



Friday, 7 September 2012

Part and Component lists(WEEK 4)



  1. 1 PC board, code 762, available from the EPE PCB Service, size102mm × 77mm
  2. 1 IP65 sealed polycarbonateenclosure with clear lid, size 115mm × 90mm × 55mm (Jaycar HB-6246 or equivalent)
  3. 1 IP65 sealed ABS case, 64mm × 58mm × 35mm
  4. 1 sheet 18g of aluminium, size 26mm × 31mm
  5. 1 12V 400mA DC adaptor
  6. 1 piezo siren (Jaycar Cat. LA5308 or LA5256)
  7. 1 piezo siren as above (optional)
  8. 1 MPX2010DP Freescale Semiconductor pressuresensor (Jaycar ZD-1904 or equivalent) (Sensor1)
  9. 1 SPST waterproof momentary switch (Jaycar SP-0732 or equivalent) (S1)
  10. 2 SPST micro tactile switches (Jaycar SP-0600 or equivalent)(S2,S3)
  11. 1 BCD DIL rotary switch (0-F) (Jaycar SR-1220 or equivalent) (BCD1)
  12. 5 2-way PC-mount screw terminals with 5mm or 5.08mm spacing
  13. 1 2.5mm DC panel socket 
  14. 4 3-6.5mm diameter IP68 waterproof cable glands
  15. 1 2-way pin header, 2.54mm spacing
  16. 1 18-pin DIL IC socket
  17. 2 M3 × 20mm screws
  18. 6 M3 × 6mm screws
  19. 4 M3 nuts
  20. 3 PC stakes
  21. 1 150mm length of medium duty hookup wire
  22. 1 30mm length of 0.8mm tinned copper wire
  23. 1 length of 2-pair (4-wire) telephone sheathed cable or 4-core alarm cable (to suit)
  24. 2 100mm cable ties
  25. 1 150mm length of 3mm ID (5mm OD) vinyl tube
  26. 1 145mm length of 5mm ID (6mm OD) metal tubing
Semiconductors
  1. 1 LMC6064IN quad op amp (IC1)
  2. 1 PIC16F88-I/P preprogrammed microcontroller (IC2)
  3. 2 BC337 NPN transistors (Q1,Q2)
  4. 3 1N4004 1A diodes (D1-D3)
  5. 1 16V 1W Zener diode (ZD1)
  6. 1 5mm green LED (LED1)
  7. 2 5mm red LED (LED2,LED3)
    Capacitors
    1. 2 470mF 16V PC radial elect.
    2. 5 100mF 16V PC radial elect.
    3. 3 10mF 16V PC radial elect.
    4. 2 1mF NP radial elect.
    5. 1 100nF MKT polyester
    6. 2 470pF ceramic
      Resistors (0.25W 1% metal film)
      1. 2 470kW 2 22kW
      2. 1 220kW 3 2.2kW
      3. 2 39kW 6 1kW
      4. 2 27kW 2 10W
      5. 1 10kW horizontal trimpot (VR1)

      Wednesday, 5 September 2012

      Circuit Diagram Of Swimming Pool Alarm~(WEEK 4)

      In this circuit diagram,there are the pressure sensor, an instrumentation amplifier and a PIC microcontroller, plus associated switches, LEDs and other components.Sensor 1 has differential outputs at pins 2 and 4. With the same pressure at both ports, pins 2 and 4 are nominally at the same voltage; ie, 2.5V. If the pressure at port 1 increases compared to port 2, pin 2 rises and pin 4 falls. The change in voltage is quite small – around 1mV for a 1kPa pressure difference. However, the actual voltage change with typical wave movement is only around 200mV,so we need to amplify this signal using instrumentation amplifier IC1.Since we are concerned with wave movements (pressure variations) rather than the absolute pressure levels, the output from the sensor is AC-coupled via 1mF non-polarised capacitors to op amps IC1a and IC1b. The non-inverting inputs of IC1a and IC1b (pins 3 and 5 respectively) are biased via 470kW resistors to a +2.5V reference, derived using two 2.2kW resistors and a 100mF capacitor.IC1a and IC1b are set up as non inverting amplifiers with 39kW feedback resistors and a single 10W resistor between their inverting inputs. A 470pF capacitor across the 39kW resistors rolls off signals above about 8.7kHz, and this prevents possible oscillation. The gains of IC1a and IC1b are each 1 + 39kW/10W, or close enough to 3900.The outputs of IC1a and IC1b are summed in differential amplifier IC1c, which effectively adds the two outputs together. IC1c’s gain is 2 × 27kW/22kW, or 2.45 (for the two outputs), so the overall gain is 3900 × 2.45 or 9555.


      Rain Filtering:

      IC1c’s output is filtered using a 2.2kW resistor and a 10mF capacitor to remove high-frequency signals above 7.2Hz. This prevents alarm triggering due to the detection of rain falling on the pool. IC1c also shifts the DC level of the output signal. This is done by feeding it with an offset voltage from IC1d, viathe 27kW resistor from pin 14. IC1d obtains its reference voltage from a pulse width modulated (PWM) signal from PIC micro IC2. This signal swings from 0V to 5V at a frequency of 490Hz, and has a duty cycle of about
      50%. The PWM signal is filtered using a 220kW resistor and a 10mF capacitor, and is fed to pin 12 of IC1d. The PWM signal is adjusted automatically during calibration so that IC1c’s output is at 2.5V when there is no signal from Sensor 1.

      Microcontroller:

      The PIC16F88-I/P microcontroller (IC2) processes the signal from IC1c and drives the alarm and the Hold, Status and Alarm LEDs. IC2 also monitors inputs at RB1, RB2 and RB3 for the switches, the linking options at RA2, the RB4 to RB7 inputs for BCD1 and the voltage at the wiper of trimpot VR1. Output RA7 drives the flashing Alarm LED, while output RA6 drives transistors Q1 and Q2, which are the siren drivers. Trimpot VR1 is monitored by the AN4 input and its wiper voltage is converted to a digital value from 0 to 255 for its 0V to 5V range, to give a timeout period in minutes. This value is placed in a counter that is decremented every 1.18s until it reaches zero and the alarm goes off. Hold switch S1 connects to the RB3 input, which is normally held high (+5V) via an internal pull-up resistor. When S1 closes, IC2 responds by altering the mode from Hold to Monitor, or from Monitor to Hold. Output RA1 drives the Hold LED via a 1kW resistor. Output RA0 drives Status LED 2 via a 1kW resistor. LED2 lights during the quiescent set and Alarm set procedures. If LED2 is flashing, it indicates levels that are over the quiescent setting. Switches S2 (Quiescent Set) and S3 (Alarm Set) are monitored by the RB1and RB2 inputs. Pressing S2 or S3 starts
      the program in IC2. This monitors the AN3 input and calculates the voltage range encountered for a period of 10s. It does this by monitoring the AN3 input every 100ms and storing the level in memory. After sampling for 10s,it finds the minimum and maximum values and subtracts the minimum from the maximum to derive the span range. This value is then multiplied by 95% for the Alarm level, and 105% for the Quiescent level. The lower alarm level provides for a small amount of leeway in pool movement to sound the alarm. The higher quiescent setting of 105% is so that the quiescent level for the pool will normally be less than this. The resulting values are then used to check for quiescent or alarm levels at the AN3 input. Whether or not to return to Hold from monitoring is selected with the linking at input RA2. RA2 is pulled high with the link in LK2 position and low with the link in LK1. Rotary switch BCD1 selects the monitor return period. When BCD1 is in position 0, all the switches are open and the RB4 to RB7 inputs are pulled high via internal pull-up resistors. This setting is for a ‘no-return to monitoring’ from hold. Other settings of the BCD switch will pull at least one of the RB4-RB7 lines to ground via its common pin, and select a time period.


      PWM Signal:

      As already noted, the CCP1 output at IC2 pin 6 produces the PWM signal. It is initially preset so that the output of IC1c is nominally at +2.5V. However, because of manufacturing tolerances in IC1, the output could vary and so there is a setup (to set the output to 2.5V). Pressing switch S2 before power is applied to the circuit runs this procedure. The program within IC2 then adjusts the PWM percentage so that the reading at port AN3 is at +2.5V. This process takes about 60s. The new PWM value is then stored and used every time the pool alarm is powered up. IC2 operates at 500kHz using an internal oscillator, and is run from a 5V supply derived from regulator REG1.