EXHIBIT 10.4

                        CONSULTING AND ADVISORY AGREEMENT



<PAGE>

EXHIBIT 10.4



                        CONSULTING AND ADVISORY AGREEMENT

                                 BY AND BETWEEN

                                   XSUNX, INC.

                                       AND

                                 DR. ARUN MADAN





<PAGE>



                        CONSULTING AND ADVISORY AGREEMENT


         THIS CONSULTING AGREEMENT ("Agreement"), made effective as of the 17th
day of September, 2004, is entered into by and between Xsunx, Inc., a Colorado
corporation ("Company"), and Dr. Arun Madan, an individual ("Consultant"). The
Company and Consultant are sometimes herein referred to individually as a
"party" and collectively as the "parties".


                                 R E C I T A L S

         WHEREAS, Consultant is currently a shareholder of, and employed by,
MVSystems, Inc. a Colorado corporation ("MVS") which has developed technology
pertaining to solar cells, thin film resistors, imaging, spatial light
modulators, memory devices, and other technology related to amorphous silicon
and related alloys which is of interest to the Company;

         WHEREAS, the Company, Consultant, and MVS have entered into a
Technology Sharing and License Agreement ("Technology Agreement") which
contemplates that the company will retain the services of the Consultant for the
purposes stated herein. Capitalized terms herein will have the same meaning as
those in the Technology Agreement;

         WHEREAS, Consultant is a part time research professor at Colorado
School of Mines and is engaged in research in the technology of MVS and other
related fields and shall also continue to be employed as the President and CEO
of MVS; and

         WHEREAS, the Company desires to obtain the services of Consultant and
Consultant desires to provide the Company with consultancy and advisory services
as contemplated in the Technology Agreement and pursuant to the terms and
conditions contained herein; and

         WHEREAS, the undersigned parties desire to formalize such consultant
relationship;

         NOW, THEREFORE, in consideration of the promises, mutual covenants and
agreements contained herein, and other good and valuable consideration, the
receipt and sufficiency of which are hereby acknowledged, the parties to this
Agreement agree as follows:

                                       1

<PAGE>


         1. Engagement of Services. The Company hereby engages Consultant as an
independent contractor to provide consulting and advisory services as set forth
herein. All such consulting and services shall be performed in accordance with
the terms and conditions contained herein. Consultant hereby accepts such
engagement in accordance with such terms and conditions.


         2. Services of Consultant. Consultant shall, in its sole discretion,
provide consultancy and advisory services under the title of Chairman of the
Scientific Advisory Board. Notwithstanding the foregoing title Consultant shall
remain an independent contractor. Consultant shall provide such services
incident thereto as may be necessary from time to time which services shall
include, without limitation, providing the Company with his best efforts and
technical expertise in advising the Company in the areas of research &
development, process development, planning, product specifications, third party
technical and resource requirements, scheduling, and management of developing
intellectual assets pertaining to the Business of XsunX and the XsunX Field of
Use. Consultant is not a corporate officer or director of XsunX and will not be
represented as such.

         2.1. Consultant shall provide such other related services as may be
requested of Consultant by the Company and as are not inconsistent with the
provisions of this Agreement or the Technology Agreement. Consultant agrees to
devote Consultant's best efforts, skills, and technical expertise to the
business of the Company, to do Consultant's utmost to further enhance and
develop the interests and welfare of the Company, and to devote necessary time
and attention to the business of the Company, while recognizing Consultant's
duties to MVS.

         2.2. Consultant shall truthfully and accurately make, maintain and
preserve all records and reports that the Company may, from time to time,
request or require, and shall fully account for all money, records, equipment,
materials or other property belonging to the Company of which Consultant may
have custody and shall pay over and deliver same promptly whenever and however
Consultant may be directed to do so.

         2.3. Consultant shall make available to the Company any and all
information of which Consultant has knowledge that is relevant to the Company's
business, but is not otherwise prohibited from disclosing, and make all
suggestions and recommendation which Consultant believes will be of benefit to
the Company.

         2.4. Consultant shall, at his own cost, prepare for and attend such
meetings as may be reasonably requested by the Company, provided, however, that
the Company shall pay for the reasonable travel and lodging costs incurred by
Consultant in regard to the foregoing. The Company may request at least one
meeting per month for the purpose of discussion of the development matters
referenced hereinabove, and the conformance or variance of the foregoing to or
with the Business of XsunX.

                                       2

<PAGE>

         3. Duty to MVS. The parties recognize that Consultant is and shall
remain employed by MVS and that as a shareholder, officer, director, and/or
employee of MVS, Consultant shall devote time and effort to the business of MVS.
Notwithstanding the same, Consultant shall conform Consultants' conduct to the
fiduciary duties of confidentiality and loyalty owed to the Company. In that
regard, Consultant shall inform the Company at the earliest opportunity at such
time as Consultant may perceive a potential conflict of interest with regard to
Consultant's duties to MVS and Consultant's duties to the Company. Consultant
shall not make any unauthorized disclosure of the confidential information of
MVS to the Company. Consultant shall not make any unauthorized disclosure of the
confidential information of the Company to MVS (or any other party not permitted
to receive such information).

         4. Compensation.  For and in consideration of the performance by
Consultant of the services, terms, conditions, covenants and promises herein
recited, the Company agrees and promises to pay to Consultant at the times and
in the manner herein stated and as set forth below:

         4.1. As the principal consideration of the services to be performed by
Consultant hereunder during the term of this Agreement, Consultant shall receive
from the Company a grant of a Consultancy and Advisory Warrant for the purchase
of up to One Million (1,000,000) shares of common voting stock of the Company.
Such warrant will vest in accordance with the vesting provisions set for within
an appropriate warrant agreement ("Warrant Instrument"). Except as otherwise set
forth herein, the warrant shall constitute the sole compensation of Consultant
hereunder. Such compensation may sometimes be herein referred to as Consultant's
"Base Compensation".

         4.2. The Company will, in addition to Consultant's Base Compensation,
pay Consultant a cash bonus if the Company realizes certain minimum gross profit
attainment during the term of each full fiscal year during the term of
Consultants engagement. The cash bonus will be based upon the following
schedule:

Year End Projected Gross Profit   Minimum Attainment        Cash Bonus

9/30/05  $    1,300,000                   30% Minimum     $  10,000.00
                                          100% Maximum    $  50,000.00
----------------------------------------------------------------------

9/30/06  $  17,400,000                    30% Minimum    $  80,000.00
                                          100% Maximum    $250,000.00
---------------------------------------------------------------------

The foregoing schedule shall apply with regard to the first two (2) years of
Consultants engagement under this Agreement. During this term Consultant shall
be entitled to the specified minimum cash bonus upon the Company's attainment of
at least thirty (30%) percent of the projected gross profit for that year. The
Consultant may receive up to the maximum cash bonus or the apportioned amount
thereof for each percent of attained projected gross profits above 30% up to
100%. This additional compensation will be computed on an annual basis upon the

                                       3

<PAGE>

end of the Company's fiscal year end and paid to Consultant within sixty days of
completion of an annual audit specific to the performance of Consultant and the
books of the Company.

         4.3. Starting in the third (3rd) year, and continuing for the term of
this Agreement, the Consultants cash bonus will be adjusted either up to reflect
an increase in gross profit or down to reflect a decrease in gross profit by a
percentage amount equal to the realized increase or decrease thereof as compared
to the actual amounts from the preceding year.

          4.4. The Company shall reimburse Consultant, from time to time, upon
Consultant's submission of expense account and supporting documents as required
by the Internal Revenue Service, for all reasonable out of town travel,
entertainment, and other ordinary, reasonable and necessary business expenses
incurred by Consultant as part of and in connection with the direct performance
of duties specified herein.

          5.      Relationship of the Parties

          5.1 Legal Status. Consultant shall be an independent contractor of the
Company in accordance with the provisions of Sections 2750.5 and 3353 of the
California Labor Code, or any other corresponding provision of the Colorado
Revised Statutes, and not an employee, agent, or partner. It is expressly
declared that such independent contractor status is bona fide and not a
subterfuge to avoid employee status. This Agreement shall not create an
employer-employee relationship and shall not constitute a hiring of such nature
by either party.

          5.2. Items Furnished to Consultant. Unless expressly agreed in writing
otherwise by the parties, the Company shall not provide any telephone equipment
or services, office equipment, stationery, secretarial or office support
services or other items or services for the benefit of Consultant. Consultant
shall, at its own expense, provide and make arrangement for all equipment,
stationery, secretarial and office support services.

          5.3. Consent of Company. Consultant shall have no right or authority
at any time to make any contract or binding promise of any nature on behalf of
the Company, whether oral or written, without the express prior written consent
of the Company.

          5.4. Manner of Performing Services. Consultant shall retain all
discretion and judgment in regard to the manner and means of carrying out its
duties hereunder subject, however, to the reasonable requests of the Company.
Consultant shall have the right to control and discretion as to the manner of
performance of its services hereunder in that the result of the work and not the
means by which it is accomplished shall be the primary factor for which the
parties have bargained hereunder in accordance with Sections 2750.5 and 3353 of
the California Labor Code or any corresponding provision in the Colorado Revised
Statutes. Consultant's obligations for performance of services hereunder shall
be limited to the completion of the consultation and services described above in
accordance with the Business of XsunX and the XsunX Field of Use. Consultant

                                       4

<PAGE>

shall have no obligation to work any particular hours or days or any particular
number of hours or days. The Company shall have no right to control or direct
the details, manner or means by which Consultant accomplishes the results of the
services performed hereunder.

          5.5. Payment of Taxes. Consultant shall be responsible for and pay
Consultant's own self-employment taxes, estimated tax liabilities, business
equipment or personal property taxes and other similar obligations, whether
federal, state or local. The Company shall not pay or withhold any FICA, SDI,
federal or state income tax or unemployment insurance or tax or any other
amounts because the relationship of the parties hereto is not that of
employer-employee, but that of independent contractor. Consultant shall be
solely responsible for the payment of all taxes, withholdings and other amounts
due in regard to Consultant's own employees.

          5.6. Employees of Consultant.  Consultant may subcontract with and/or
employ such parties upon such terms and conditions as it may deem proper or
necessary.

          6.      Warranties and Indemnification

          6.1. Warranties. Consultant warrants and represents that the services
of Consultant's subcontractors or employees shall be performed in full
compliance with the terms and conditions of this Agreement, and, that all
services performed hereunder shall be performed in accordance with all federal,
state and local laws, rules or regulations.

          6.2. Indemnification by Consultant. Consultant shall indemnify, defend
and hold the Company and the property of the Company, free and harmless from any
and all claims, losses, damages, injuries, and liabilities, including the
Company's reasonable attorney fees and costs (the Company may choose its own
counsel when defended hereunder), arising from or in any way connected with the
performance of services under this Agreement or any other act or omission by
Consultant, its agents, subcontractors, or employees.

          6.3. Indemnification by the Company. The Company shall indemnify,
defend and hold Consultant and the property of Consultant, free and harmless
from any and all claims, losses, damages, injuries, and liabilities, including
Consultant's reasonable attorney fees and costs, arising from or in any way
connected with any act or omission on the part of the Company, its constituent
partners, agents, subcontractors, or employees.

         7. Term. Consultant's engagement pursuant to this Agreement shall be
for a period of five (5) years and shall commence upon the date of execution
hereof (the "Commencement Date") and shall continue to and including September
17, 2009 (the "Termination Date") unless earlier terminated in accordance with
the provisions of Paragraph 8 of this Agreement; provided further that the term
of this Agreement may be extended by the mutual agreement of the parties hereto.

                  8. Termination. Notwithstanding any other provision of this
Agreement to the contrary, either party may terminate this Agreement at any time
upon ninety (90) days prior written notice to the other. This Agreement may also
be terminated by the Company, at its option, at any time during the term of this

                                       5

<PAGE>

Agreement without notice, for good cause. Termination for good cause shall
include, but not be limited to, any of the following:

         8.1. The commission by Consultant of an act of fraud or other act
materially evidencing bad faith or dishonesty;

         8.2. The misappropriation by Consultant of any funds or property or
other rights of the Company;

         8.3. The suspension or removal or termination of Consultant by or at
the request or requirement of any governmental authority having jurisdiction
over the Company;

         8.4. The breach by Consultant of any material terms of this Agreement
or any other agreement between Consultant on the one hand and the Company, or
any affiliate of the Company, on the other hand, including, but not limited to,
the Technology Agreement;

         8.5. Upon the death of the Consultant.

         9. Confidentiality.  Information derived or provided as part of the pro
-visions of the Technology Agreement specific to the Licensed Patents and Tech-
nology, the Derivative Works, and the intellectual property of MVS and Dr.
Madan, shall be governed by the terms of the Technology Agreement.

         9.1 All information derived or provided to Consultant under the terms
and specific to the performance of this Agreement, including lists and
databases, and any part of such lists, databases, or information, pertaining to
customers, merchants, salespersons, financial records, computer software
programs, strategic plans, contracts, agreements, literature, manuals,
brochures, books, records, correspondence, computer programs, software, source
codes, computations, data files, algorithms, techniques, processes, designs,
specifications, drawings, charts, plans, schematics, computer disks, magnetic
tapes, books, files, records, reports, documents, Instruments, agreements,
contracts, correspondence, letters, memoranda, financial, accounting, sales,
purchase and consultant data, capital structure information, corporate
organizational information, identities, names and address of, and any
information pertaining to, shareholders, directors, officers, consultants,
contractors, vendors, suppliers, customers, clients, lenders, financing and
business participants, and all persons associated with the Company, information
pertaining to business models, business plans, projections, assumptions and
analyses, particular projects, and all other data and information and similar
items relating to the business of the Company and all other data and information
and similar items relating to the Company of whatever kind or nature and whether
or not prepared or compiled by the Company and all other materials furnished or
made available to Consultant by the Company or any of its affiliates (as
hereinafter defined) relating to the business conducted by the Company
("Confidential Information"), is and are proprietary and confidential and are
and shall remain the sole property of the Company. Affiliate as used in this

                                       6

<PAGE>

section shall mean the Company, any entity in which Company owns a majority
ownership (directly or indirectly), or any entity which owns a majority
ownership of Company (directly or indirectly). Consultant acknowledges that the
Confidential Information derives independent economic value, actual or
potential, from not being generally known to the public or to other persons who
can obtain economic value from its disclosure or use and that this
confidentiality provision constitutes efforts that are reasonable under the
circumstances to maintain the secrecy thereof. Consultant further acknowledges
that the Confidential Information constitutes trade secrets pursuant to
California Civil Code ss.3426.1. Consultant shall not, directly or indirectly,
at any time during or after termination of consultant use or reveal, divulge,
disclose, disseminate, distribute, license, sell, transfer, assign or otherwise
make known, directly or indirectly, the Confidential Information to any person
or entity not expressly authorized by the Company to receive such Confidential
Information.

         9.2 Consultant shall exercise the highest degree of care and discretion
in accordance with the duty of Consultant hereunder to prevent improper use or
disclosure of the Confidential Information and will retain all such Confidential
Information in trust in a fiduciary capacity unless: (i) such use or disclosure
has been authorized in writing by the Company through an officer or director, or
(ii) is required to be disclosed by law, a court of competent jurisdiction or a
governmental or regulatory agency. Further, Consultant shall return and deliver
all such materials, including all copies, remnants, or derivatives thereof to
the Company upon the termination of consultant with the Company or at any other
time upon request by the Company.

         10. Patents and Inventions. Other than for Derivative Works as
contemplated and governed under the terms and conditions of the Technology
Agreement any interest in patents, patent applications, inventions,
technological innovations, copyrights, copyrightable works, developments,
discoveries, designs, and processes which Consultant now or hereafter during the
period Consultant is retained by the Company under this Agreement or otherwise
and for three (3) years thereafter may own, conceive of, or develop and either
relating to the fields in which the Company may then be engaged or contemplates
(as demonstrated by the records of the Company) being engaged or conceived of or
developed utilizing the time, material, facilities, or information of the
Company ("Inventions") derived outside of the specific performance under the
terms of the Technology Agreement shall belong to the Company. As soon as
Consultant owns, conceives of, or develops any such Invention, Consultant agrees
immediately to communicate such fact in writing to the Secretary of the Company,
and without further compensation, but at the Company's expense (except as
otherwise set forth herein), immediately upon request of the Company, Consultant
shall execute all such assignments and other documents (including applications
for patents, copyrights, trademarks, and assignments thereof) and perform any
and all acts as the Company may reasonably request in order (a) to vest in the

                                       7

<PAGE>

Company all Consultant's right, title, and interest in and to such Inventions,
free and clear of liens, mortgages, security interests, pledges, charges, and
encumbrances arising from the acts of Consultant and (b), if patentable or
copyrightable, to obtain patents or copyrights (including extensions and
renewals) therefore in any and all countries in such name as the Company shall
determine.

         11. Assignment. The obligations of Consultant under this Agreement are
unique and may not be assigned.

         12. Securities Compliance. No Offer or Sale. This Agreement is not
intended to be an offer for the sale or issuance of securities, whether
pertaining to stock, options, or otherwise, unless the same is exempt from
registration and qualification pursuant to an applicable exemption. The issuance
of stock and warrants is expressly subject to compliance with all state and
federal securities laws, rules and regulations by the parties. While the Company
does not consider this Agreement itself to be a securities or offer of any
securities, whether pertaining to stock, warrants, or otherwise, in the event
that this letter is construed to be an offer, the parties acknowledge the
following disclosure in accordance with Section 25102(a) of the California
Corporations Code:

                  The sale of the securities which are the subject of this
                  agreement has not been qualified with the Commissioner of
                  Corporation of the State of California and the issuance of
                  such securities or the payment or receipt of any part of the
                  consideration therefore prior to such qualification is
                  unlawful, unless the sale of securities is exempt from the
                  qualification by Section 25100, 25102, or 25105 of the
                  California Corporations Code. The rights of all parties to
                  this agreement are expressly conditions upon such
                  qualification being obtained unless the sale is so exempt.

         12.1 General Securities Compliance. Notwithstanding anything contained
in this Agreement to the contrary, this Agreement, and the stock warrants
discussed herein, shall be, and are, expressly subject to all SEC and
securities, laws, rules, regulations and reporting and disclosure requirements,
to the extent applicable to the Company as a reporting company, the shares,
and\or any party hereto, including, but not limited to, shareholder voting and
proxy solicitation rules. All issuances, sales, transfers, or other dispositions
of shares of the Company shall be made in compliance with all applicable
securities laws, rules and regulations, and pursuant to registration of
securities under the Securities Act of 1933 ("Act") (and qualification under
General Corporation Law of California) or pursuant to an exemption from
registration under the Act (and qualification under General Corporation Law of
California). Notwithstanding the foregoing, nothing in this Agreement shall
obligate the Company to seek registration or qualification of any of its shares,
and, to the extent that any obligation hereunder cannot be performed without
registration or qualification of any of its shares, such obligation shall be
excused on the part of the Company to the extent that the Company provides other
adequate consideration therefore.

         13. Rule 144.  Dr. Madan acknowledges that the shares of the Company
may be subject to the restrictions on transfer set forth in Rule 144 of the

                                       8

<PAGE>

Rules promulgated under the Act. Any and all offers, sales, transfer or other
dispositions of shares of the Company shall be made only in compliance with Rule
144. Dr. Madan agrees to comply with all policies and procedures established by
the Company with regard to Rule 144 matters.  Dr. Madan acknowledges that the
Company or its attorneys or transfer agent may require a restrictive legend on
the certificate or certificates representing the shares pursuant to the restric-
tions on transfer of the shares imposed by Rule 144.

         14.  Amendments.  This Agreement may be amended only in writing execut-
ed by Consultant and Company and approved in writing by the majority vote of the
Board of Directors of the Company.

         15.  Effect of Headings.  The subject headings of the paragraphs and
subparagraphs of this Agreement are included for purposes of convenience only,
and shall not affect the construction or interpretation of any of its
provisions.

         16. Parties in Interest. Nothing in this Agreement, whether express or
implied, is intended to confer any rights or remedies under or by reason of this
Agreement on any persons other than the parties to it and their respective
successors and assigns, nor is anything in this Agreement intended to relieve or
discharge the obligation or liability of any third persons to any party to this
Contract, nor shall any provision give any third person any right of subrogation
or action over against any party to this Agreement.

         17. Recovery of Litigation Costs. If any legal action or any
arbitration or other proceeding is brought for the enforcement of this
Agreement, or because of an alleged dispute, breach, default or
misrepresentation in connection with any of the provisions of this Agreement,
the successful or prevailing party or parties shall be entitled to recover as an
element of their damages, reasonable attorneys' fees and other costs incurred in
that action or proceeding, in addition to any other relief to which they may be
entitled.

         18.  Gender; Number.  Whenever the context of this Contract requires,
the masculine gender includes the feminine or neuter gender, and the singular
number includes the plural.

         19.  Time of Essence.  Time shall be of the essence in all things
pertaining to the performance of this Agreement unless waived in writing by the
undersigned parties.

         20. Authority. The parties to this Agreement warrant and represent that
they have the power and authority to enter into this Agreement in the names,
titles and capacitates herein stated and on behalf of any entities, persons or
firms represented or purported to be represented by each respective party.

         21. Waiver. A Waiver by either party of any of the terms and conditions
of this Agreement in any instance shall not be deemed or construed to a waiver
of such terms of condition for the future, or of any subsequent breach thereof,

                                       9

<PAGE>

or of any other term and condition of this Agreement. All waivers must be made
in writing executed by the waiving party.

         22. Entire Agreement. This Agreement and the Technology Agreement
constitute the entire agreement between the parties respecting the subject
matter hereof, and there are no representations, warranties, agreements or
commitments between the parties hereto except as set forth herein and therein;
provided that the terms of any Option or Award may be set forth in a Grant
Instrument, which shall be read in conjunction with this Agreement and the
Technology Agreement. This Agreement shall control over any and all provisions
or guidelines contained in any Consultant Manual, Consultant Handbook, Company
Policy Manual or other similar document. Consultant expressly acknowledges that
no Consultant Manual, Consultant Handbook, Company Policy Manual or other
similar document is or shall become a contract between the Company and
Consultant.

         23. Notices. Any notice, request, demand or other communication
permitted to be given hereunder shall be in writing and shall be deemed to be
duly given when personally delivered to an Consultant officer of the Company or
to Consultant, as the case may be, or when deposited in the United States mail,
by certified or registered mail, return receipt requested, postage prepaid, at
the respective addresses of the Company and Consultant as shown on the signature
page hereto. Either party may change by notice the address to which notices are
to be sent.

         24.  Severability.  If any provision of this Agreement shall, for any
reason, be held unenforceable, such provision shall be severed from the
contract.  The invalidity of such specific provision, however, shall not affect
the enforceability of any other provision herein, and the remaining provision
shall remain in full force and effect.

         25. Choice of Law and Venue. This Agreement shall, to the fullest
extent allowed by law, be construed, interpreted and enforced in accordance with
the laws of the State of Colorado, without regard to or application of conflict
of law rules, and the venue in regard to any disputes arising hereunder shall,
to the fullest extent allowed by law, be in Jefferson County, Colorado.

         26. Press Releases. Any press release, company disclosures and
advertisement made by the Company relating to Consultant shall be subject to the
approval of Consultant prior to public release. Consultant will not unreasonably
withhold such approval and agrees to respond to such requests for approval
within two (2) business days.

                                       10

<PAGE>

IN WITNESS WHEREOF, this Agreement is made effective by Consultant and the
Company on the date set first forth above.

                                                 COMPANY:

                                                 Xsunx, Inc.,
                                                 a Colorado corporation


                                                 By: /s/ Tom M. Djokovich
                                                     ---------------------------
                                                     Tom M. Djokovich, as CEO


                                                 CONSULTANT:

                                                 /s/ Dr. Arun Madan
                                                 ----------------------------
                                                 Dr. Arun Madan, as Consultant












                                       11