Exhibit 23.1

CONSENT OF INDEPENDENT REGISTERED CERTIFIED PUBLIC ACCOUNTING FIRM

We have issued our report dated June 17, 2011, accompanying the financial statements of the Sun Hydraulics Corporation 401(k) and ESOP Retirement Plan included on Form 11-K for the year ended December 31, 2010. We hereby consent to the incorporation by reference of said report in the Registration Statements of Sun Hydraulics Corporation on Forms S-8 (File No. 333-30801, effective July 3, 1997, File No. 333-83269, effective July 20, 1999, File No. 333-62816, effective June 12, 2001, File No. 333-66008 effective July 27, 2001, File No. 333-119367, effective September 29, 2004, File No. 333-124174, effective April 19, 2005 and File No. 333-158245, effective March 27, 2009).

/s/ Mayer Hoffman McCann P.C.

Clearwater, Florida

June 17, 2011