The invention provides a device for stimulating peripheral nerves, comprising a memory, at least one electrode attached to the patient's body for generating pulses, and a control unit connected with an electrode for setting at least one electrode pulse parameter. The device further includes a detector of response to neuromodulation connected with a control unit for transmitting information on a frequency of movement of at least a part of the body to the control unit, and a controller connected with the control unit for acquiring a user input. The control unit of the device further sets flow of current of electrode pulses automatically, depending on information on a frequency value of movement of a part of the body. The invention further provides a method for treating the syndromes of an overactive bladder using a neuromodulation device. And method of collecting information of such devices.