This repository provides a modified version of the Pulse Pal firmware and Python API.
Original project by Sanworks LLC: https://github.com/sanworks/PulsePal
-
Ramps: Whenever an output channel activated by a trigger is stopped externally (for example, by a second trigger in toggle mode or by the signal going low in pulse-gated mode),the channel ramps smoothly from its current voltage down to the defined resting voltage, using the programmed ramp duration.
-
Persistent custom trains: Originally, Pulse Pal allowed storing 2 custom trains or waveforms in memory, but they were erased on reset. With this modification, custom trains are stored persistently and can be used in standalone mode (running only on power, without a PC or Raspberry Pi connection).
- Download and install Arduino from: https://www.arduino.cc/en/Main/Software
- Launch Arduino
- Open the boards manager from the left-hand toolbar.
- Under "Arduino SAM Boards (32-bits ARM Cortex-M3)", if it is not already installed, choose "Install"
- Close the boards Manager.
- Download the latest release of SDFat library version 1, extract it and put it in /Documents/Arduino/libraries/
- Select: File > Open and choose /PulsePal/Firmware/PulsePal_Mod/PulsePal_Mod.ino
- Select Tools > Board > Arduino Due (Native USB Port)
- Select Tools > Port > (whichever port appears when you connect Pulse Pal, and disappears when it is disconnected)
- Press "Upload" - the right-pointing arrow below in the first toolbar above the code
If all goes well, after a few seconds you should see some orange text in the black
console window that
says
"Verify successful... CPU reset."
- Read the Pulse Pal Wiki for a description of the parameters and commands.
- Read carefully the included example.py for guidance.
- Write your own Python script to configure channels and triggers.
- If you define custom trains (2 slots available), they will be saved automatically
with the rest of your parameters when you call
saveSDSettingsat the end of your script. - Connect Pulse Pal to your computer or Raspberry Pi.
- Identify its serial port and update the
addressvariable in your script. - Run your script to apply configuration.
- Now you can disconnect the Pulse Pal from the computer and use it in standalone mode.
- Connect your Pulse Pal to a power supply.
- Configurations can be reloaded:
- From Python using
loadSettings - Directly from the Pulse Pal joystick
- If your configuration was saved as default.pps, the configuration will load automatically every time the device powers on.
- From Python using
- Always verify pulses with an oscilloscope before experimental use.
- You may first test them using the joystick to manually trigger pulses, but you should always run a final test with the actual Bpod task and Bpod-generated triggers to ensure full compatibility.