Exhibit No. 10.59




SECOND AMENDMENT TO LOAN
AGREEMENT




This Second Amendment dated
as of June ____, 2010, by and between The PrivateBank and Trust Company
(“Lender”), and Advanced Photonix, Inc. (“Borrower”).




RECITALS




The Lender and Borrower entered into that
certain Loan Agreement dated September 25, 2008, as amended by one amendment
(the “Agreement”). Capitalized terms not defined herein shall have the meanings
ascribed to them in the Agreement.


Lender and Borrower desire to amend the
Agreement as set forth below.


NOW, THEREFORE, Lender and
Borrower agree as follows:




The following definitions in Section 1 of the
Agreement are amended to read as follows:


“‘Base Net Worth’ shall initially be Eleven Million
Eight Hundred Thousand Dollars ($11,800,000). On the last day of each fiscal
year of Borrower, Base Net Worth shall increase by ten percent (10%) of Net
Income for the fiscal year then ended. If Net Income for any fiscal year is less
than $0, it shall be deemed to be $0 for purposes of this
calculation.”




“‘Borrowing Base Amount’ shall mean an amount equal
to the sum of the following:




(a)
eighty percent (80%) of the then net book value (after deducting any discount or
incentive for early payment or any issued or unissued credit memos but without
deducting any bad debt reserve) of all Eligible Accounts;
plus




(b)
the lesser of: (i) fifty percent (50%) of the lower of cost or market value
(after deduction of such reserves and allowances as the Lender deems proper and
necessary) of Eligible Inventory; and (ii) $500,000.”




“‘Debt Service Coverage Ratio’ shall mean as of any
date of determination thereof a ratio the numerator of which is Adjusted EBITDA
for the applicable measuring period, plus the net cash proceeds of the issuance
by Borrower of any Eligible Capital Securities during such period and the
denominator of which is all payments of principal with respect to interest
bearing debt during such period (including the principal component of
Capitalized Lease obligations), plus interest expense for such period (including
the interest component of Capitalized Lease obligations), all as determined on a
consolidated basis for Borrower and its consolidated Subsidiaries in accordance
with GAAP. The applicable measuring period shall be (i) for any date of
determination occurring before June 30, 2011, the three month period then ending
and (ii) the preceding twelve (12) months ending on such date for any date of
determination occurring on or after June 30, 2011.”




74




---



The following Section 6.1(f) is added to the
Agreement:


“(f) Borrower shall deliver within thirty (30) days
after and as of the end of each month, its management-prepared financial
statement, including a consolidated balance sheet as of the end of such month, a
consolidated profit and loss statement for such month and fiscal year to date,
certified by a responsible authorized officer of Borrower, in a form acceptable
to Lender; provided, however, that the reporting requirements set forth in this
Section 6.1(f) shall not apply for any month that ends on a date that coincides
with the end of a fiscal quarter.”




Section 6.5 of the Agreement is amended to
read as follows:


“ 6.5 Financial Covenants .




(a)
Borrower shall maintain at all times a Debt Service Coverage Ratio of not less
than the following amounts for the periods specified below:




June 30, 2010 1.00 to 1.0September 30, 2010 1.00
to 1.0December 31, 2010 1.00 to 1.0  March 31, 2011 and thereafter 1.20 to
1.0




(b)
Borrower shall maintain at all times Adjusted EBITDA of not less than the
following amounts for the periods specified below:




June 30, 2010 $190,000September 30, 2010
$190,000December 31, 2010 $260,000March 31, 2011
$400,000  June 30, 2011 and thereafter
$1,160,000




Adjusted EBITDA shall be determined on a trailing
three (3) month basis for the June 30, 2010 through March 31, 2011 test dates
and thereafter on a trailing twelve month basis.




(c)
Borrower shall maintain at all times Net Worth of not less than the following
amounts during the periods specified below:




June 30, 2010 through September 29, 2010
$13,000,000September 30, 2010 through December 30, 2010
$12,500,000December 31, 2010 through March 30, 2011 $12,100,000March 31,
2011 and thereafter Base Net Worth”




Section 6.24 of the Agreement is amended to
read as follows:


“6.24 Bank Accounts. Borrower shall and shall cause
each of its Subsidiaries to maintain all primary deposit accounts at Lender and
Borrower shall maintain at all times in a blocked account maintained with the
Lender an amount of at least $500,000. Borrower grants to the Lender a first
priority security interest in such account.”




75




---



Section 6.28 of the Account is amended to read
as follows:


“6.28 Picometrix Debt .
Borrower shall not and shall cause its Subsidiaries not to make any payment with
respect to the existing indebtedness owed to the former shareholders of
Picometrix (“Picometrix Debt”) unless (a) Borrower is in pro forma compliance
with all financial covenants under this Agreement both before and after giving
effect to such payment (b) no Event of Default (or event which with the giving
of notice or the passage of time or both would constitute an Event of Default)
has occurred and is continuing and (c) Borrower shall have provided to the
Lender at least thirty (30) days prior written notice that the payment is to be
made with respect to the Picometrix Debt. At least ten (10) days prior to making
any such payment, Borrower shall provide to Lender a covenant compliance
certificate giving pro forma effect to such payment. Borrower shall not use more
than fifty percent (50%) of the proceeds of the issuance of any equity interests
to make payments with respect to the Picometrix Debt.”




Borrower violated the provisions of Section
6.5 of the Agreement for the fiscal quarters ended December 31, 2009 and March
31, 2010 (the “Covenant Violations”). The Lender hereby waives any event of
default under the Agreement resulting from the Covenant Violations. This waiver
shall not be deemed to amend or alter in any respect the terms and conditions of
the Agreement or any of the other loan documents, or to constitute a waiver or
release by the Lender of any right, remedy or event of default under the
Agreement or any of the other loan documents, except to the extent expressly set
forth above. Furthermore, this waiver shall not affect in any manner whatsoever
any rights or remedies of the Lender with respect to any other non-compliance by
the Borrower with the Agreement or the other loan documents whether in the
nature of an event of default or otherwise, and whether now in existence or
subsequently arising.


Borrower will reimburse the Lender for all
costs and expenses, including reasonable attorneys’ fees, incurred by the Lender
in connection with the preparation of this Amendment and the documents,
instruments and agreements executed in connection herewith.


Borrower hereby represents and warrants that,
after giving effect to the amendments and waiver contained herein, (a)
execution, delivery and performance of this Amendment and any other documents
and instruments required under this Amendment or the Agreement are within
Borrower’s powers, have been duly authorized, are not in contravention of law or
the terms of Borrower’s Articles of Incorporation or Bylaws, and do not require
the consent or approval of any governmental body, agency, or authority; and this
Amendment and any other documents and instruments required under this Amendment
or the Agreement, will be valid and binding in accordance with their terms; (b)
the continuing representations, warranties and covenants of Borrower set forth
in Section 5 of the Agreement and any other documents, instruments or agreements
executed in connection therewith, are true and correct on and as of the date
hereof with the same force and effect as if made on and as of the date hereof;
and (c) no event of default, or condition or event which, with the giving of
notice or the running of time, or both, would constitute an event of default
under the Agreement, has occurred and is continuing as of the date
hereof.




76




---



BORROWER WAIVES, DISCHARGES, AND FOREVER RELEASES LENDER, LENDER’S
EMPLOYEES, OFFICERS, DIRECTORS, ATTORNEYS, STOCKHOLDERS, AND THEIR SUCCESSORS
AND ASSIGNS, FROM AND OF ANY AND ALL CLAIMS, CAUSES OF ACTION, ALLEGATIONS OR
ASSERTIONS THAT BORROWER HAS OR MAY HAVE HAD AT ANY TIME UP THROUGH AND
INCLUDING THE DATE OF THIS AMENDMENT, AGAINST ANY OR ALL OF THE FOREGOING,
REGARDLESS OF WHETHER ANY SUCH CLAIMS, CAUSES OF ACTION, ALLEGATIONS OR
ASSERTIONS ARE KNOWN TO COMPANIES OR WHETHER ANY SUCH CLAIMS, CAUSES OF ACTION,
ALLEGATIONS OR ASSERTIONS AROSE AS RESULT OF LENDER’S ACTIONS OR OMISSIONS IN
CONNECTION WITH THE AGREEMENT OR ANY OTHER DOCUMENTS, INSTRUMENTS OR AGREEMENTS
IN CONNECTION THEREWITH, OR ANY AMENDMENTS, EXTENSIONS OR MODIFICATIONS THERETO,
OR BANK’S ADMINISTRATION OF THE DEBT UNDER THE AGREEMENT OR
OTHERWISE.




This Amendment shall be effective upon (a) the
execution by Borrower and Lender of this Amendment, (b) execution by the
Guarantors of the attached Affirmation of Guaranty, (c) execution by Borrower of
replacement notes in form acceptable to Lender, and (d) payment by Borrower to
Lender of a non-refundable amendment fee in the amount of
$30,000.


Borrower agrees to provide to Lender within 60
days after the execution of this Amendment evidence satisfactory to Lender that
the documents related to the Picometrix Debt have been amended to provide that
the required December 1, 2010 principal payment and maturity date of the
Picometrix Debt have been deferred until at least April 1, 2011. Failure to
comply with the provisions of this Section 11 shall be an Event of Default under
the Agreement.


Except as modified hereby, all of the terms
and conditions of the Agreement shall remain in full force and
effect.


This Amendment may be executed and
acknowledged in counterparts, each of which shall constitute an original and all
of which shall together constitute one and the same
Amendment.




77




---



THE PRIVATEBANK AND TRUST ADVANCED PHOTONIX,
INC.COMPANY




By :_ By :_




Its :_ Its :_




By :_




Its :_




AFFIRMATION OF
GUARANTY




The undersigned acknowledge
the foregoing Second Amendment to Loan Agreement, and ratify and confirm their
obligations under their Guaranty of Borrower’s obligations to the Lender and
acknowledge that the Guaranty remains in full force and effect in accordance
with its terms subject to no setoff, defense or counterclaim.




June ____, 2010 SILICON SENSORS, INC.




By:_Its:_By:_Its:_PICOMETRIX LLCBy:_Its:_By:_Its:_


78




---