Exhibit 23.1

CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM

We consent to the reference to our firm under the caption “Experts” in this Registration Statement (Form S-3) and related Prospectus of Sun Hydraulics Corporation for the registration of common stock and to the incorporation by reference therein of our report dated March 1, 2016, with respect to the consolidated financial statements of Sun Hydraulics Corporation and the effectiveness of internal control over financial reporting of Sun Hydraulics Corporation included in its Annual Reports (Form 10-K) for the years ended January 2, 2016 and December 27, 2014, filed with the Securities and Exchange Commission.

/s/ Mayer Hoffman McCann P.C.

Clearwater, Florida

January 29, 2018