Brushless Motor controller and Microcontroller combo?

Ragonamuffin

10 mW
Joined
May 31, 2008
Messages
29
Location
Richmond Virginia
Hello!

I am looking for a brushless motor controller that is easily interfaceable to an arduino, or is a motor controller/micro controller combo. I currently have an arduino hooked to a kelly KBS 48101 controller through the analog pins of the kelly. My biggest issue is the delay. I need something as responsive as a segway. The second issue is the regen braking is a joke. It is extremely weak. The controller I had before the kelly had very strong regen. The big issue is that I could not interface that controller with the arduino. I have looked at all sorts of DIY segways, but none of them seem to use brushless motors. :cry:

I saw the froboard which seems to be awesome. The main issue is its size, and not being a full package (need to add the power transistors and such). The electronics aren't a huge issue, but I need a smaller package, or at least dimensions which I could not find anywhere... I'd rather not port all my programming work to another controller, but thats acceptable if I must.

I'm sure there is a sabertooth for brushless controller right?

My power requirements are about 36v 20a.

Thanks!
 
Might be a while before you get a response from many people; there is a serious sitewide issue being worked on, still, for the last few days. It's pretty distracting.

Read up top in the sticky threads and a bunch of others in the General Discussion area if you're curious.
 
I'm not familiar with anything off-the-shelf that would do what you require. I have not attempted any searching, so take that for what it's worth (not much). The handful of "shield"-type power boards I've seen are all pretty low-power and would probably not meet your requirements.

A handful of people around here have made various efforts at controller design, some with full integrated controllers and some with "power boards" similar to what you would like. There were varying degrees of success, but I don't think any of them are available for sale. You could pick up some ideas and there are many members (myself included) who would be happy to offer advice if you wanted to try and build your own.

Depending on your skill level, you could probably also modify your Kelly. It would take some reverse-engineering to figure out the details, but it should be possible to cut out the existing brains and put your Arduino in direct control of the gate drives. That would require you to write all the code for commutation logic, current sensing, etc. but would give you the control and response time you desire. Again, a lot of people around here could probably help you. I know of several who use or have used Kelly controllers, so there might be some people with a better idea of how these modifications would be made.
 
Thanks for that thorough response! Aren't controllers usually filled with epoxy though? Honestly I feel I would have better luck with reverse engineering the stock controller, as I was VERY close. All I had left was this pin that I could not figure out what to do with. All the other pins were analog, yet this pin was digital or something. I used a frequency for forwards, and a different frequency for backwards. On top of that, it seemed to vary the RPM through this pin as well as the analog throttle pin. At this point I gave up. No one could tell me how to output different frequencies from an arduino. I wasn't even sure that was going to solve the issue. I went to use the kelly controller, and now the lag plus the weak regen makes me wish I used the stock controller in the first place. I have attached a picture of the old controller which I could find zero documentation for on the internet. I have attached a link if anyone is curious about where the controller came from. The HX pin is the one that made me give up.
http://fastestelectricskateboard.co.uk/shop/index.php?act=viewProd&productId=4
 
Ragonamuffin said:
Thanks for that thorough response! Aren't controllers usually filled with epoxy though? Honestly I feel I would have better luck with reverse engineering the stock controller, as I was VERY close. All I had left was this pin that I could not figure out what to do with. All the other pins were analog, yet this pin was digital or something. I used a frequency for forwards, and a different frequency for backwards.
Sounds like it's a servo-like control pin. Just load the Servo.h library for arduino and attach() to a pin :)

Ragonamuffin said:
On top of that, it seemed to vary the RPM through this pin as well as the analog throttle pin.
I've seen controllers that take more than one way of controlling speed. But I don't get it: if you could control it with the analog input already, what's the stress of this other digital pin? Just leave it "off" or unconnected.

Ragonamuffin said:
At this point I gave up. No one could tell me how to output different frequencies from an arduino.
There's a page somewhere on the arduino website that tells you how to do.
 
Interesting! I wish I consulted this forum before I tore down the old one lol. The reason I couldn't use it without that pin attached is because the motor controller went into panic mode or something. The light was flashing an error code that I could not read because i do not have the documentation for it. That was my initial plan, but it was foiled by that error. i guess its not so much controlled by either, but controlled by both. I tried leaving that pin connected to the old board, but it didn't work right. Conflicting signals from the new control logic, and the old hand controller. I currently have the kelly controller hooked up as I have shown in the picture.


The pins are as follows:

BK - brake 0-5V
XH - mystery pin
BACK - reverse motor
SP_AD - Throttle
GND - Ground
15V - 15 volts
BAT - higher voltage, around 18
VOUT - 36 volts if i can remember correctly.

They connect a "bluetooth" module (according to the site I bought the board from) to the motor controller module. I just looked at some pins with nothing connected on the bluetooth board, they say: PB6, OSC2, OSC1, PF 2, GND, VCC.

If these sound like any motor controller anyone has heard of please let me know.
 
You might want to back up a little, I'm not sure I fully understand what you have and what you're trying to do. Are you trying to get the Kelly to work, or are you working with the other mystery controller? What's the end goal you're trying to achieve with the Arduino?
 
I currently have the Kelly all hooked up. At this point I think I am going to go back to the mystery controller. the Kelly has poor regen ability and response time. I am a little worried about doing this because its going to be a huuuuge pain to go back to it. And after all that work there is still the possibility that I wont be able to make the old controller work. Analog controls are super easy to use, but going into the realm of digital reverse engineering is above and beyond my abilities. I have self taught myself all this breadboard and Arduino stuff. I have some free time, so I think making this old controller work is worth a shot! I just found some information on generating tones for arduino. I wish I ran across this a little earlier.

I was trying not to rely on any outside sources for this project, but you guys seem very knowledgeable. I will hook up the old controller and see what I can do from there!
 
I'm willing to help you try and reverse-engineer the mystery controller if you can supply more info. One thing that might be helpful is if you can restore it to stock configuration, then run it and probe the various pins while doing so. That should let you figure out quite a bit about the interface.
 
Yep! I did that. In my previous post I have mentioned what exactly the pins do. I now just need to figure out the mystery pin. I should not have given up so quickly on the old controller, but I had a lot of faith in the Kelly controller. I am about half way into putting the old controller back in place. It is a LOT of work lol.
 
I got it all hooked up! Upon first attempt, it does practically nothing. Just sputters a little bit. The hand controller that came with the board can control the throttle without any pins but the HX mystery pin hooked up. I have analyzed the frequency, it is 48.8 Hz forward, and 244.1 Hz for regen. The duty cycle stays at 50%. There is some signal being sent here I am missing. Some sort of digital signal? How can I probe it to find out? Maybe I can use the Arduino or something. I feel like it may be using some sort of serial communication, as well as the analog signal. Any thoughts?
 
Ok, if the duty cycle always stays at 50% that's not a servo-like control. It can't just be 2 different fixed frequencies if you can fully control throttle, unless, as you mention and it's a communication protocol, but in that case the frequencies can't just be static over time. Do you have a oscilloscope you can hook up and see? If you don't, there are some arduino oscilloscope projects, for the frequencies we're talking here they should work fine.
 
Definitely a very non-standard interface. Its very odd that there seems to be a lot of duplication in the interface. An analog pin for braking and a second analog pin for throttle. A (digital?) pin to toggle direction and another digital pin which appears to control regen (?). There could easily be a much more efficient way to configure the interface. Either the designers didn't care or there is something going on with the interface that we don't understand. There are more signals than needed, and the mixture of digital and analog is unusual.

The signal on the XH pin, does the frequency vary over a range or does it just switch between the two extremes? It would be very, very useful to look at this signal on the scope to see if there is any data being transferred or just a pulse.
 
I have spent ALL day trying to make this oscilloscope program work. I have tried every oscilloscope variation on the web. I am not sure what I am doing wrong. The programs seem to be working ok, but I am not getting any signal. I have the ground lead of the arduino hooked to the ground lead of the circuit board. I have the analog 0 pin hooked to the HX pin. I checked with my multimeter, and it is getting a signal just fine, both a frequency and a voltage. Is there something I am missing?

The XH pin does not vary its frequency.
 
I don't know which programs you tried, but should work, there isn't much science about it, unless the voltage on HX is always above 5V (by the way, a 4K7 series resistor with the input pin adds some protection), in which case you need a resistor divider at the input otherwise you'll always be reading 255.
 
I just testing out the arduino with a signal from my amp. Granted it is a very weak signal, it still should have done something to the arduino. I am done trying to make that work. I am now going to throw a voltage divider circuit on a headphone jack and try one of these sound card oscilloscopes. Murphy's law has been way to active in this project... :evil:
 
Well, not what I expected. It only shows a different frequency, but not much else. I squeezed the trigger, and nothing noticeable happened. I will post a screen shot later today.
 
I got it working! Apparently there was still some black magic going on inside or something. Everything seems to work fine now! Now I need to figure out this lag issue with the arduino. I know its possible to make the arduino instantly responsive because all the segway projects I have seen use arduinos. I guess I just suck at programming lol. Thanks you guys for the help! I might post up my project, but I am worried about intellectual thieves.
 
Back
Top