Control a PMAC motor + Mega 2560 + PID controller

Hello everyone,

I am new here and currently working on a school project. It is a long-time project but let me start by asking if this is even possible to do.

We own one of these motors: http://www.electricmotorsport.com/motenergy-me1117-pmac-motor-24-48v-6-hp-cont-19-hp-pk.html

The motor runs on its own controller: http://www.electricmotorsport.com/sevcon-gen4-36-48-275.html

As of right now, we control the speed of the motor through a potentiometer.

Our idea is to use the Mega 2560 + PID controller to create a closed feed-back system base on the reading from the Voltage of the battery. What we thought was just to send signals from one of the analog pins to replace the use of the potentiometer. I don't know if this is even possible so correct me if I am wrong.

If this sounds it can be done, would there be any extra items/parts/devices required to start this?

Any comments/ideas are highly appreciated.

It seems to be basic in principle, you output will be to the VFD which should change the speed of the motor. But your idea of using a digital controller like the arduino to output a analog signal is difficult and would most likely require a DAC, Digital to Analog Converter. https://en.wikipedia.org/wiki/Digital-to-analog_converter

The A0 A1, ect pins are analog in only. The arduino has a ADC, digital to analog converter, which gives a ADC count. A numerical value that linearly represents the the input voltage from 0v to AREF (5V by default) with a value from 0-1023, this is the equation ADC=(1024/AREF)InputV

But what I did see was that the VFD has some IO and CAN if you can get me the datasheet i can look and see which pins we can configure to accept inputs. And what kind of inputs the VFD would like to see. The arduino is capable I2C and SPI, and Serial. Also it can out put a PWM signal, and there is a library to modify the PWM frequency.

You also stated you wanted a feedback loop, PID control is versatile, you said you wanted to use remaining battery voltage as the PV, this will not work for PID as it will only go down, so the error will for ever grow. Shaft speed or torque will be ideal.

"Integrated I/O

Gen4 includes a fully-integrated set of inputs and outputs (I/0) designed to handle a wide range of vehicle requirements. This eliminated the need for additional external I/O modules or vehicle controllers and connectors. - 8 digital inputs - 2 analogue inputs (can be configured as digital) - 3 contactor/solenoid outputs - 1 encoder supply output - programmable 5V or 10V"

Hello Geogak,

After discussing with our teammates. One of them said the same thing. We would have to build a converter for the PWM signal to Analog voltage out.

About the PID controller, since our team does not have enough knowledge about shaft speed and torque, what would be an alternative approach for this? The only thing we have is to monitor the voltage drop from our 36V batteries.

The idea is we are allowed 2 hours to travel as far as we can without burning the batteries to its dead voltage. What other controller methods could be used in this scenario?

Thanks alot.