; Moisture Probe
Learning Center
Plans & pricing Sign in
Sign Out
Your Federal Quarterly Tax Payments are due April 15th Get Help Now >>

Moisture Probe


  • pg 1
									SIFE Team Project                                               Electronic Toy – Moisture Probe

Moisture Probe
18 April 18, 2007, Mohammad Khazab

I followed your discussions about designing the electronic toy and I would like give my ideas. I think
using PIC microcontroller is a good option. A Moisture Probe requires small number of components so
we can go with small PIC controllers. Here are some options:

8-Pin, Flash-Based 8-Bit CMOS Microcontrollers:

The features of these devices include:

        Six I/O pins with individual direction control (GP0-GP6) which is enough for this application
        Operating speed:
              o DC - 20 MHz oscillator/clock input
              o DC - 200 ns instruction cycle
        Operating Current:
              o 8.5μA @ 32 kHz, 2.0V, typical
              o 100μA @ 1 MHz, 2.0V, typical
        Analog comparator module
        Analog-to-Digital Converter (PIC12F675)
        Interrupt capability
        Internal and external oscillator options
        Wide operating voltage range - 2.0V to 5.5V
        High current sink/source for direct LED drive
        Watchdog Timer (WDT) with independent oscillator for reliable operation
        Timer0: 8-bit timer/counter with 8-bit programmable prescaler
        Enhanced Timer1: 16-bit timer/counter with prescaler
        High Endurance FLASH/EEPROM Cell
              o 100,000 write FLASH endurance
              o 1,000,000 write EEPROM endurance
              o FLASH/Data EEPROM Retention: > 40 years
        etc. (refer to user manual 44190E.pdf for more information)1
        Memory: 1.75KB
        RAM: 64
        EEPROM: 128

 To see user manuals and the other options for choosing the microchip navigate to:

SIFE Team Project                                              Electronic Toy – Moisture Probe

       Cost:
           o    PIC12F629 $0.67 US
           o    PIC12F675 $0.73 US

PCB Layout
Considering the above features, I think that PIC12F675 is a good obtion to go with.

Therefore I have drawn the initial PCB layout:

Components List:
       S1: Switch

       C1: Capacitor

       D1: Diode

       Q1: BC337 NPN Transistor

       LED1: LED (red, yellow, orange, white, green, etc.)

       R1: 10 Ω Resistor

       R2,R3: 220Ω Resistors

Pin Configuration
There are 8 pins which 6 of them are input/output pins:

       Pin 1: VDD connects to +V (a diode has to be placed in between to check the direction to avoid
        damaging the chip)

       Pin 2: GP5 I/O pin – CLKIN (for external clock)

SIFE Team Project                                                  Electronic Toy – Moisture Probe

        Pin 3: GP4 I/O pin – CLKOUT (for external clock)

        Pin 4: GP3 I/O pin – MCLR (for programming)

        Pin 5: GP2 I/O pin

        Pin 6: GP1 I/O pin – ICSPCLK (Clock link for programming)

        Pin 7: GP0 I/O pin – ICSPDAT (Data link for programming)

        Pin 8: VSS connects to –V

The pins 4, 6 and 7 are required for programming if it’s required to program the chip without having to
take the chip off its socket. However, since the students are not doing any programming therefore we can
program the chips beforehand. Thus these pins can be used as I/O pins and more components can be
added to the circuit to make more interesting circuits. Having six I/O pins there are a lot of possibilities
we can play with considering our innovation and budget!

We need an indicator when the moisture is detected by the probe. Either LED or buzzer or even both
could be used for this purpose. Putting other components such as extra LEDs is optional, but could be
used to show the moisture level. Putting less components might make it cheaper to manufacture and
simpler to build but it might make it less interesting for the students. Based on budget we can play

I think we should also try to keep the size of the PCB small by using all the possible empty spaces on the
board and making it compact but nice and clear for the students to solder.

Components Trade-Off Analysis

B1 is a Buzzer similar to the one shown below. There is also a type of Piezo buzzer that doesn’t need to
have the transistor Q1 and the resister R3. Then one side of it connects to one of the chip’s pins (2, 3, 4, 5,
6, or 7) and other side connects to the –V point. However, if we want to choose the first option then we
need to consider the budget.

Size: 9.5(H) x 12 diameter
Current: 30mA
Operation Voltage: 3 - 14V
Operating Temp: - 20° to +65°C
Frequency: 2,300Hz
QTY Cost
1+       $2.35                                            Jaycar
10+      $2.00
25+      $1.80

SIFE Team Project                                               Electronic Toy – Moisture Probe

BC337 NPN Transistor
BC337 NPN TO-92 500mW 50V 800mA 100
QTY Cost
1+     $0.20
10+    $0.17
25+    $0.14

Red 10mm Flashing LED 30mA 2.2V
Voltage 3.5 min, 9- typical
Intensity red 120mcd
Pulse rate 2Hz.
1+       $0.94
25+      $0.53                                                                              Jaycar
100+ $0.44

Super-bright LED
At last a 5mm flashing LED that can be used in a car that does not need a dropping
resistor. Specifications:
Recommended voltage: 9- 12V DC
Max voltage: 13V DC
Brightness: 300mCd at 9V DC.
It’s suggested to connect the LED so that it does not operate when the engine is running
as the engine can produce up to 14.4 volts.
1+     $0.88
10+ $0.77
25+ $0.61

Moisture sensor (probe)
The research has to be done regarding what sensor is going to be used.

Other component
Depending on the other applications and electronic toys that we would like to design we should choose
other components. Such as InfraRed (receiver/transmitter) say for security alarm or etc.

SIFE Team Project                                                Electronic Toy – Moisture Probe

In order to program the chip there are two options available that I am familiar with: Corechart which is an
icon based assembly language and Sourceboost which is a C compiler, simulator and development
environment for programming micro-controllers. Corechart is easier for beginners but it is not free.
However the school has the license for it. You may also download the 30 day trial from
www.elabtronics.com. Sourceboost is free and you can download it and its plug-ins from
www.sourceboost.com. The good features of it are the simulator plug-ins and the debugger mode which
allows you to test your program before writing to the chip. I will put a document on the website regarding
“PIC Programming” produced by Andrew Sprok, which would explain about Sourceboost as well.

The SIFE team could train university students to design some electronic toys giving them some
instruction and information about microchips, programming, electronic components, the costs, etc. For
example, SIFE team can design the main board and leave the rest up to the students to choose the
component based on the electronic toy they would like to design considering the budget and quality of the

We can either have different boards for each product or only have one board that has got space for all the
components but only the required components would be included in the package depending on the type of
the electronic toy. Some of these components might be in common for all the products or most of them.
Therefore, the second option might be better. As mentioned, the chip has 6 I/O pins so few different
electronic toys could be designed. This would save the time and cost of having to make another board.
However, if an application needs more I/O pins then we might have to move to other options such as 18
pins microchips and therefore having to build another board.

If we manage to design every thing on one board then we can distribute few packages of different types of
toys to each class enclosing only the require components for each particular package. Then the students
would choose which electronic toy (version/mode) they would like to build and then start soldering it.
Therefore, while they learn constructing one electronic toy and seeing its function, they can see the result
of other students’ work. This way, we can reduce the cost but still being able to show different
applications of the electronic product to students. However, it’s better that the user manual include
information and instruction for building all the toys.


To top