I am trying to use the GPIO pins on my Raspberry Pi to send a voltage signal to the throttle signal wire on the VEC200 controller to drive the HPM3000 BLDC motor. I know the setup works because I was able to get the motor to spin on its own by connecting the throttle to the Pi in some weird way. After playing around with some things, I now get no response from the motor and 12 LED blinks indicating the "Throttle input is abnormal" which is not very helpful. I tried connecting the throttle signal wire to a 3.3V output, as well as a 5V output (not at the same time), expecting the motor to run constant at maximum throttle. I understand that there may be a safety feature which stops the motor if the throttle signal is not initialized to be ~0.8-1V, so I wrote a program to allow me to change the pin output from LOW to HIGH (~1V to ~3.3V), expecting the throttle to turn off and on. I also tried using PWM to send 25% duty cycle (~0.8V) and then 100% duty cycle (3.3V) to the throttle signal wire. I adjusted throttle voltage inputs in the VEC200 controller programming software, but I still get the 12 LED blinks and no throttle activation.
SOLVED!!! PWM signal is required to communicate with the signal pin on the VEC200 motor driving controller. It turns out the pwm functions I was using from the bcm2835 gpio library for the Raspberry Pi were not working. I even used the example pwm.c script from the bcm2835 github page and it was not writing any signals. I used the wiringPi library available for the Raspberry Pi to write the pwm signal to the throttle signal wire. My script was set up like a push button script. If the button wasn't being pressed, 0.25% duty cycle pwm signal (~0.8V) was written to the throttle signal wire so that the VEC would recognize the signal as a proper hall throttle (even though it is just a Raspberry Pi, the motor would do nothing at this point); if the button was being pressed, 100% duty cycle pwm signal (~3.3V) which started spinning the motor. This gave me momentary control for as long as the script was running. As far as the two other wires on the throttle harness (5V red and Ground black), the ground wire should be connected to the Raspberry Pi's ground, to complete its circuit for the throttle signal wire to receive voltage from the Raspberry Pi; because the Raspberry Pi can have its own power supply, the 5V wire is not needed for now, but should have its connection covered, since the ground wire is connected to the Pi, you don't want any accidental connections.
Notes: The nominal pwm clock rate for the wiringPi library (100 MHz I believe) seemed to work fine for this application.
I noticed there are not a ton of examples found online of others controlling their motor drivers, specifically for motors of this scale, with separate open-source programmable microcontrollers as opposed to traditional e-bike throttles and breaks and such. This thread could be helpful for anyone who is trying to automate their application of electric motors or, like in my case, trying to control their motor from 1000m away!. Has anyone tried using microcontroller GPIO pins to communicate with electric motor drivers (VEC) and found success? If so, please reply to this post.