Meet the NeuroStimDuino: an open source neurostimulator made with students and researchers in mind. It is an Arduino shield with 2 output channels that can be used to contract flexor and extensor muscles. It has a stackable design and safety features to limit the power density generated to stay within the safety margins.
The board can generate biphasic, rectangular and constant current stimulation pulses with programmable frequency, pulse-width, and amplitude. You can power it with a 9V battery. The below video gives you an idea what you can do with it: