Please note that any employment is only permitted with a suitable work permit*! This also includes research without a contract of employment.
If you can generally enter Germany visa-free, in the relevant cases you still need to apply for a visa, or you can only begin your work or research after a work permit has been issued in Germany.
*Exceptions may apply to research stays of no more than 90 days within a period of twelve months for persons who can enter the country without a visa (cf. §30 BeschV (Ordinance on the Employment of Foreigners)). This should be confirmed in advance by the responsible embassy.