Humidity sensor and method for making

Abstract: A humidity sensor includes a pair of opposed electrodes disposed on an insulating substrate and defining a gap therebetween and a humidity sensitive thin film covering the gap. This thin film is formed by coating a polymer of specific structure having an ethylenically unsaturated reactive group and exposing the coating to ultraviolet radiation for crosslinking. The sensor is fully water resistant and produces accurate outputs over a wide humidity range and thus can detect and determine moisture in the surrounding atmosphere.

Description: TECHNICAL FIELD This invention relates to a humidity sensor for detecting and determining moisture in the surrounding atmosphere and a method for preparing the same. BACKGROUND Conventional humidity sensors are designed to detect humidity through changes of electrical properties, typically electric resistance. Known sensors use electrolytes such as lithium chloride, metal oxides, and organic polymers as the humidity sensitive material. However, the humidity sensors using electrolytes such as lithium chloride can measure only a narrow range of humidity and are less resistant to water in that their performance can be altered by dew condensation and wetting. The humidity sensors using metal oxides are resistant to water, but low sensitive. Because of the lack of long-term stability when used alone, they require a heat cleaning circuit which would add to the operating cost. The sensor structure is complex. Among the humidity sensitive materials, organic polymers, especially polymeric electrolytes having a quaternary ammonium salt group have been widely used in commercial and industrial applications and so appreciated. For example, Japanese Patent Publication (JP-B) No. 54176/1986 discloses a humidity sensitive material comprising aggregates of latex particles formed of a copolymer between a hydrophobic monomer and an ionic or nonionic hydrophilic monomer and having a hydrophilic surface layer. There are exemplified some cationic compounds having primary to quaternary ammonium salts. JP-A-55-10502 discloses a humidity sensitive material in the form of a polymer which is obtained by polymerizing 2-hydroxy-3-methacryloxypropyltrimethylammonium chloride to a degree of polymerization of 1,000 to 10,000. JP-A-60-113 140 discloses a humidity sensitive thin film of a polymer having the structural formula: -(N + (R 1 ) (R 2 )X - -A-N + (R 3 ) (R 4 )X - -B) n - wherein R 1 to R 4 are alkyl, X - is a halide ion, A and B are -(CH 2 ) m - wherein m ≥ 2. The polymer may be blended with another polymer such as polyvinyl pyrrolidone for the purposes of improving adhesion to a substrate and water resistance. The blend is also effective in forming a humidity sensitive thin film. Humidity sensors using the polymeric electrolytes exemplified above as the humidity sensitive material, however, are still low in water resistance in that the polymeric electrolytes can be partially leached in a high humidity region, especially in a dew condensing atmosphere. They also suffer from a hysteresis phenomenon that they produce different outputs at the same humidity depending on whether the humidity is increasing or decreasing. In a low humidity region having a relative humidity (RH) of less than 10%, they have so high resistance values that practical humidity measurement is impossible. SUMMARY OF THE INVENTION A primary object of the present invention is to provide a humidity sensor device having a humidity sensitive thin film which is resistant to water, maintains effective, stable performance over a long time even in a dew condensing atmosphere, and produces accurate outputs in a stable manner over a wide humidity region, even in a low humidity region. The present invention pertains to a humidity sensor comprising a pair of opposed electrodes disposed on an insulating substrate and defining a gap therebetween. A humidity sensitive thin film covers the gap. The humidity sensor may further include a water-repellent coating on said humidity sensitive thin film if desired. According to the feature of the invention, the humidity sensitive thin film contains, preferably consists essentially of, a crosslinked product of a polymer of the following general formula (1): wherein A and B each are a divalent group; Y 1 , Y 2 , Y 3 , Y 4 , Y 5 , and Y 6 each are a monovalent group, at least one of Y 1 to Y 6 is a group terminated with an ethylenically unsaturated reactive group; at least two of Y 1 , Y 2 , Y 3 , Y 4 , Y 5 , A, and portions thereof adjoining the nitrogen (N) atom or at least two of Y 4 , Y 5 , Y 6 , B, and portions thereof adjoining the nitrogen (N) atom, taken together, may form a ring with the nitrogen atom; X - is a halide ion; and letter n is a number of 2 to 5,000. Preferably the polymer has the following formula (2) or (3). A and B each are a divalent group; each of R 1 , R 2 , R 3 , and R 4 is an alkyl or alkenyl group, R 1 and R 2 , R 1 and A or a portion of A, R 2 and A or a portion of A, R 3 and R 4 , R 3 and A or a portion of A, R 4 and A or a portion of A, R 1 and R 3 , R 1 and R 4 , R 2 and R 3 , or R 2 and R 4 , taken together, may form a ring with the nitrogen (N) atom; R 5 and R 6 each are an alkyl or alkenyl group; L is a divalent group; R is a hydrogen atom or alkyl group; X - is a halide ion; and letter n is a number of 2 to 5,000. In more preferred embodiments, the halide ion represented by X - is a chloride ion, the divalent group represented by A is an alkylene, alkenylene or arylene group or a mixture thereof, and the divalent group represented by B is an alkylene, alkenylene or arylene group in which at least one of an oxy group (-O-) and a carbonyl group (-CO-) may intervene or a mixture thereof. In general, the humidity sensor is prepared by coating an aqueous solution of the polymer, and exposing the polymer to ultraviolet radiation for crosslinking, thereby forming a humidity sensitive thin film. More preferably, the polymer is obtained by reacting a diamine compound with a dihalogen compound to form an intermediate polymer and introducing an ethylenically unsaturated reactive group into the intermediate polymer at each end; and the polymer is exposed to radiation, obtaining the crosslinked product. ADVANTAGES According to the present invention, a humidity sensitive thin film of a conductive polymer is provided so as to cover a pair of opposed electrodes on an insulating substrate. The humidity sensitive thin film contains a crosslinked product of a polymer of formula (1), preferably formula (2) or (3). The humidity sensitive thin film is formed by coating an aqueous solution of the polymer and crosslinking the polymer, preferably by exposure to ultraviolet radiation. As shown by formulae (1) to (3), the polymer is structurally characterized by containing a quaternary ammonium salt group (including a cyclized one) in its backbone and having an ethylenically unsaturated reactive group at one or both, preferably both of the terminal ends of the polymer. In the humidity sensitive thin film containing the specific polymer, the quaternary ammonium salt group moiety of the polymer molecule contributes to electric conductivity and the counter ion thereto is dissociated with moisture in the surrounding atmosphere to develop ionic conduction. Humidity is detected by utilizing the phenomenon that the degree of dissociation varies as the moisture content in the atmosphere increases or decreases. Since the polymer contains a quaternary ammonium salt group in its backbone, the humidity sensor produces accurate outputs without hysteresis. In the preferred embodiment wherein the counter ion to the quaternary ammonium salt group in the polymer is a chloride ion, a low humidity region of RH 0% to 10% can be measured, substantially spreading the measurable humidity region. The humidity sensor device of the invention can measure humidity over an entire range from RH 0% to RH 100%, which was unmeasurable with conventional sensors. Since the polymer has an ethylenically unsaturated reactive group as a terminal group, it is crosslinkable upon exposure to radiation, typically ultraviolet radiation. Crosslinking ensures water resistance for the humidity sensitive thin film at no sacrifice of humidity sensitivity. There is thus obtained a humidity sensor device having improved water resistance as well as humidity sensitivity. JP-A-60-113 140 cited above discloses a polymer containing a quaternary ammonium group in its backbone, which is similar to the polymer according to the present invention. Unlike the present invention, a structure having an ethylenically unsaturated reactive group introduced at the polymer end is referred to nowhere. In this respect, the present invention is clearly different from the patent publication. Although the combined use of another polymer such as polyvinyl pyrrolidone for the purpose of improving water resistance is recommended in the patent publication, the water resistance is apparently inferior to that of the sensor according to the present invention as will be demonstrated later in Examples. BRIEF DESCRIPTION OF THE DRAWINGS The above and other features and advantages of the present invention will be better understood by reading the following description taken in conjunction with the accompanying drawings. FIG. 1 is a plan view of a humidity sensor according to one embodiment of the invention. FIG. 2 is a graph showing the output voltage versus relative humidity of the humidity sensor of Example 1. FIG. 3 is a graph showing the water resistance of the humidity sensor of Example 1. FIGS. 4 and 5 are graphs showing the output and water resistance of the sensor of Example 2, respectively. FIGS. 6 and 7 are graphs showing the output and water resistance of the sensor of Example 3, respectively. FIGS. 8 and 9 are graphs showing the output and water resistance of the sensor of Example 4, respectively. FIGS. 10 and 11 are graphs showing the output and water resistance of the sensor of Example 5, respectively. FIGS. 12 and 13 are graphs showing the output and water resistance of the sensor of Example 6, respectively. FIGS. 14 and 15 are graphs showing the output and water resistance of the sensor of Example 7, respectively. FIGS. 16 and 17 are graphs showing the output and water resistance of the sensor of Example 8, respectively. FIGS. 18 and 19 are graphs showing the output and water resistance of the sensor of Example 9, respectively. FIGS. 20 and 21 are graphs showing the output and water resistance of the sensor of Example 10, respectively. FIGS. 22 and 23 are graphs showing the output and water resistance of the sensor of Example 12, respectively. FIGS. 24-32 are graphs showing the water resistance of the humidity sensors of Examples 13-21, respectively. FIGS. 33 and 34 are graphs showing the output and water resistance of the sensor of Example 22, respectively. FIGS. 35 and 36 are graphs showing the output and water resistance of the sensor of Example 23, respectively. FIGS. 37 and 38 are graphs showing the output and water resistance of the sensor of Example 24, respectively. FIGS. 39 and 40 are graphs showing the output and water resistance of the sensor of Example 25, respectively. FIGS. 41 and 42 are graphs showing the output and water resistance of the sensor of Example 26, respectively. FIGS. 43 and 44 are graphs showing the output and water resistance of the sensor of Example 27, respectively. FIGS. 45 and 46 are graphs showing the output and water resistance of the sensor of Example 28, respectively. FIGS. 47 and 48 are graphs showing the output and water resistance of the sensor of Example 29, respectively. FIG. 49 is a graph showing the water resistance of the humidity sensor of Example 30. FIGS. 50 and 51 are graphs showing the output and water resistance of the sensor of Example 31, respectively. FIGS. 52 and 53 are graphs showing the output and water resistance of the sensor of Example 32, respectively. FIGS. 54 and 55 are graphs showing the output and water resistance of the sensor of Example 33, respectively. FIGS. 56 and 57 are graphs showing the output and water resistance of the sensor of Example 34, respectively. FIG. 58 is a graph showing the water resistance of the humidity sensor of Example 35. FIGS. 59 and 60 are graphs showing the output and water resistance of the sensor of Example 36, respectively. FIG. 61 is a graph showing the water resistance of the humidity sensor of Example 37. FIGS. 62 and 63 are graphs showing the output and water resistance of the sensor of Example 38, respectively. FIGS. 64 and 65 are graphs showing the output and water resistance of the sensor of Example 39, respectively. FIGS. 66-106 are graphs showing the water resistance of the humidity sensors of Examples 40-80, respectively. FIG. 107 is a graph showing the output of the humidity sensor of Comparative Example 1. FIGS. 108 and 109 are graphs showing the output and water resistance of the sensor of Comparative Example 2, respectively. FIGS. 110 and 111 are graphs showing the output and water resistance of the sensor of Comparative Example 3, respectively. BEST MODE FOR CARRYING OUT THE INVENTION According to the present invention, a humidity sensor is defined as comprising a pair of opposed electrodes disposed on an insulating substrate and defining a gap therebetween and a humidity sensitive thin film disposed on the gap. The humidity sensitive thin film contains a crosslinked product of a polymer of the following general formula (1). In formula (1), A, B, X - and n are as defined above and will be described later in conjunction with formulae (2) and (3). Each of Y 1 to Y 6 is a monovalent group. At least one of Y 1 to Y 6 is a group terminated with an ethylenically unsaturated reactive group. Exemplary groups are acryloyloxy, methacryloyloxy, acryloylimino, methacryloylimino, vinyl, allyl, diallylmethyl, allyloxy, diacryloylimino, and dimethacryloylimino groups. The other monovalent groups represented by Y 1 to Y 6 include alkyl groups, alkenyl groups and halogen atoms. Examples of the alkyl and alkenyl groups are the same as R 1 and analogs in formulae (2) and (3), which will be described later. Examples of the halogen atom include chlorine, bromine and iodine. Any two or more of Y 1 to Y 5 , A, and portions thereof adjoining the nitrogen (N) atom, taken together, may form a ring with the nitrogen atom. Alternatively, any two or more of Y 4 to Y 6 , B, and portions thereof adjoining the nitrogen (N) atom, taken together, may form a ring with the nitrogen atom. The ring thus formed is the same as the ring formed by R 1 and analogs in formulae (2) and (3), which will be described later. The polymer of formula (1) should have at least one, preferably about two ethylenically unsaturated reactive groups. No upper limit is imposed on the number of such reactive groups although it is preferred that the polymer contains double bonds in an amount of 1x10 -3 to 2 meq/g, especially 2x10 -3 to 1 meq/g calculated as a double bond equivalent per polymer weight. The monovalent groups represented by Y 2 to Y 5 may contain a linkage between recurring units in the molecular structure of formula (1) while the recurring units in formula (1) may be identical or different. Preferably the polymer of formula (1) contains quaternary ammonium salt groups in an amount of 1.2 to 9.5 meq/g, especially 1.5 to 9.5 meq/g calculated as a cation equivalent per polymer weight. Preferred among the polymers of formula (1) are polymers of formulae (2) and (3). In formulae (2) and (3) as well as in formula (1), each of A and B is a divalent group. The divalent group represented by A is preferably an alkylene, alkenylene or arylene group or a mixture thereof. These groups may have substituents, for example, hydroxyl groups, alkyl groups such as methyl, and carbamoyl groups. The alkylene groups preferably have 1 to 20 carbon atoms in total and if substituted, they preferably have 1 to 5 hydroxyl groups. The alkenylene groups preferably have 2 to 10 carbon atoms in total. The arylene groups preferably have 6 to 20 carbon atoms in total. When the divalent group represented by A is a mixture of these groups, the mixture preferably has 3 to 20 carbon atoms in total. Illustrative, preferred examples of A include -(CH 2 ) m - wherein m is an integer of 1 to 20, -CH 2 CH=CH-CH 2 -, -CH 2 -CH(OH)-CH 2 -CH(CH 3 )-CH 2 -CH 2 -, -C 6 H 4 -C 6 H 4 -, and -C 6 H 4 -CH(OH)-C 6 H 4 -. The divalent group represented by B is preferably an alkylene, alkenylene or arylene group in which an oxy group (-O-) and/or a carbonyl group (-CO-) may intervene or a mixture thereof. More preferably, the divalent group represented by B is an alkylene group, an alkylene group having an intervening oxy (-O-) and/or carbonyl (-CO-) group, an alkenylene group, an arylene group, or a mixture thereof. These groups may have substituents, for example, hydroxyl groups and alkenyl groups such as vinyl. The alkylene groups preferably have 1 to 20 carbon atoms in total and if substituted, they preferably have 1 to 5 hydroxyl groups. If -O- or -CO- intervenes in the alkylene group, the number of the intervening groups is preferably 1 to 5. The alkenylene groups preferably have 2 to 10 carbon atoms in total. The arylene groups preferably have 6 to 20 carbon atoms in total. When the divalent group represented by B is a mixture of these groups, the mixture preferably has 3 to 20 carbon atoms in total. Illustrative, preferred examples of B include -(CH 2 ) m - wherein m is an integer of 1 to 20, -(CH 2 ) 2 -CH(OH)-CH 2 -, -CH 2 -CH(OH)-CH 2 -, -CH 2 -CH=CH-CH 2 -, -CH 2 -CH(CH=CH 2 )-, -(CH 2 -CH 2 -O) 2 -(CH 2 )-, -CH 2 -(CO)-CH 2 -, and -CH 2 -C 6 H 4 -CH 2 -. Each of R 1 , R 2 , R 3 , and R 4 is an alkyl or alkenyl group. The alkyl groups represented by R 1 to R 4 preferably have 1 to 10 carbon atoms. They may be substituted ones although unsubstituted groups are preferred. Exemplary alkyl groups are methyl, ethyl, propyl and butyl groups. The alkenyl groups represented by R 1 to R 4 preferably have 1 to 10 carbon atoms. They may be substituted ones although unsubstituted groups are preferred. Exemplary alkenyl groups are vinyl, allyl, propenyl and butenyl groups. R 1 and R 2 , R 1 and A or a portion of A, R 2 and A or a portion of A, R 3 and R 4 , R 3 and A or a portion of A, R 4 and A or a portion of A, R 1 and R 3 , R 1 and R 4 , R 2 and R 3 , or R 2 and R 4 , taken together, may form a ring with the nitrogen (N) atom. The ring is preferably a five or six-membered, especially six-membered nitrogenous heterocyclic ring. The ring may also be a bridging ring. Preferred examples of the nitrogenous heterocyclic ring include pyridine, 1,4-diazabicyclo[2.2.2]octane, piperidine, piperazine, and pyrazine rings which may have carbamoyl or other substituents if desired. Each of R 5 and R 6 in formula (2) is an alkyl or alkenyl group. Preferred is an alkyl group, especially having 1 to 10 carbon atoms. It may have a substituent although unsubstituted alkyl groups are preferred. For example, methyl and ethyl group are most preferred for R 5 and R 6 . Examples of the alkenyl group represented by R 5 and R 6 are the same as described for R 1 to R 4 . In formulae (2) and (3), L is a divalent group. Preferred examples of L in formula (2) include -COO(CH 2 ) 2 -, -CONH(CH 2 ) 3 -, and -(CH 2 ) m - wherein m is an integer of 1 to 20. Preferred examples of L in formula (3) include -OCH 2 CH 2 -, -(CH 2 ) m - wherein m is an integer of 1 to 20, -COO(CH 2 ) 2 -, -COOCH 2 CH(OH)CH 2 -, and -CH 2 -C 6 H 4 - (para- or meta-). Alternatively, two or three of R 5 , R 6 and L, taken together, may form a pyridine or another ring with the nitrogen (N) atom. In formulae (2) and (3), R is a hydrogen atom or alkyl group, with the hydrogen atom and methyl being preferred. In formulae (2) and (3), X - is a halide ion, for example, chloride, bromide and iodide ions. The chloride and bromide ions are preferred, with the chloride ion being most preferred. The ions represented by X - are often identical although they may be different. Letter n is a number of 2 to 5,000. The polymers of formulae (1) to (3) generally have a number average molecular weight Mn of about 1,000 to about 1,000,000. The preferred polymers of formulae (2) and (3) are prepared as follows. The polymer of formula (2) is synthesized according to the following reaction scheme I. First, a diamine compound is reacted with a dihalogen compound to form an intermediate polymer I having a quaternary ammonium salt group and terminated with a halogen atom. In this regard, the reactants are reacted under conditions that the molar ratio of dihalogen compound to diamine compound is 1.1 to 2.0. To assure that the intermediate polymer I is terminated with a halogen atom, the dihalogen compounds may be added in two divided portions wherein it is first added in an amount of 1 to 1.3 mol per mole of the diamine compound and the remainder is subsequently added. Reaction is effected in a non-aqueous solvent such as methanol, isopropanol, methoxyethanol and 2-ethoxyethanol at a reflux temperature or a temperature of about 100°C for about 5 to 100 hours. Next, intermediate polymer I is reacted with a compound A having an ethylenically unsaturated reactive group to introduce an ethylenically unsaturated reactive group at each end of intermediate polymer I, obtaining a polymer of formula (2). This reaction may be carried out subsequent to the first reaction. That is, the compound A having an ethylenically unsaturated reactive group is added to the reaction solution in an approximately equimolar amount to the dihalogen compound. Reaction is effected at a temperature of about 15 to 100°C in the presence of a polymerization inhibitor (e.g., m-dinitrobenzene) for about 10 to 150 hours. If this reaction is effected under conditions that at least some of the ethylenically unsaturated reactive groups being introduced will undergo polymerization, then the resulting polymer is more resistant to water when used as a humidity sensitive thin film. To this end, reaction is preferably effected at 70°C or higher, especially 70 to 100°C. Thereafter, the reaction solution was added dropwise to a suitable solvent such as acetone and ethyl acetate whereupon the reaction product will precipitate. The precipitate is collected by filtration and purified, recovering the end product. The polymer of formula (3) is synthesized according to the following reaction scheme II. First, a diamine compound is reacted with a dihalogen compound to form an intermediate polymer II having a quaternary ammonium salt group and terminated with an amino group. In this regard, the reactants are reacted under conditions that the molar ratio of diamine compound to dihalogen compound is 1.1 to 2.0. The remaining conditions are the same as in the reaction to form intermediate polymer I. The conditions to assure that the intermediate polymer II is terminated with an amino group are analogous to those for intermediate polymer I. Next, intermediate polymer II is reacted with a compound B having an ethylenically unsaturated reactive group to introduce an ethylenically unsaturated reactive group at each end of intermediate polymer II, obtaining a polymer of formula (3). This reaction may be carried out in the same manner as in the polymer of formula (2). This is also true for the reaction conditions under which at least some of the ethylenically unsaturated reactive groups being introduced will undergo polymerization. As mentioned above, the polymers of formulae (2) and (3) are prepared through reaction between a diamine and a dihalide. Any desired ones of diamines and dihalides may be used as long as they can react in accordance with the above-illustrated schemes. It is understood that these intermediate polymers and final polymers are generally obtained as a mixture of oligomers having a degree of polymerization (n) of about 2 to 20 and polymers having a degree of polymerization (n) in excess of 20. Preferred examples of the diamine compound used herein are given below. Preferred examples of the dihalogen compound used herein are given below. B-1 X-(CH 2 ) 2 -X B-4 X-CH 2 -CH=CH-CH 2 -X B-5 X-(CH 2 ) 4 -O-(CH 2 ) 4 -X B-6 X-CH 2 -CH 2 -O-CH 2 CH 2 -O-CH 2 -CH 2 -X B-10 X-(CH 2 ) 3 -X B-11 X-(CH 2 ) 4 -X B-12 X-(CH 2 ) 5 -X B-13 X-(CH 2 ) 6 -X B-14 X-(CH 2 ) 9 -X B-15 X-(CH 2 ) 10 -X B-16 X-(CH 2 ) 12 -X B-17 X-(CH 2 ) 16 -X In these examples, X is as defined previously, with chlorine and bromine atoms being preferred. Examples of the intermediate polymers I and II to the polymers of formulae (2) and (3) are shown below as polymers resulting from combinations of the diamine and dihalogen compounds illustrated just above. Note that numerical values in the parentheses represent a molar ratio. (1) Polymer resulting from a combination of A-16/B-10 (50/50) (2) Polymer resulting from a combination of A-8/B-12/B10 (50/48/2) (3) Polymer resulting from a combination of A-8/B-13/B-10 (50/48/2) (4) Polymer resulting from a combination of A-8/B-15/B-10 (50/48/2) (5) Polymer resulting from a combination of A-16/B-2 (50/50) (6) Polymer resulting from a combination of A-7/B-10 (50/50) (7) Polymer resulting from a combination of A-2/B-10 (50/50) (8) Polymer resulting from a combination of A-9/B-10 (50/50) (9) Polymer resulting from a combination of A-16/B-9 (50/50) (10) Polymer resulting from a combination of A-3/A-8/B-10 (2/48/50) (11) Polymer resulting from a combination of A-14/A-16/B-17 (49/1/50) (12) Polymer resulting from a combination of A-11/B-16 (50/50) (13) Polymer resulting from a combination of A-6/B-4/B-15 (50/47/3) (14) Polymer resulting from a combination of A-11/B-6 (50/50) (15) Polymer resulting from a combination of A-13/B-3 (50/50) (16) Polymer resulting from a combination of A-10/B-15 (50/50) (17) Polymer resulting from a combination of A-15/B-16 (50/50) (18) Polymer resulting from a combination of A-4/B-10 (50/50) (19) Polymer resulting from a combination of A-10/B-12/B-10 (50/48/2) (20) Polymer resulting from a combination of A-8/B-2 (50/50) (21) Polymer resulting from a combination of A-7/A-16/B-10 (15/35/50) (22) Polymer resulting from a combination of A-8/A-16/B-10 (15/35/50) (23) Polymer resulting from a combination of A-9/A-16/B-10 (15/35/50) (24) Polymer resulting from a combination of A-10/A-16/B-10 (15/35/50) (25) Polymer resulting from a combination of A-8/B-13 (50/50) (26) Polymer resulting from a combination of A-8/A-10/B-13 (35/15/50) (27) Polymer resulting from a combination of A-8/B-13/B-10 (50/40/10) (28) Polymer resulting from a combination of A-8/B-13/B-2 (50/40/10) (29) Polymer resulting from a combination of A-9/B-13 (50/50) (30) Polymer resulting from a combination of A-8/A-9/B-13 (25/25/50) (31) Polymer resulting from a combination of A-9/A-10/B-13 (25/25/50) The compounds A and B used in introducing an ethylenically unsaturated reactive group into intermediate polymers I and II at both ends are not critical as long as they have an ethylenically unsaturated reactive group such as an acryloyloxy, methacryloyloxy, acryloylimino, methacryloylimino, vinyl, allyl, diallylmethyl, allyloxy, diacryloylimino, and dimethacryloylimino group. Where intermediate polymers I and II as produced already have an ethylenically unsaturated reactive group as in the case of, for example, polymers (10), (11) and (13), they may be used as the (final) polymer in the practice of the invention without further reaction. Preferred examples of compound A used in combination with intermediate polymer I are given below as E-1 to E-7. E-1 CH 2 =CHCO 2 C 2 H 4 NMe 2 E-2 CH 2 =CHCONHC 3 H 6 NMe 2 E-5 CH 2 =CH-CH 2 NMe 2 E-6 CH 2 =CH-CH 2 NEt 2 E-7 (CH 2 =CH-CH 2 ) 2 N-Me Preferred examples of compound B used in combination with intermediate polymer II are given below as F-1 to F-6. F-1 CH 2 =CHOCH 2 CH 2 X F-4 CH 2 =CHCH 2 X In the formulae of E-1 to E-7 and F-1 to F-6, Me is methyl, Et is ethyl, and X is halogen as defined above. In the practice of the invention, the polymers of formula (1), preferably formulae (2) and (3) are generally used alone although a mixture of two or more polymers may be used. The humidity sensitive thin film used herein contains a crosslinked product of a polymer of formula (1), preferably formula (2) or (3) as previously described. The thin film is preferably formed by the following procedure. First a coating solution containing a polymer of formula (1), preferably formula (2) or (3) is prepared. The preferred coating solution is an aqueous solution containing 1 to 10% by weight of the polymer. At this point, a polymerization initiator, for example, 0.03 to 0.7% by weight of a watersoluble benzophenone is preferably added to the solution so that the resulting coating is ready for crosslinking by subsequent exposure to radiation, typically ultraviolet radiation. The coating solution is applied to an insulating substrate having electrodes formed thereon to thereby form a humidity sensitive thin film. For the coating purpose, well-known techniques such as dipping, brush coating, gravure coating, screen printing, and spin coating techniques are useful. Any desired one of these coating techniques may be chosen depending on the overall procedure and the type and application of a final product. After the coating is formed in this way, it is dried at a temperature of about 15 to 100°C for about 3 to 15 minutes. Thereafter the coating or polymer is crosslinked, preferably by exposure to radiation, especially ultraviolet radiation. Crosslinking by exposure to ultraviolet radiation may be carried out by any well-known technique. Often ultraviolet radiation having an intensity of at least about 50 mW/cm 2 is irradiated in a dose of about 200 to 2,500 mJ/cm 2 . Conventional light sources such as mercury lamps may be used as the ultraviolet source. The humidity sensitive thin film as crosslinked preferably has a thickness of about 0.5 to 10 µm, especially about 0.5 to 7 µm. Outside this range, a thicker film would be slow in response of its electric resistance to humidity whereas a thinner film would produce lower outputs in the low humidity region and be less resistant to water. In the practice of the invention, a water-repellent coating may be formed on the humidity sensitive thin film in order to prevent any influence of water droplets adhering to the sensor for thereby insuring quick accurate humidity measurement. The water-repellent coating preferably has a contact angle with water of at least 90°, especially 90° to 130° and a sufficient thickness to allow for moisture penetration, typically up to 5 µm, especially 0.1 to 2 µm. The material of which the water-repellent coating is constructed includes hydrophobic polymers, for example, fluorinated polymers such as polytetrafluoroethylene, olefinic polymers such as polyethylene and polypropylene, and silicone polymers. The water-repellent coating may be formed by any desired technique, typically by dissolving the material in a suitable solvent such as saturated carbon fluoride and coating the solution. As long as the humidity sensor device of the invention includes the above-mentioned humidity sensitive thin film on an insulating substrate having electrodes formed thereon, the remaining construction is not critical. Referring to FIG. 1, there is illustrated in plan view one exemplary arrangement of the humidity sensor device. The humidity sensor 1 includes a pair of comb-shaped electrodes 4 on an insulating substrate 2. The pair of comb-shaped electrodes 4 are disposed on the substrate 2 and interdigitated with each other to define a gap 5 of a certain distance therebetween. The gap typically has a distance of about 100 to 500 µm. A humidity sensitive thin film 3 is formed over the insulating substrate 2 and comb-shaped electrodes 4. The comb-shaped electrodes 4 are provided at one end with electrode tabs 6 to which leads 7 are connected with solder welds 8. A resist film 9 is formed for preventing diffusion of the electrode material. In detecting humidity in the surrounding atmosphere, voltage, preferably AC voltage is applied across the electrodes 4. Since the humidity sensitive thin film 3 has changed its electrical resistance in accordance with the humidity, the output voltage changes therewith, in terms of which the humidity is detectable. The applied voltage is typically up to about 12 volts. The insulating substrate 2 used herein may be formed of any desired material which is electrically insulating and well receptive to the humidity sensitive thin film 3. Useful substrates are glass, plastics, ceramics and metals coated with insulating material. The electrodes 4 may be made of any conventional electrode material. For example, they are formed by screen printing low resistance paste containing Au or RuO 2 and optionally glass frit, followed by high temperature firing. The electrode tabs 6 may be made of any conventional material which is compatible with the solder 8. For example, Ag-Pd alloy is printed in a conventional manner and baked at high temperatures to form the electrode tabs 6. Where gold is used as the electrodes 4, it is preferred that the resist film 9 of resist or glass is further provided in order to prevent diffusion of Au during soldering. No limits are imposed on the thickness and configuration of the resist film 9 as long as it is effective for preventing diffusion of Au during soldering. The humidity sensor of the present invention is not limited to the illustrated embodiment. Any desired shape or arrangement may be employed. EXAMPLE Examples of the present invention are given below by way of illustration and not by way of limitation. Example 1 According to reaction scheme I, 8.6 g (0.05 mol) of N,N,N',N'-tetramethyl-1,6-diaminohexane and 6.8 g (0.06 mol) of 1,3-dichloropropane were dissolved in 7.5 g of methanol and stirred for 25 hours at the reflux temperature, effecting quaternization reaction to form an intermediate polymer as shown in reaction formula (1) below. Then 10.2 g (0.06 mol) of N-(3-dimethylaminopropyl)methacrylamide and 0.2 g of m-dinitrobenzene as a polymerization inhibitor were added to the reaction solution. The solution was stirred at 35°C for 100 hours, introducing a reactive group into the intermediate polymer at its end as shown in reaction formula (2) below. The reaction solution was added dropwise to a large volume of acetone whereupon the polymer precipitated. The precipitate was collected by filtration and then dried in vacuum. After precipitation and purification of the polymer in this way, an aqueous solution containing 5% by weight of the polymer was prepared. To the solution 0.2% by weight of KAYACURE ABQ (commercially available from Nippon Kayaku K.K.) was added as a polymerization initiator to complete a coating solution. Note that the polymer had Mn of about 110,000 prior to crosslinking. A humidity sensor 1 as shown in FIG. 1 was fabricated. A porous ceramic substrate of alumina was used as the insulating substrate 2. Comb-shaped electrodes were formed on the substrate by screen printing paste containing RuO 2 and glass frit and firing at high temperature. The interdigitated electrodes defined a gap of about 225 µm wide therebetween. The coating solution was coated onto the insulating substrate 2 by dipping and then dried at 100°C for 5 minutes, forming a polymer coating. In a nitrogen atmosphere, the coatings on the electrode-bearing surface and the rear surface of the substrate were exposed to ultraviolet radiation for one minute on each surface, causing the polymer to crosslink. The dose of ultraviolet radiation was 1,000 mJ/cm 2 . The resulting humidity sensitive thin film 3 had a thickness of 5 µm. The humidity sensor thus fabricated was evaluated for output and examined by a water resistance test. For evaluating the output, a divided flow humidity generating machine model SRH-1 (manufactured by Shinei K.K.) was used. The humidity sensor was incorporated in the circuit described and shown in JP-A-40 19 104. The humidity sensor incorporated in the circuit was set in the humidity generating machine where the relative humidity was changed stepwise from a low level to a high level and then from the high level to the low level both at 25°C. During the humidity cycling process, the humidity sensor which was allowed to stand at a selected relative humidity for 10 minutes was measured for output voltage. The selected relative humidity levels were RH 0%, RH 10%, RH 20%, RH 30%, RH 50%, RH 70%, and RH 90%. The results are plotted in FIG. 2. In the water resistance test, the humidity sensor having undergone humidity cycling for output voltage monitoring as mentioned above was immersed in distilled water for 1 minute, dried in air, and measured for output voltage again, which was compared with the initial output voltage (prior to water immersion). The time duration when the humidity sensor was immersed in distilled water was prolonged to 10 minutes, 30 minutes and 60 minutes whereupon the output voltage was similarly measured. The results are plotted in FIG. 3. It is evident from FIG. 2 that the inventive humidity sensor exhibits no hysteresis and is able to measure low humidity, especially in a region of RH 10% or lower. It is evident from FIG. 3 that the inventive humidity sensor is fully resistant to water. The advantages of the present invention are thus demonstrated. Example 2 8.6 g (0.05 mol) of N,N,N',N'-tetramethyl-1,6-diaminohexane and 7.7 g (0.06 mol) of 1,3-dichloro-2-propanol were dissolved in 8.1 g of isopropanol and stirred for 50 hours at the reflux temperature, effecting quaternization reaction to form an intermediate polymer. Then 10.2 g (0.06 mol) of N-(3-dimethylaminopropyl)methacrylamide and 0.2 g of m-dinitrobenzene as a polymerization inhibitor were added to the reaction solution. The solution was stirred at 45°C for 120 hours, introducing a reactive group into the intermediate polymer at its end. The resulting polymer was precipitated and purified. Except that this polymer was used as a conductive component, a humidity sensor was fabricated as in Example 1 by preparing an aqueous solution of the polymer and coating it to form a humidity sensitive thin film. Note that the polymer had Mn of about 110,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. FIG. 4 shows plots of output voltage versus relative humidity and FIG. 5 shows the results of the water resistance test. The advantages of the present invention are evident from FIGS. 4 and 5. Example 3 5.6 g (0.05 mol) of 1,4-diazabicyclo[2.2.2]octane and 7.1 g (0.05 mol) of 1,5-dichloropentane were dissolved in 6.4 g of 2-ethoxyethanol and stirred for 60 hours at the reflux temperature, effecting quaternization reaction. The reaction solution was added dropwise to a large volume of acetone whereupon the product was precipitated and purified. The product and 2.3 g (0.02 mol) of 1,3-dichloropropane were dissolved in 6.4 g of 2-ethoxyethanol. The reaction solution was stirred for 20 hours at the reflux temperature, effecting quaternization reaction again to form an intermediate polymer. Then 10.2 g (0.06 mol) of N-(3-dimethylaminopropyl)methacrylamide and 0.2 g of m-dinitrobenzene as a polymerization inhibitor were added to the reaction solution. The solution was stirred at 45°C for 120 hours, introducing a reactive group into the intermediate polymer at its end. The resulting polymer was precipitated and purified. Except that this polymer was used as a conductive component, a humidity sensor was fabricated as in Example 1 by preparing an aqueous solution of the polymer and coating it to form a humidity sensitive thin film. Note that the polymer had Mn of about 90,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. FIG. 6 shows plots of output voltage versus relative humidity and FIG. 7 shows the results of the water resistance test. The advantages of the present invention are evident from FIGS. 6 and 7. Example 4 9.9 g (0.05 mol) of 1,3-di(4-pyridyl)propane and 6.8 g (0.06 mol) of 1,3-dichloropropane were dissolved in 8.8 g of 2-ethoxyethanol and stirred for 75 hours at the reflux temperature, effecting quaternization reaction to form an intermediate polymer. Then 10.2 g (0.06 mol) of N-(3-dimethylaminopropyl)methacrylamide and 0.2 g of m-dinitrobenzene as a polymerization inhibitor were added to the reaction solution. The solution was stirred at 45°C for 120 hours, introducing a reactive group into the intermediate polymer at its end. The resulting polymer was precipitated and purified. Except that this polymer was used as a conductive component, a humidity sensor was fabricated as in Example 1 by preparing an aqueous solution of the polymer and coating it to form a humidity sensitive thin film. Note that the polymer had Mn of about 80,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. FIG. 8 shows plots output voltage versus relative humidity and FIG. 9 shows the results of the water resistance test. The advantages of the present invention are evident from FIGS. 8 and 9. Example 5 9.3 g (0.05 mol) of N,N,N',N'-tetraethyl-1,3-diaminopropane and 6.8 g (0.06 mol) of 1,3-dichloropropane were dissolved in 8.5 g of 2-ethoxyethanol and stirred for 60 hours at the reflux temperature, effecting quaternization reaction to form an intermediate polymer. Then 10.2 g (0.06 mol) of N-(3-dimethylaminopropyl)methacrylamide and 0.2 g of m-dinitrobenzene as a polymerization inhibitor were added to the reaction solution. The solution was stirred at 45°C for 120 hours, introducing a reactive group into the intermediate polymer at its end. The resulting polymer was precipitated and purified. Except that this polymer was used as a conductive component, a humidity sensor was fabricated as in Example 1 by preparing an aqueous solution of the polymer and coating it to form a humidity sensitive thin film. Note that the polymer had Mn of about 80,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. FIG. 10 shows plots of output voltage versus relative humidity and FIG. 11 shows the results of the water resistance test. The advantages of the present invention are evident from FIGS. 10 and 11. Example 6 5.7 g (0.05 mol) of N,N'-dimethylpiperazine and 6.8 g (0.06 mol) of 1,3-dichloropropane were dissolved in 6.7 g of 2-ethoxyethanol and stirred for 60 hours at the reflux temperature, effecting quaternization reaction to form an intermediate polymer. Then 10.2 g (0.06 mol) of N-(3-dimethylaminopropyl)methacrylamide and 0.2 g of m-dinitrobenzene as a polymerization inhibitor were added to the reaction solution. The solution was stirred at 45°C for 120 hours, introducing a reactive group into the intermediate polymer at its end. The resulting polymer was precipitated and purified. Except that this polymer was used as a conductive component, a humidity sensor was fabricated as in Example 1 by preparing an aqueous solution of the polymer and coating it to form a humidity sensitive thin film. Note that the polymer had Mn of about 100,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. FIG. 12 shows plots of output voltage versus relative humidity and FIG. 13 shows the results of the water resistance test. The advantages of the present invention are evident from FIGS. 12 and 13. Example 7 8.6 g (0.05 mol) of N,N,N',N'-tetramethyl-1,6-diaminohexane and 10.5 g (0.06 mol) of α,α'-dichloro-p-xylene were dissolved in 9.6 g of 2-ethoxyethanol and stirred for 70 hours at the reflux temperature, effecting quaternization reaction to form an intermediate polymer. Then 10.2 g (0.06 mol) of N-(3-dimethylaminopropyl)methacrylamide and 0.2 g of m-dinitrobenzene as a polymerization inhibitor were added to the reaction solution. The solution was stirred at 45°C for 120 hours, introducing a reactive group into the intermediate polymer at its end. The resulting polymer was precipitated and purified. Except that this polymer was used as a conductive component, a humidity sensor was fabricated as in Example 1 by preparing an aqueous solution of the polymer and coating it to form a humidity sensitive thin film. Note that the polymer had Mn of about 80,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. FIG. 14 shows plots of output voltage versus relative humidity and FIG. 15 shows the results of the water resistance test. The advantages of the present invention are evident from FIGS. 14 and 15. Example 8 0.36 g (0.0025 mol) of N,N,N',N'-tetramethyl-2-butene-1,4-diaminobutane, 5.3 g (0.048 mol) of 1,4-diazabicyclo[2.2.2]octane, and 5.7 g (0.05 mol) of 1,3-dichloropropane were dissolved in 7.4 g of ethanol and stirred for 70 hours at the reflux temperature, effecting quaternization reaction. The resulting polymer was precipitated and purified. Except that this polymer was used as a conductive component, a humidity sensor was fabricated as in Example 1 by preparing an aqueous solution of the polymer and coating it to form a humidity sensitive thin film. Note that the polymer had Mn of about 80,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. FIG. 16 shows plots of output voltage versus relative humidity and FIG. 17 shows the results of the water resistance test. The advantages of the present invention are evident from FIGS. 16 and 17. Example 9 8.6 g (0.05 mol) of N,N,N',N'-tetramethyl-1,6-diamino-hexane and 12.1 g (0.06 mol) of 1,3-dibromopropane were dissolved in 10.9 g of methanol and stirred for 10 hours at the reflux temperature, effecting quaternization reaction to form an intermediate polymer. Then 9.36 g (0.06 mol) of N-(3-dimethylaminopropyl)acrylamide and 0.4 g of m-dinitrobenzene as a polymerization inhibitor were added to the reaction solution. The solution was stirred at 35°C for 100 hours, introducing a reactive group into the intermediate polymer at its end. The resulting polymer was precipitated and purified. Except that this polymer was used as a conductive component, a humidity sensor was fabricated as in Example 1 by preparing an aqueous solution of the polymer and coating it to form a humidity sensitive thin film. Note that the polymer had Mn of about 150,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. FIG. 18 shows plots of output voltage versus relative humidity and FIG. 19 shows the results of the water resistance test. It is seen from FIG. 18 that this sensor enabled humidity measurement over a relatively wide region although measurement was impossible in the region of RH 0% through 10% because the dibromo compound was used as the dihalogen compound. The sensor had improved water resistance as seen from FIG. 19. Example 10 5.6 g (0.05 mol) of 1,4-diazabicyclo[2.2.2]octane and 13.1 g (0.06 mol) of 1,3-dibromo-2-propanol were dissolved in 9.4 g of 2-ethoxyethanol and stirred for 30 hours at the reflux temperature, effecting quaternization reaction to form an intermediate polymer. Then 10.2 g (0.06 mol) of N-(3-dimethylaminopropyl)methacrylamide and 0.4 g of m-dinitrobenzene as a polymerization inhibitor were added to the reaction solution. The solution was stirred at 35°C for 100 hours, introducing a reactive group into the intermediate polymer at its end. The resulting polymer was precipitated and purified. Except that this polymer was used as a conductive component, a humidity sensor was fabricated as in Example 1 by preparing an aqueous solution of the polymer and coating it to form a humidity sensitive thin film. Note that the polymer had Mn of about 130,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. FIG. 20 shows plots of output voltage versus relative humidity and FIG. 21 shows the results of the water resistance test. FIGS. 20 and 21 show that the results are the same as in Example 9. Example 11 According to reaction scheme II, 10.3 g (0.06 mol) of N,N,N',N'-tetramethyl-1,6-diaminohexane and 5.7 g (0.05 mol) of 1,3-dichloropropane were dissolved in 8.0 g of methanol and stirred for 25 hours at the reflux temperature, effecting quaternization reaction to form an intermediate polymer as shown in reaction formula (3) below. Then 6.4 g (0.06 mol) of 2-chloroethyl vinyl ether and 0.2 g of m-dinitrobenzene as a polymerization inhibitor were added to the reaction solution. The solution was stirred at 35°C for 100 hours, introducing a reactive group into the intermediate polymer at its end as shown in reaction formula (4) below. Note that the polymer had Mn of about 110,000 prior to crosslinking. A humidity sensor was fabricated as in Example 1 and similarly evaluated for output and water resistance. The results were equivalent to those of Example 1. Example 12 0.82 g (0.0025 mol) of N,N,N',N'-tetraallyl-1,4-diaminobutane, 5.3 g (0.048 mol) of 1,4-diazabicyclo[2.2.2]octane, and 5.7 g (0.05 mol) of 1,3-dichloropropane were dissolved in 7.4 g of ethanol and stirred for 70 hours at the reflux temperature, effecting quaternization reaction. The resulting polymer was precipitated and purified. Except that this polymer was used as a conductive component, a humidity sensor was fabricated as in Example 1 by preparing an aqueous solution of the polymer and coating it to form a humidity sensitive thin film. Note that the polymer had Mn of about 110,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. FIG. 22 shows plots of output voltage versus relative humidity and FIG. 23 shows the results of the water resistance test. The advantages of the present invention are evident from FIGS. 22 and 23. Example 13 A humidity sensor was fabricated as in Example 1 except that in introducing a reactive group into the intermediate polymer at its end, the reaction solution was stirred for 20 hours at the reflux temperature instead of stirring for 100 hours at 35°C. Note that the polymer had Mn of about 130,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. The output voltage versus relative humidity was the same as in Example 1. FIG. 24 shows the results of the water resistance test. The water resistance of the sensor of this Example was better than that of Example 1 since the reactive group was introduced into the intermediate polymer at a higher temperature than in Example 1 whereby some reactive groups underwent polymerization. Example 14 A humidity sensor was fabricated as in Example 2 except that in introducing a reactive group into the intermediate polymer at its end, the reaction solution was stirred for 25 hours at 80°C instead of stirring for 120 hours at 45°C. Note that the polymer had Mn of about 90,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. The output voltage versus relative humidity was the same as in Example 2. FIG. 25 shows the results of the water resistance test. The water resistance of the sensor of this Example was better than that of Example 2 since the reactive group was introduced into the intermediate polymer at a higher temperature than in Example 2 whereby some reactive groups underwent polymerization. Example 15 A humidity sensor was fabricated as in Example 3 except that in introducing a reactive group into the intermediate polymer at its end, the reaction solution was stirred for 20 hours at 80°C instead of stirring for 120 hours at 45°C. Note that the polymer had Mn of about 80,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. The output voltage versus relative humidity was the same as in Example 3. FIG. 26 shows the results of the water resistance test. The water resistance of the sensor of this Example was better than that of Example 3 since the reactive group was introduced into the intermediate polymer at a higher temperature than in Example 3 whereby some reactive groups underwent polymerization. Example 16 A humidity sensor was fabricated as in Example 5 except that in introducing a reactive group into the intermediate polymer at its end, the reaction solution was stirred for 20 hours at 80°C instead of stirring for 120 hours at 45°C. Note that the polymer had Mn of about 80,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. The output voltage versus relative humidity was the same as in Example 5. FIG. 27 shows the results of the water resistance test. The water resistance of the sensor of this Example was better than that of Example 5 since the reactive group was introduced into the intermediate polymer at a higher temperature than in Example 5 whereby some reactive groups underwent polymerization. Example 17 A humidity sensor was fabricated as in Example 6 except that in introducing a reactive group into the intermediate polymer at its end, the reaction solution was stirred for 20 hours at 80°C instead of stirring for 120 hours at 45°C. Note that the polymer had Mn of about 80,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. The output voltage versus relative humidity was the same as in Example 6. FIG. 28 shows the results of the water resistance test. The water resistance of the sensor of this Example was better than that of Example 6 since the reactive group was introduced into the intermediate polymer at a higher temperature than in Example 6 whereby some reactive groups underwent polymerization. Example 18 A humidity sensor was fabricated as in Example 7 except that in introducing a reactive group into the intermediate polymer at its end, the reaction solution was stirred for 20 hours at 80°C instead of stirring for 120 hours at 45°C. Note that the polymer had Mn of about 100,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. The output voltage versus relative humidity was the same as in Example 7. FIG. 29 shows the results of the water resistance test. The water resistance of the sensor of this Example was better than that of Example 7 since the reactive group was introduced into the intermediate polymer at a higher temperature than in Example 7 whereby some reactive groups underwent polymerization. Example 19 A humidity sensor was fabricated as in Example 9 except that in introducing a reactive group into the intermediate polymer at its end, the reaction solution was stirred for 20 hours at 80°C instead of stirring for 100 hours at 35°C. Note that the polymer had Mn of about 80,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. The output voltage versus relative humidity was the same as in Example 9. FIG. 30 shows the results of the water resistance test. The water resistance of the sensor of this Example was better than that of Example 9 since the reactive group was introduced into the intermediate polymer at a higher temperature than in Example 9 whereby some reactive groups underwent polymerization. Example 20 A humidity sensor was fabricated as in Example 10 except that in introducing a reactive group into the intermediate polymer at its end, the reaction solution was stirred for 20 hours at the reflux temperature instead of stirring for 100 hours at 35°C. Note that the polymer had Mn of about 150,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. The output voltage versus relative humidity was the same as in Example 10. FIG. 31 shows the results of the water resistance test. The water resistance of the sensor of this Example was better than that of Example 10 since the reactive group was introduced into the intermediate polymer at a higher temperature than in Example 10 whereby some reactive groups underwent polymerization. Example 21 A humidity sensor was fabricated as in Example 11 except that in introducing a reactive group into the intermediate polymer at its end, the reaction solution was stirred for 20 hours at 80°C instead of stirring for 100 hours at 35°C. Note that the polymer had Mn of about 150,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. The output voltage versus relative humidity was the same as in Example 11. FIG. 32 shows the results of the water resistance test. The water resistance of the sensor of this Example was better than that of Example 11 since the reactive group was introduced into the intermediate polymer at a higher temperature than in Example 11 whereby some reactive groups underwent polymerization. Example 22 In 10.0 g of methanol were dissolved 4.25 g (0.020 mol) of 1,3-di(4-pyridyl)propane, 8.13 g (0.047 mol) of N,N,N',N'-tetramethyl-1,6-diaminohexane, and 7.62 g (0.067 mol) of 1,3-dichloropropane. The solution was stirred for 25 hours at the reflux temperature, effecting quaternization reaction. At the end of reaction, the reaction solution was cooled, to which 3.81 g (0.034 mol) of 1,3-dichloropropane and 20.0 g of methanol were added. The solution was stirred for a further 25 hours at the reflux temperature. At the end of reaction, the reaction solution was cooled, to which 30 g of 2-propanol was added. The reaction solution was added dropwise to a large volume of acetone whereupon an intermediate polymer precipitated. The precipitate was collected by filtration through a glass filter and dried in vacuum. Then 15.0 g of the intermediate polymer, 15.0 g of N-(3-dimethylaminopropyl)methacrylamide and 0.2 g of m-dinitrobenzene as a polymerization inhibitor were dissolved in 30.0 g of methanol. The solution was stirred at the reflux temperature for 20 hours, introducing a reactive group into the intermediate polymer at its end. At the end of reaction, 30 g of 2-propanol was added to the reaction solution, which was added dropwise to a large volume of acetone whereupon the polymer precipitated. The precipitate was collected by filtration through a glass filter and then dried in vacuum. Except that this polymer was used as a conductive component, a humidity sensor was fabricated as in Example 1 by preparing an aqueous solution of the polymer and coating it to form a humidity sensitive thin film. Note that the polymer had Mn of about 130,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. FIG. 33 shows plots of output voltage versus relative humidity and FIG. 34 shows the results of the water resistance test. The advantages of the present invention are evident from FIGS. 33 and 34. Example 23 In 10.0 g of methanol were dissolved 2.52 g (0.022 mol) of 1,4-diazabicyclo[2.2.2]octane, 9.03 g (0.052 mol) of N,N,N',N'-tetramethyl-1,6-diaminohexane, and 8.46 g (0.075 mol) of 1,3-dichloropropane. The solution was stirred for 25 hours at the reflux temperature, effecting quaternization reaction. At the end of reaction, the reaction solution was cooled, to which 4.23 g (0.037 mol) of 1,3-dichloropropane and 20.0 g of methanol were added. The reaction solution was stirred for a further 25 hours at the reflux temperature. At the end of reaction, the reaction solution was cooled, to which 30 g of 2-propanol was added. The reaction solution was added dropwise to a large volume of acetone whereupon an intermediate polymer precipitated. The precipitate was collected by filtration through a glass filter and dried in vacuum. Then 15.0 g of the intermediate polymer, 15.0 g of N-(3-dimethylaminopropyl)methacrylamide and 0.2 g of m-dinitrobenzene as a polymerization inhibitor were dissolved in 30.0 g of methanol. The solution was stirred at the reflux temperature for 20 hours, introducing a reactive group into the intermediate polymer at its end. At the end of reaction, 30 g of 2-propanol was added to the reaction solution, which was added dropwise to a large volume of acetone whereupon the polymer precipitated. The precipitate was collected by filtration through a glass filter and then dried in vacuum. Except that this polymer was used as a conductive component, a humidity sensor was fabricated as in Example 1 by preparing an aqueous solution of the polymer and coating it to form a humidity sensitive thin film. Note that the polymer had Mn of about 110,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. FIG. 35 shows plots of output voltage versus relative humidity and FIG. 36 shows the results of the water resistance test. The advantages of the present invention are evident from FIGS. 35 and 36. Example 24 In 10.0 g of methanol were dissolved 2.51 g (0.022 mol) of N,N'-dimethylpiperazine, 9.01 g (0.052 mol) of N,N,N',N'-tetramethyl-1,6-diaminohexane, and 8.44 g (0.075 mol) of 1,3-dichloropropane. The solution was stirred for 25 hours at the reflux temperature, effecting quaternization reaction. At the end of reaction, the reaction solution was cooled, to which 4.22 g (0.037 mol) of 1,3-dichloropropane and 20.0 g of methanol were added. The reaction solution was stirred for a further 25 hours at the reflux temperature. At the end of reaction, the reaction solution was cooled, to which 30 g of 2-propanol was added. The reaction solution was added dropwise to a large volume of acetone whereupon an intermediate polymer precipitated. The precipitate was collected by filtration through a glass filter and dried in vacuum. Then 15.0 g of the intermediate polymer, 15.0 g of N-(3-dimethylaminopropyl)methacrylamide and 0.2 g of m-dinitrobenzene as a polymerization inhibitor were dissolved in 30.0 g of methanol. The solution was stirred at the reflux temperature for 20 hours, introducing a reactive group into the intermediate polymer at its end. At the end of reaction, 30 g of 2-propanol was added to the reaction solution, which was added dropwise to a large volume of acetone whereupon the polymer precipitated. The precipitate was collected by filtration through a glass filter and then dried in vacuum. Except that this polymer was used as a conductive component, a humidity sensor was fabricated as in Example 1 by preparing an aqueous solution of the polymer and coating it to form a humidity sensitive thin film. Note that the polymer had Mn of about 120,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. FIG. 37 shows plots of output voltage versus relative humidity and FIG. 38 shows the results of the water resistance test. The advantages of the present invention are evident from FIGS. 37 and 38. Example 25 In 10.0 g of methanol were dissolved 4.69 g (0.020 mol) of N,N'-dimethyl-1,3-dipiperidylpropane, 7.90 g (0.046 mol) of N,N,N',N'-tetramethyl-1,6-diaminohexane, and 7.41 g (0.066 mol) of 1,3-dichloropropane. The solution was stirred for 25 hours at the reflux temperature, effecting quaternization reaction. At the end of reaction, the reaction solution was cooled, to which 3.71 g (0.033 mol) of 1,3-dichloropropane and 20.0 g of methanol were added. The reaction solution was stirred for a further 25 hours at the reflux temperature. At the end of reaction, the reaction solution was cooled, to which 30 g of 2-propanol was added. The reaction solution was added dropwise to a large volume of acetone whereupon an intermediate polymer precipitated. The precipitate was collected by filtration through a glass filter and dried in vacuum. Then 15.0 g of the intermediate polymer, 15.0 g of N-(3-dimethylaminopropyl)methacrylamide and 0.2 g of m-dinitrobenzene as a polymerization inhibitor were dissolved in 30.0 g of methanol. The solution was stirred at the reflux temperature for 20 hours, introducing a reactive group into the intermediate polymer at its end. At the end of reaction, 30 g of 2-propanol was added to the reaction solution, which was added dropwise to a large volume of acetone whereupon the polymer precipitated. The precipitate was collected by filtration through a glass filter and then dried in vacuum. Except that this polymer was used as a conductive component, a humidity sensor was fabricated as in Example 1 by preparing an aqueous solution of the polymer and coating it to form a humidity sensitive thin film. Note that the polymer had Mn of about 90,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. FIG. 39 shows plots of output voltage versus relative humidity and FIG. 40 shows the results of the water resistance test. The advantages of the present invention are evident from FIGS. 39 and 40. Example 26 In 10.0 g of methanol were dissolved 9.29 g (0.083 mol) of 1,4-diazabicyclo[2.2.2]octane and 10.71 g (0.069 mol) of 1,6-dichlorohexane. The solution was stirred for 15 hours at the reflux temperature, effecting quaternization reaction. At the end of reaction, the reaction solution was cooled, to which 4.65 g (0.041 mol) of 1,4-diazabicyclo[2.2.2]octane and 20.0 g of methanol were added. The reaction solution was stirred for a further 15 hours at the reflux temperature. At the end of reaction, the reaction solution was cooled, to which 30 g of 2-propanol was added. The reaction solution was added dropwise to a large volume of acetone whereupon an intermediate polymer precipitated. The precipitate was collected by filtration through a glass filter and dried in vacuum (yield 15.5 g). Then 15.0 g of the intermediate polymer and 15.0 g of vinylbenzyl chloride (mixture of m- and p-forms) were dissolved in 30.0 g of methanol. The solution was stirred at 25°C for 24 hours, introducing a reactive group into the intermediate polymer at its end. At the end of reaction, 30 g of 2-propanol was added to the reaction solution, which was added dropwise to a large volume of acetone whereupon the polymer precipitated. The precipitate was collected by filtration through a glass filter and then dried in vacuum (yield 20.3 g). Except that this polymer was used as a conductive component, a humidity sensor was fabricated as in Example 1 by preparing an aqueous solution of the polymer and coating it to form a humidity sensitive thin film. Note that the polymer had Mn of about 50,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. FIG. 41 shows plots of output voltage versus relative humidity and FIG. 42 shows the results of the water resistance test. The advantages of the present invention are evident from FIGS. 41 and 42. Example 27 In 10.0 g of methanol were dissolved 3.68 g (0.033 mol) of 1,4-diazabicyclo[2.2.2]octane, 7.83 g (0.033 mol) of 4,4'-trimethylenebis(1-methylpiperidine), and 8.49 g (0.055 mol) of 1,6-dichlorohexane. The solution was stirred for 15 hours at the reflux temperature, effecting quaternization reaction. At the end of reaction, the reaction solution was cooled, to which 3.68 g (0.033 mol) of 1,4-diazabicyclo[2.2.2]octane and 20.0 g of methanol were added. The reaction solution was stirred for a further 15 hours at the reflux temperature. At the end of reaction, the reaction solution was cooled, to which 30 g of 2-propanol was added. The reaction solution was added dropwise to a large volume of acetone whereupon an intermediate polymer precipitated. The precipitate was collected by filtration through a glass filter and dried in vacuum (yield 16.2 g). Then 15.0 g of the intermediate polymer and 15.0 g of vinylbenzyl chloride (mixture of m- and p-forms) were dissolved in 30.0 g of methanol. The solution was stirred at 25°C for 24 hours, introducing a reactive group into the intermediate polymer at its end. At the end of reaction, 30 g of 2-propanol was added to the reaction solution, which was added dropwise to a large volume of acetone whereupon the polymer precipitated. The precipitate was collected by filtration through a glass filter and then dried in vacuum (yield 19.2 g). Except that this polymer was used as a conductive component, a humidity sensor was fabricated as in Example 1 by preparing an aqueous solution of the polymer and coating it to form a humidity sensitive thin film. Note that the polymer had Mn of about 60,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. FIG. 43 shows plots of output voltage versus relative humidity and FIG. 44 shows the results of the water resistance test. The advantages of the present invention are evident from FIGS. 43 and 44. Example 28 In 10.0 g of methanol were dissolved 9.46 g (0.084 mol) of 1,4-diazabicyclo[2.2.2]octane, 8.72 g (0.056 mol) of 1,6-dichlorohexane, and 1.81 g (0.014 mol) of 1,3-dichloro-2-propanol. The solution was stirred for 15 hours at the reflux temperature, effecting quaternization reaction. At the end of reaction, the reaction solution was cooled, to which 4.73 g (0.042 mol) of 1,4-diazabicyclo[2.2.2]octane and 20.0 g of methanol were added. The reaction solution was stirred for a further 15 hours at the reflux temperature. At the end of reaction, the reaction solution was cooled, to which 30 g of 2-propanol was added. The reaction solution was added dropwise to a large volume of acetone whereupon an intermediate polymer precipitated. The precipitate was collected by filtration through a glass filter and dried in vacuum (yield 15.2 g). Then 15.0 g of the intermediate polymer and 15.0 g of vinylbenzyl chloride (mixture of m- and p-forms) were dissolved in 30.0 g of methanol. The solution was stirred at 25°C for 24 hours, introducing a reactive group into the intermediate polymer at its end. At the end of reaction, 30 g of 2-propanol was added to the reaction solution, which was added dropwise to a large volume of acetone whereupon the polymer precipitated. The precipitate was collected by filtration through a glass filter and then dried in vacuum (yield 18.2 g). Except that this polymer was used as a conductive component, a humidity sensor was fabricated as in Example 1 by preparing an aqueous solution of the polymer and coating it to form a humidity sensitive thin film. Note that the polymer had Mn of about 40,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. FIG. 45 shows plots of output voltage versus relative humidity and FIG. 46 shows the results of the water resistance test. The advantages of the present invention are evident from FIGS. 45 and 46. Example 29 In 10.0 g of methanol were dissolved 7.52 g (0.067 mol) of 1,4-diazabicyclo[2.2.2]octane and 12.48 g (0.080 mol) of 1,6-dichlorohexane. The solution was stirred for 15 hours at the reflux temperature, effecting quaternization reaction. At the end of reaction, the reaction solution was cooled, to which 6.24 g (0.040 mol) of 1,6-dichlorohexane and 20.0 g of methanol were added. The reaction solution was stirred for a further 15 hours at the reflux temperature. At the end of reaction, the reaction solution was cooled, to which 30 g of 2-propanol was added. The reaction solution was added dropwise to a large volume of acetone whereupon an intermediate polymer precipitated. The precipitate was collected by filtration through a glass filter and dried in vacuum (yield 17.5 g). Then 15.0 g of the intermediate polymer and 15.0 g of N-(3-dimethylaminopropyl)methacrylamide were dissolved in 30.0 g of methanol. The solution was stirred at 25°C for 24 hours, introducing a reactive group into the intermediate polymer at its end. At the end of reaction, 30 g of 2-propanol was added to the reaction solution, which was added dropwise to a large volume of acetone whereupon the polymer precipitated. The precipitate was collected by filtration through a glass filter and then dried in vacuum (yield 18.4 g). Except that this polymer was used as a conductive component, a humidity sensor was fabricated as in Example 1 by preparing an aqueous solution of the polymer and coating it to form a humidity sensitive thin film. Note that the polymer had Mn of about 50,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. FIG. 47 shows plots of output voltage versus relative humidity and FIG. 48 shows the results of the water resistance test. The advantages of the present invention are evident from FIGS. 47 and 48. Example 30 The intermediate polymer synthesized, separated and purified in Example 29, 15.0 g, and 15.0 g of N-(3-dimethylaminopropyl)acrylamide were dissolved in 30.0 g of methanol. The solution was stirred at 25°C for 24 hours, introducing a reactive group into the intermediate polymer at its end. At the end of reaction, 30 g of 2-propanol was added to the reaction solution, which was added dropwise to a large volume of acetone whereupon the polymer precipitated. The precipitate was collected by filtration through a glass filter and then dried in vacuum (yield 16.2 g). Except that this polymer was used as a conductive component, a humidity sensor was fabricated as in Example 1 by preparing an aqueous solution of the polymer and coating it to form a humidity sensitive thin film. Note that the polymer had Mn of about 50,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. The output voltage versus relative humidity was the same as in Example 29. FIG. 49 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 31 In 10.0 g of methanol were dissolved 9.46 g (0.084 mol) of 1,4-diazabicyclo[2.2.2]octane, 8.72 g (0.056 mol) of 1,6-dichlorohexane, and 1.81 g (0.014 mol) of 1,3-dichloro-2-propanol. The solution was stirred for 15 hours at the reflux temperature, effecting quaternization reaction. At the end of reaction, the reaction solution was cooled, to which 5.42 g (0.042 mol) of 1,3-dichloro-2-propanol and 20.0 g of methanol were added. The reaction solution was stirred for a further 15 hours at the reflux temperature. At the end of reaction, the reaction solution was cooled and added dropwise to a large volume of acetone whereupon an intermediate polymer precipitated. The precipitate was collected by filtration through a glass filter and dried in vacuum (yield 18.1 g). Then 15.0 g of the intermediate polymer and 15.0 g of N-(3-dimethylaminopropyl)methacrylamide were dissolved in 30.0 g of methanol. The solution was stirred at 25°C for 24 hours, introducing a reactive group into the intermediate polymer at its end. At the end of reaction, 30 g of 2-propanol was added to the reaction solution, which was added dropwise to a large volume of acetone whereupon the polymer precipitated. The precipitate was collected by filtration through a glass filter and then dried in vacuum (yield 15.4 g). Except that this polymer was used as a conductive component, a humidity sensor was fabricated as in Example 1 by preparing an aqueous solution of the polymer and coating it to form a humidity sensitive thin film. Note that the polymer had Mn of about 40,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. FIG. 50 shows plots of output voltage versus relative humidity and FIG. 51 shows the results of the water resistance test. The advantages of the present invention are evident from FIGS. 50 and 51. Example 32 In 10.0 g of methanol were dissolved 9.38 g (0.082 mol) of N,N'-dimethylpiperazine and 10.62 g (0.068 mol) of 1,6-dichlorohexane. The solution was stirred for 15 hours at the reflux temperature, effecting quaternization reaction. At the end of reaction, the reaction solution was cooled, to which 4.69 g (0.041 mol) of N,N'-dimethylpiperazine and 20.0 g of methanol were added. The reaction solution was stirred for a further 15 hours at the reflux temperature. At the end of reaction, the reaction solution was cooled and added dropwise to a large volume of acetone whereupon an intermediate polymer precipitated. The precipitate was collected by filtration through a glass filter and dried in vacuum (yield 15.1 g). Then 15.0 g of the intermediate polymer and 15.0 g of vinylbenzyl chloride (mixture of m- and p-forms) were dissolved in 30.0 g of methanol. The solution was stirred at 25°C for 24 hours, introducing a reactive group into the intermediate polymer at its end. At the end of reaction, 30 g of 2-propanol was added to the reaction solution, which was added dropwise to a large volume of acetone whereupon the polymer precipitated. The precipitate was collected by filtration through a glass filter and then dried in vacuum (yield 19.2 g). Except that this polymer was used as a conductive component, a humidity sensor was fabricated as in Example 1 by preparing an aqueous solution of the polymer and coating it to form a humidity sensitive thin film. Note that the polymer had Mn of about 50,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. FIG. 52 shows plots of output voltage versus relative humidity and FIG. 53 shows the results of the water resistance test. The advantages of the present invention are evident from FIGS. 52 and 53. Example 33 In 10.0 g of methanol were dissolved 4.63 g (0.041 mol) of 1,4-diazabicyclo[2.2.2]octane, 4.71 g (0.041 mol) of N,N'-dimethylpiperazine, and 10.66 g (0.069 mol) of 1,6-dichlorohexane. The solution was stirred for 15 hours at the reflux temperature, effecting quaternization reaction. At the end of reaction, the reaction solution was cooled, to which 4.63 g (0.041 mol) of 1,4-diazabicyclo[2.2.2]octane and 20.0 g of methanol were added. The reaction solution was stirred for a further 15 hours at the reflux temperature. At the end of reaction, the reaction solution was cooled and added dropwise to a large volume of acetone whereupon an intermediate polymer precipitated. The precipitate was collected by filtration through a glass filter and dried in vacuum (yield 17.2 g). Then 15.0 g of the intermediate polymer and 15.0 g of vinylbenzyl chloride (mixture of m- and p-forms) were dissolved in 30.0 g of methanol. The solution was stirred at 25°C for 24 hours, introducing a reactive group into the intermediate polymer at its end. At the end of reaction, 30 g of 2-propanol was added to the reaction solution, which was added dropwise to a large volume of acetone whereupon the polymer precipitated. The precipitate was collected by filtration through a glass filter and then dried in vacuum (yield 20.2 g). Except that this polymer was used as a conductive component, a humidity sensor was fabricated as in Example 1 by preparing an aqueous solution of the polymer and coating it to form a humidity sensitive thin film. Note that the polymer had Mn of about 70,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. FIG. 54 shows plots of output voltage versus relative humidity and FIG. 55 shows the results of the water resistance test. The advantages of the present invention are evident from FIGS. 54 and 55. Example 34 In 10.0 g of methanol were dissolved 8.48 g (0.074 mol) of N,N'-dimethylpiperazine and 3.82 g (0.089 mol) of 1,6-dichlorohexane. The solution was stirred for 15 hours at the reflux temperature, effecting quaternization reaction. At the end of reaction, the reaction solution was cooled, to which 6.91 g (0.045 mol) of 1,6-dichlorohexane and 20.0 g of methanol were added. The reaction solution was stirred for a further 15 hours at the reflux temperature. At the end of reaction, the reaction solution was cooled and added dropwise to a large volume of acetone whereupon an intermediate polymer precipitated. The precipitate was collected by filtration through a glass filter and dried in vacuum (yield 17.1 g). Then 15.0 g of the intermediate polymer and 15.0 g of N-(3-dimethylaminopropyl)methacrylamide were dissolved in 30.0 g of methanol. The solution was stirred at 25°C for 24 hours, introducing a reactive group into the intermediate polymer at its end. At the end of reaction, 30 g of 2-propanol was added to the reaction solution, which was added dropwise to a large volume of acetone whereupon the polymer precipitated. The precipitate was collected by filtration through a glass filter and then dried in vacuum (yield 17.4 g). Except that this polymer was used as a conductive component, a humidity sensor was fabricated as in Example 1 by preparing an aqueous solution of the polymer and coating it to form a humidity sensitive thin film. Note that the polymer had Mn of about 70,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. FIG. 56 shows plots of output voltage versus relative humidity and FIG. 57 shows the results of the water resistance test. The advantages of the present invention are evident from FIGS. 56 and 57. Example 35 The intermediate polymer synthesized, separated and purified in Example 34, 15.0 g, and 15.0 g of N-(3-dimethylaminopropyl)acrylamide were dissolved in 30.0 g of methanol. The solution was stirred at 25°C for 24 hours, introducing a reactive group into the intermediate polymer at its end. At the end of reaction, 30 g of 2-propanol was added to the reaction solution, which was added dropwise to a large volume of acetone whereupon the polymer precipitated. The precipitate was collected by filtration through a glass filter and then dried in vacuum (yield 15.1 g). Except that this polymer was used as a conductive component, a humidity sensor was fabricated as in Example 1 by preparing an aqueous solution of the polymer and coating it to form a humidity sensitive thin film. Note that the polymer had Mn of about 70,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. The output voltage versus relative humidity was the same as in Example 34. FIG. 58 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 36 In 10.0 g of methanol were dissolved 3.75 g (0.033 mol) of 1,4-diazabicyclo[2.2.2]octane, 3.82 g (0.033 mol) of N,N'-dimethylpiperazine, and 12.44 g (0.080 mol) of 1,6-dichlorohexane. The solution was stirred for 15 hours at the reflux temperature, effecting quaternization reaction. At the end of reaction, the reaction solution was cooled, to which 6.22 g (0.040 mol) of 1,6-dichlorohexane and 20.0 g of methanol were added. The reaction solution was stirred for a further 15 hours at the reflux temperature. At the end of reaction, the reaction solution was cooled and added dropwise to a large volume of acetone whereupon an intermediate polymer precipitated. The precipitate was collected by filtration through a glass filter and dried in vacuum (yield 17.5 g). Then 15.0 g of the intermediate polymer and 15.0 g of N-(3-dimethylaminopropyl)methacrylamide were dissolved in 30.0 g of methanol. The solution was stirred at 25°C for 24 hours, introducing a reactive group into the intermediate polymer at its end. At the end of reaction, 30 g of 2-propanol was added to the reaction solution, which was added dropwise to a large volume of acetone whereupon the polymer precipitated. The precipitate was collected by filtration through a glass filter and then dried in vacuum (yield 18.4 g). Except that this polymer was used as a conductive component, a humidity sensor was fabricated as in Example 1 by preparing an aqueous solution of the polymer and coating it to form a humidity sensitive thin film. Note that the polymer had Mn of about 50,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. FIG. 59 shows plots of output voltage versus relative humidity and FIG. 60 shows the results of the water resistance test. The advantages of the present invention are evident from FIGS. 59 and 60. Example 37 The intermediate polymer synthesized, separated and purified in Example 36, 15.0 g, and 15.0 g of N-(3-dimethylaminopropyl)acrylamide were dissolved in 30.0 g of methanol. The solution was stirred at 25°C for 24 hours, introducing a reactive group into the intermediate polymer at its end. At the end of reaction, 30 g of 2-propanol was added to the reaction solution, which was added dropwise to a large volume of acetone whereupon the polymer precipitated. The precipitate was collected by filtration through a glass filter and then dried in vacuum (yield 18.2 g). Except that this polymer was used as a conductive component, a humidity sensor was fabricated as in Example 1 by preparing an aqueous solution of the polymer and coating it to form a humidity sensitive thin film. Note that the polymer had Mn of about 50,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. The output voltage versus relative humidity was the same as in Example 36. FIG. 61 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 38 In 10.0 g of methanol were dissolved 3.74 g (0.033 mol) of N,N'-dimethylpiperazine, 7.80 g (0.033 mol) of 4,4'-trimethylenebis(1-methylpiperidine), and 8.46 g (0.055 mol) of 1,6-dichlorohexane. The solution was stirred for 15 hours at the reflux temperature, effecting quaternization reaction. At the end of reaction, the reaction solution was cooled, to which 3.74 g (0.033 mol) of N,N'-dimethylpiperazine and 20.0 g of methanol were added. The reaction solution was stirred for a further 15 hours at the reflux temperature. At the end of reaction, the reaction solution was cooled and 30 g of 2-propanol was added thereto. The solution was added dropwise to a large volume of acetone whereupon an intermediate polymer precipitated. The precipitate was collected by filtration through a glass filter and dried in vacuum (yield 15.5 g). Then 15.0 g of the intermediate polymer and 15.0 g of vinylbenzyl chloride (mixture of m- and p-forms) were dissolved in 30.0 g of methanol. The solution was stirred at 25°C for 24 hours, introducing a reactive group into the intermediate polymer at its end. At the end of reaction, 30 g of 2-propanol was added to the reaction solution, which was added dropwise to a large volume of acetone whereupon the polymer precipitated. The precipitate was collected by filtration through a glass filter and then dried in vacuum (yield 12.2 g). Except that this polymer was used as a conductive component, a humidity sensor was fabricated as in Example 1 by preparing an aqueous solution of the polymer and coating it to form a humidity sensitive thin film. Note that the polymer had Mn of about 60,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. FIG. 62 shows plots of output voltage versus relative humidity and FIG. 63 shows the results of the water resistance test. The advantages of the present invention are evident from FIGS. 62 and 63. Example 39 In 10.0 g of methanol were dissolved 3.15 g (0.028 mol) of N,N'-dimethylpiperazine, 6.58 g (0.028 mol) of 4,4'-trimethylenebis(1-methylpiperidine), and 10.27 g (0.065 mol) of 1,6-dichlorohexane. The solution was stirred for 15 hours at the reflux temperature, effecting quaternization reaction. At the end of reaction, the reaction solution was cooled, to which 5.14 g (0.033 mol) of 1,6-dichlorohexane and 20.0 g of methanol were added. The reaction solution was stirred for a further 15 hours at the reflux temperature. At the end of reaction, the reaction solution was cooled and 30 g of 2-propanol was added thereto. The solution was added dropwise to a large volume of acetone whereupon an intermediate polymer precipitated. The precipitate was collected by filtration through a glass filter and dried in vacuum (yield 16.5 g). Then 15.0 g of the intermediate polymer and 15.0 g of N-(3-dimethylaminopropyl)methacrylamide were dissolved in 30.0 g of methanol. The solution was stirred at 25°C for 24 hours, introducing a reactive group into the intermediate polymer at its end. At the end of reaction, 30 g of 2-propanol was added to the reaction solution, which was added dropwise to a large volume of acetone whereupon the polymer precipitated. The precipitate was collected by filtration through a glass filter and then dried in vacuum (yield 15.4 g). Except that this polymer was used as a conductive component, a humidity sensor was fabricated as in Example 1 by preparing an aqueous solution of the polymer and coating it to form a humidity sensitive thin film. Note that the polymer had Mn of about 50,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. FIG. 64 shows plots of output voltage versus relative humidity and FIG. 65 shows the results of the water resistance test. The advantages of the present invention are evident from FIGS. 64 and 65. Example 40 The intermediate polymer synthesized, separated and purified in Example 39, 15.0 g, and 15.0 g of N-(3-dimethylaminopropyl)acrylamide were dissolved in 30.0 g of methanol. The solution was stirred at 25°C for 24 hours, introducing a reactive group into the intermediate polymer at its end. At the end of reaction, 30 g of 2-propanol was added to the reaction solution, which was added dropwise to a large volume of acetone whereupon the polymer precipitated. The precipitate was collected by filtration through a glass filter and then dried in vacuum (yield 17.9 g). Except that this polymer was used as a conductive component, a humidity sensor was fabricated as in Example 1 by preparing an aqueous solution of the polymer and coating it to form a humidity sensitive thin film. Note that the polymer had Mn of about 60,000 prior to crosslinking. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. The output voltage versus relative humidity was the same as in Example 39. FIG. 66 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 41 Using the same coating solution as in Example 1, a humidity sensitive thin film was formed as in Example 1. The humidity sensitive thin film was coated and impregnated with a solution containing 0.25% by weight of amorphous Teflon (Teflon AF2400, E.I. duPont) in a saturated fluorine carbide (Florinato FC-43, Sumitomo 3M K.K.) by dipping. Air drying yielded a water-repellent coating, completing a humidity sensor. The humidity sensor was evaluated for output and examined by the water resistance test as in Example 1. The output voltage versus relative humidity was the same as in Example 1. FIG. 67 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 42 Using the same coating solution as in Example 2, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 2. FIG. 68 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 43 Using the same coating solution as in Example 3, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 3. FIG. 69 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 44 Using the same coating solution as in Example 4, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 4. FIG. 70 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 45 Using the same coating solution as in Example 5, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 5. FIG. 71 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 46 Using the same coating solution as in Example 6, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 6. FIG. 72 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 47 Using the same coating solution as in Example 7, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 7. FIG. 73 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 48 Using the same coating solution as in Example 8, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 8. FIG. 74 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 49 Using the same coating solution as in Example 9, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 9. FIG. 75 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 50 Using the same coating solution as in Example 10, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 10. FIG. 76 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 51 Using the same coating solution as in Example 11, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 11. FIG. 77 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 52 Using the same coating solution as in Example 12, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 12. FIG. 78 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 53 Using the same coating solution as in Example 13, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 13. FIG. 79 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 54 Using the same coating solution as in Example 14, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 14. FIG. 80 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 55 Using the same coating solution as in Example 15, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 15. FIG. 81 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 56 Using the same coating solution as in Example 16, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 16. FIG. 82 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 57 Using the same coating solution as in Example 17, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 17. FIG. 83 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 58 Using the same coating solution as in Example 18, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 18. FIG. 84 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 59 Using the same coating solution as in Example 19, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 19. FIG. 85 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 60 Using the same coating solution as in Example 20, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 20. FIG. 86 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 61 Using the same coating solution as in Example 21, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 21. FIG. 87 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 62 Using the same coating solution as in Example 22, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 22. FIG. 88 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 63 Using the same coating solution as in Example 23, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 23. FIG. 89 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 64 Using the same coating solution as in Example 24, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 24. FIG. 90 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 65 Using the same coating solution as in Example 25, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 25. FIG. 91 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 66 Using the same coating solution as in Example 26, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 26. FIG. 92 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 67 Using the same coating solution as in Example 27, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 27. FIG. 93 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 68 Using the same coating solution as in Example 28, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 28. FIG. 94 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 69 Using the same coating solution as in Example 29, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 29. FIG. 95 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 70 Using the same coating solution as in Example 30, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 30. FIG. 96 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 71 Using the same coating solution as in Example 31, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 31. FIG. 97 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 72 Using the same coating solution as in Example 32, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 32. FIG. 98 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 73 Using the same coating solution as in Example 33, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 33. FIG. 99 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 74 Using the same coating solution as in Example 34, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 34. FIG. 100 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 75 Using the same coating solution as in Example 35, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 35. FIG. 101 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 76 Using the same coating solution as in Example 36, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 36. FIG. 102 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 77 Using the same coating solution as in Example 37, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 37. FIG. 103 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 78 Using the same coating solution as in Example 38, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 38. FIG. 104 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 79 Using the same coating solution as in Example 39, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 39. FIG. 105 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Example 80 Using the same coating solution as in Example 40, a humidity sensitive thin film was formed as in Example 1. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. The output voltage versus relative humidity was the same as in Example 40. FIG. 106 shows the results of the water resistance test. The advantages of the present invention are evident from these results. Humidity sensitive thin films were prepared and humidity sensors were fabricated as in Examples 1-7, 9-11, and 13-40 except that a diamine compound and a dihalogen compound both other than the above-mentioned ones were used in different combinations, the amounts of these compounds added were changed in accordance with reaction scheme I (Example 1) and reaction scheme II (Example 11), and a compound having an ethylenically unsaturated reactive group was changed. For combinations of diamine and dihalogen compounds analogous to Examples 8 and 12, humidity sensitive thin films were prepared and humidity sensors were fabricated as in Example 1. These humidity sensors were similarly tested for output and water resistance, finding that results equivalent to those of Examples 1-40 were obtained depending on the particular diamine and dihalogen compounds and reaction conditions used. Comparative Example 1 A humidity sensor was fabricated in accordance with JP-A-55-10502 and examined for output as in Example 1. FIG. 107 shows plots of output voltage versus relative humidity. The humidity sensitive material used herein was poly(2-hydroxy-3-methacryloxypropyltrimethylammonium chloride) of the following formula. A humidity sensitive thin film was formed by coating a solution of this polymer to an electrode-bearing substrate, applying an ammonium bichromate solution to the coating, baking the coating, irradiating ultraviolet radiation for 2 or 3 minutes for crosslinking. It is seen from FIG. 107 that this sensor developed hysteresis in a region of RH 0% to 30%, suggesting inferior output property as compared with the inventive humidity sensors. Comparative Example 2 A humidity sensor was fabricated in accordance with the second embodiment of JP-A-60-113 140 and examined for output and water resistance as in Example 1. FIG. 108 shows plots of output voltage versus relative humidity. FIG. 109 shows the results of the water resistance test. The humidity sensitive material used herein was a polymer of the following formula which is formed by reacting equimolar amounts of N,N,N',N'-tetramethyl-1,6-diaminohexane and 1,6-dibromohexane in a mixture of acetonitrile and methanol in a volume ratio of 1:1. A humidity sensitive thin film was formed by dipping an electrode-bearing substrate in a coating solution containing 1 part by weight of the polymer and 16 parts by weight of polyvinyl pyrrolidone in 383 parts by weight of deionized water. It is seen from FIG. 108 that humidity is unmeasurable in a region of RH 0% to 10%. This is the same tendency as the inventive sensors wherein dibromo compounds are used as the dihalogen compound. FIG. 109 shows that this sensor is least resistant to water. This sensor does not satisfy both output property and water resistance as do the inventive sensors. Comparative Example 3 Using the same coating solution as in Comparative Example 2, a humidity sensitive thin film was formed as in Comparative Example 2. Then as in Example 41, a water-repellent coating was formed on the humidity sensitive thin film, completing a humidity sensor. The humidity sensor was tested for output and water resistance as in Example 1. FIG. 110 shows plots of output voltage versus relative humidity. FIG. 111 shows the results of the water resistance test. It is seen from FIG. 110 that this sensor has the same output property as in Comparative Example 2. It is seen from FIG. 111 that water resistance remains inferior despite the presence of a water-repellent coating on the humidity sensitive thin film. There has been described a humidity sensor which is fully resistant to water so that it ensures stable operation over a long time even in a dew condensing atmosphere. The sensor is free of hysteresis and able to measure humidity over a very wide range. Particularly when the counter ion to a quaternary ammonium salt group of the polymer is a chloride anion, measurement is possible even in a low humidity region of up to RH 10%. Then the sensor is able to measure humidity over the entire region of RH 0% to 100%. Japanese Patent Application No. 87866/1994 is incorporated herein by reference.

Claims: A humidity sensor comprising an insulating substrate, a pair of opposed electrodes disposed on the substrate and defining a gap therebetween, and a humidity sensitive thin film disposed on the gap, said humidity sensitive thin film containing a crosslinked product of a polymer of the following general formula (1): wherein A and B each are a divalent group, Y 1 , Y 2 , Y 3 , Y 4 , Y 5 , and Y 6 each are a monovalent group, at least one of Y 1 to Y 6 is a group terminated with an ethylenically unsaturated reactive group, at least two of Y 1 , Y 2 , Y 3 , Y 4 , Y 5 , A, and portions thereof adjoining the nitrogen (N) atom or at least two of Y 4 , Y 5 , Y 6 , B, and portions thereof adjoining the nitrogen (N) atom, taken together, may form a ring with the nitrogen atom, X - is a halide ion, and letter n is a number of 2 to 5,000. The humidity sensor of claim 1 wherein said polymer has the following formula (2) or (3): wherein A and B each are a divalent group, each of R 1 , R 2 , R 3 , and R 4 is an alkyl or alkenyl group, R 1 and R 2 , R 1 and A or a portion of A, R 2 and A or a portion of A, R 3 and R 4 , R 3 and A or a portion of A, R 4 and A or a portion of A, R 1 and R 3 , R 1 and R 4 , R 2 and R 3 , or R 2 and R 4 , taken together, may form a ring with the nitrogen (N) atom, R 5 and R 6 each are an alkyl or alkenyl group, L is a divalent group, R is a hydrogen atom or alkyl group, X - is a halide ion, and letter n is a number of 2 to 5,000. The humidity sensor of claim 1 or 2 wherein the halide ion represented by X - is a chloride ion. The humidity sensor of any one of claims 1 to 3 wherein the divalent group represented by A is an alkylene, alkenylene or arylene group or a mixture thereof. The humidity sensor of any one of claims 1 to 4 wherein the divalent group represented by B is an alkylene, alkenylene or arylene group in which at least one of an oxy group (-O-) and a carbonyl group (-CO-) may intervene or a mixture thereof. The humidity sensor of any one of claims 1 to 5 wherein said polymer is obtained by reacting a diamine compound with a dihalogen compound to form an intermediate polymer and introducing an ethylenically unsaturated reactive group into the intermediate polymer at each end. The humidity sensor of any one of claims 1 to 6 wherein said crosslinked product is obtained by exposing said polymer to radiation. The humidity sensor of any one of claims 1 to 7 which further comprises a water-repellent coating on said humidity sensitive thin film. A method for preparing a humidity sensor comprising the steps of: coating an aqueous solution of the polymer as set forth in any one of claims 1 to 6, and exposing the polymer to ultraviolet radiation for crosslinking, thereby forming a humidity sensitive thin film.

Inventors: TEZUKA SIN-ICHI, YOSHIMURA EMIKO, TEZUKA, SIN-ICHI, YOSHIMURA, EMIKO
Applicants: TDK CORP, TDK CORPORATION
Application year: 1995
Main classification: G01N27
IPC codes: G01N27