Somertons, pllc
Attorneys at law

1025 Connecticut Avenue, N.W.
Suite 1000
Washington, D.C. 20036
www.somertons.com

June 23, 2022

The Board of Directors
Tecogen Inc.
45 First Avenue
Waltham, MA 02451
Re:    Registration Statement on Form S-8
Ladies and Gentlemen:

We have acted as special securities counsel to Tecogen Inc., a Delaware corporation (“Company”), in connection with the preparation and filing, on or about June 23, 2022, by the Company of a registration statement on Form S-8 (“Registration Statement”) under the Securities Act of 1933, as amended (“Securities Act”). The Registration Statement covers 3,800,000 shares of common stock, $.001 par value per share, of the Company (“Shares”) that may be issued pursuant to the Company’s 2022 Stock Incentive Plan (“2022 Plan”) and the subsequent reoffer and resale by certain selling shareholders of Shares issued to them under the 2022 Plan pursuant to the Registration Statement.

We have examined the 2022 Plan, the award agreements to be issued pursuant to the 2022 Plan, the Company’s Amended and Restated Certificate of Incorporation and Amended and Restated By-Laws, the minutes of various meetings and consents of the Company’s Board of Directors, the minutes of a meeting of stockholders, originals or copies of such records of the Company, agreements, certificates of public officials, certificates of officers and representatives of the Company and others, and such other documents, certificates, records, authorizations, proceedings, statutes and judicial decisions as we have deemed necessary to form the basis of the opinion expressed below. In such examination, we have assumed the genuineness of all signatures, the authenticity of all documents submitted to us as originals, and the conformity to originals of all documents submitted to us as copies thereof. As to various questions of fact material to such opinion, we have relied upon statements and certificates of officers and representatives of the Company and others.

In connection with the preparation of this opinion, we have reviewed such questions of law as we have deemed necessary. We do not herein give any opinion with respect to the laws of any jurisdiction other than the general laws of the United States of America, the Federal securities laws, and Delaware General Corporation Law (including the statutory provisions, all applicable provisions of the Delaware constitution and reported judicial decisions interpreting the foregoing).

Based upon the foregoing, we are of the opinion that the Shares, when issued and paid for in accordance with the 2022 Plan and award agreements issued pursuant to the 2022 Plan, will be validly issued, fully paid and non-assessable.

We hereby consent to be named in the Registration Statement and the prospectus contained therein as attorneys who have passed upon legal matters in connection with the offering of the securities described therein under the caption “Legal Matters.” We further consent to your filing a copy of this opinion as an exhibit to the Registration Statement. In giving such consent, we do not thereby admit that we are included in the category of persons whose consent is required under Section 7 of the Securities Act, or the rules and regulations of the Securities and Exchange Commission thereunder.

                    Very truly yours,
                     
                    /s/ Somertons, PLLC