Somertons, pll
Attorneys at law
1025 Connecticut Avenue, N.W.
Suite 1000
Washington, D.C. 2003
Tel: 202.459.4651
Fax: 202.478.2980
www.somertons.com
Somertons, pll Attorneys at law1025 Connecticut Avenue, N.W. Suite 1000 Washington, D.C. 2003 Tel: 202.459.4651 Fax: 202.478.2980 www.somertons.com






EXHIBIT 5.1
August 31, 2026

The Board of Directors Tecogen Inc.
76 Treble Cove Road
Building 1
North Billerica, MA 01862

Re: Registration Statement on Form S-3

Ladies and Gentlemen:

We have acted as special securities counsel to Tecogen Inc., a Delaware corporation (“Company”), in connection with the preparation and filing by the Company with the Securities and Exchange Commission (“SEC”), on or about August 31, 2026, of a Registration Statement on Form S-3 (“Registration Statement”) under the Securities Act of 1933, as amended (“Securities Act”). The Registration Statement covers the reoffer and resale by the selling stockholders listed therein, and as set forth in the Registration Statement, of an aggregate of 4,507,603 shares of common stock, $.001 par value per share (“Shares”), of the Company. All of the Shares were acquired by the selling stockholders or their transferors in one or more private placement transactions exempt from the registration requirements under the Securities Act.

This opinion is being delivered in accordance with the requirements of Item 601(b)(5) of Regulation S-K under the Securities Act.

We have examined 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, 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. 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 such examination, we have assumed the genuineness of all signatures; the authenticity of all documents submitted to us as originals; the conformity to originals of all documents submitted to us as copies or specimens thereof; the authenticity of the originals of such documents, agreements and instruments submitted to us as copies or specimens; the conformity of the text of each document filed with the SEC through the SEC’s Electronic Data Gathering, Analysis and Retrieval System to the printed document reviewed by us; and the accuracy, completeness and authenticity of certificates of public officials.

In connection with the preparation of this opinion, we have reviewed such questions of law as we deemed necessary. We do not herein give any opinion with respect to the laws of any jurisdiction other than the laws of the District of Columbia, the general laws of the United States of America, Federal securities laws, and Delaware General Corporation Law (including the statutory provisions thereof, all applicable provisions of the Delaware constitution, and reported judicial decisions interpreting the foregoing), all as in effect on the date of this opinion. We are not rendering any opinion as to compliance with any Federal or state law, rule or regulation relating to securities, including but not limited to, state “blue sky” laws.









Somertons, pllc
The Board of Directors
Tecogen Inc.
August 31, 2026
Page | 2


Based upon the foregoing and subject to the qualifications and assumptions stated herein, the Shares have been duly authorized by all requisite corporate action on the part of the Company and are 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 believe that we are “experts” within the meaning of such term as used in the Securities Act or the rules and regulations of the SEC issued thereunder with respect to any part of the Registration Statement, including this opinion as an exhibit or otherwise.

This opinion is expressed as of the date hereof unless otherwise expressly stated, and we disclaim any undertaking to advise you of any subsequent changes in the facts stated or assumed herein or of any subsequent changes in applicable laws.


Very truly yours,


/s/ Somertons, PLLC
Somertons, pllc