I was wondering if this motor contoller can be interfaced with arduino in order to control a 12v 5A motor which I have lying around.
Ideally I would like to remove the potentiometer, such that I can directly connect to the android. In order for this to be achieved, the arduino must be able to simulate some sort of resistance or something?
Appreciate all your help.
The controller specs are as follows:
-Model: CCM6C
-Input voltage: 6V/12V /24V DC
-Control Power: 24V, within 200W; 12V , within 200W; 6V , within 60W
-Current: Sustained current maximum 20A, suggest use within 10A
-PWM Duty Cycle:5% -100%
-PWM Frequency:21khz
Yes its actually from an e-scooter, that someone is selling secondhand locally where I live. The key datasheet details were passed to be by the seller as shown in my first post.
@Robin2 - Yes haha, I meant arduino. Changed that now.
@MarkT - So assuming I find the voltages across the potentiometer to be say 0V to 5V, what do I do next? Can I just remove the potentiometer and connect the 2 corresponding ends to the GND and analog ports of the arduino uno?
souravdeyone:
So assuming I find the voltages across the potentiometer to be say 0V to 5V, what do I do next? Can I just remove the potentiometer and connect the 2 corresponding ends to the GND and analog ports of the arduino uno?
No.
An Arduino does not have a DAC (digital to analog converter).
The simplest thing may be to use the Arduino to control a digital potentiometer.
So just to set things straight for me, I just measure the resistance ranges across the controller's existing potentiometer, and find a digital potentiometer that can replicate a similar or greater range.
Once I do this, I hook the digital potentiometer to the arduino, as per the datasheet, and connect the digital potentiometer in the exact same way the preexisting analog on was connected originally.
@ Robin2 - Thanks for all your help, will be buying the parts shortly to try out.
@MarkT - Using RC filtering to modify the pwm output sounds great, but how do I access the pwn output itself, short of opening up the motor controller?
Sorry to dig this up again, but I've bought all the parts and put everything together. The system works, however only to a limited extent.
The motor controller which is interfaced with this MCP41100 digital potentiometer I bought acts as an I/0 switch instead of actually controlling the speed.
The MCP41100 is an 8 bit digital potentiometer (256 values). I found out the threshold value for the motor to run is 62. Any value equivalent to 62 or lower turns the motor on at full speed. Any value higher than 62 all the way to 255 completely switches the motor off.
I've verified the MCP41100 works by reading its analogValue alongside that of the actual 100K analog potentiometer I am replacing. The values correspond to each other, so thats not the issue.
Any idea what I can look at next?
Edit: I measured the voltage across the original analog potentiometer when connected to the motor controller as 1V. Given that the MCP41100 works across a 0-5V range, this is most likely the issue right? So if I just adjust the range of the 8bit values I write to the MCP41100 this should work?
I've hacked out something, based on the schematic I was following. I omitted the bit on the 16x2 LCD that I have installed, cos that seems to work perfectly.
Just to clarify things, the long green wire from the MCP41100 pin 6 is fed to the motor controller and back to A1 of the arduino as a form of feedback for me, just to ensure that the resulting values from the analog and digital potentiometers correspond to each other.
Sorry. The link for the MCP41100 datasheet is below. FYI I have a the 100K version of the MCP4110, which is the same as the orignial 100K analog potentiometer that came with the controller initially.
The datasheet says absolute maximum ratings "All inputs and outputs w.r.t. VSS. -0.6V to VDD +1.0V"
Subject to that limitation I assume the connections PA0, PB0 and PW0 should be connected in the way that the original manually operated pot was connected.