Reference Material
Data Transmission
New Page
Motor Control
Brain Power Motor Controller
Data Transmission
Data Transmission
New Page
See PDF for PS2 control with
Arduino
PS2_to_Arduino_V1b.pdf
techmonkeybusiness.com-ESC Calibration Using an Arduino.pdf
Motor Control
All about the control of the various motors involved in the project
Motor Control
Brain Power Motor Controller
Specs:
**Volts**: DC36/48V
**POWER**: 250W
**LOWER** Volts:DC30/42V
**Current**: limiting 13A
**Degree** Brake: Low
**Angle**: 120/60
**Model**: SL-QX074kQ
Wuxi Shang Lian Supply Chain Co, Ltd
Observations about the
device (design/dynamic)
It's possible that regen is not a feature on that model. Have you ever seen one that has it?
following picture is a chinease language datasheet
I have worked on similar controllers and there may be several wires that go to optional
features that don't need to be attached. (eg. hall sensors)
they appear to use floating external wires where one would normally expect to find a
jumper on the PCB. Both the regen and a phase learning feature, for example, on one of
the controllers I have coming is enabled by connecting together the two like-coloured
wires that hang out of the unit for each of the associated functions. There's also a "speed"
connector that looks suspiciously like it may act like the speed selector pads on the Xie
Chang controllers.
If the controller is like the rest of the common ebike controllers, it only requires about 1-
1.4v minimum throttle voltage (to start working) and takes a maximum of about 3.5-4v
(where it stops responding further, or errors out). The amount of current needed is usually
at most a few mA.
So anything that produces the correct voltage range and can source enough current
will operate the common controller types (almost certainly including this one).
If the Arduino/etc can't produce enough voltage at the higher end of the range, then
it could simply have an op-amp on it's output that is powered from the controller's
5V. Or a transistor amplifier could do the same job.
The problem is that arduino and other microcontrollers that do not include DAC only
provides 0 or 5v in their digital outputs, although it can produce a variable voltage, but
always by PWM signal, which does not recognize the usual controllers, that is why there is
a need to work with a digital-to-analog converter (DAC), and certainly the controller does
not start the engine neither below 1.10 volts nor above 3.90
Easy to make a "DAC" via low-pass RC filter, if the frequency doesn't vary, just the
duty cycle. If a simple RC wont' work for some arduino-design reason, a low-pass op-
amp RC would. An actual DAC would work too, it just complicates the programming
and circuitry a bit more. ;)
Note:
It is possible to use the XLD controler with only the :
2 wires for battery 5 wires for Hall 3 wires for phase line motor
3 throttle wires
2 reverse wires
and not plug the rest of wires, could it work ?
Answer:
Absolutely! I went to the trouble of removing a lot of the extra wiring that I don't
use, but the ones you highlight are the only ones you need to make it work. You
can pretty much connect the phase and hall wires up in any order (except for
making sure +5V and ground are correct on the hall connector), and it will learn
how to fire them by simply connecting the green wires together temporarily
(with the driven wheels off the ground, obviously, or it will take off).
Usage Instructions by Philf
The only wires you need (correctly) connected for the controller to actually turn the motor are the
power, "ignition", hall sensors, phase wires, and throttle. The "ignition" wire needs to be connected
to to the battery, the same as the main power line (many people just tie them together). This is the
orange wire that's part of the three contact power connector, as the unit ships, and they refer to it
as "electric lock" in the diagram I posted earlier in the thread. You can completely ignore the
"alarm" wires - I have no idea what these do, and will remove them (along with some of the other
wires I don't use) - just to clean things up.
Assuming everything is connected, it's possible that you have a mismatch between the controller's
configured voltage and the battery you are using. If your battery is below the LVC (low voltage cut-
off) that the controller is expecting, then you'll get nothing. If you've connected either of the brake
lines, then disconnect those to make sure you aren't inadvertently triggering the cut-off associated
with them.
Normally, there's a bit of an exercise to get the hall/phase wires sorted - with this controller, simply
connecting the green auto-config ("intelligent identification", in the diagram) wires together should
make the wheel spin (make sure the wheel is off the ground :-)). If you're sure that power is wired
correctly, and you've got enough voltage, then something is likely amiss with your hall/phase
wiring.
Hope it's this simple!
Edit:
Just wanted to be clear about the "ignition"/"electric lock" (both misnomers, as far I'm concerned),
in case it turns out to be this simple - you wouldn't want to to be running the battery randomly into
any of the other orange or red wires on the controller. It's THESE wires that both need to be
connected to the battery:
Reverse Engineering by Philf
OK, so the first of the XLD controllers arrived (the smaller one, from Amazon:
Gotta say, for $40 (Canadian), it seems put together better than expected, though the bar was low.
Upon seeing this thing in person, and revisiting this thread, it occurs to me that variants of this
thing - at least units that seem to run with the same unique MCU - have been discussed on ES for
some years. I haven't worked my way through all of the threads yet, but this is flavour I now have
in hand. It doesn't have the hookup for the external LCD, so I'm not sure how radically different it is
at its core.
Wiring: !Missing Wiring
PCB:
!Chip: missing
After changing out a lot of the connectors for something I can actually attach to a bike (Andersons
and JSTs), it did install painlessly. The auto-learn feature for the phase/hall wiring worked well (you
connect together the green wires, power up the bike, and it starts spinning the wheel. If it's
spinning the wrong way, you touch the throttle and it reverses - disconnect the green wires, and
this setting is remembered). There is a speed connector on there that does the expected. There are
three speed settings - leave the connector open, and the motor runs to the middle setting. Short
black to grey, and the top speed is reduced. Short black to white, and you get 100%.
There is a pair of grey wires whose function is claimed to be "EBS". These come connected
together out-of-the-box. Sure enough, if you apply the brake (I have it wired to the "brake low"
input), the motor is slowed down to a complete stop. My suspicion is that this isn't actually doing
any regen - it's just shorting the phase wires to get the braking effect. I won't be able to prove this
until I try the controller out on a bike with a Cycle Analyst on it.
Now - there is the often found tie between the EBS (or regen, if true) function and LVC. This
controller claims to be a "36/48V" unit, and to auto-detect its power source. When I have the
controller connected to a 10S lithium pack (whose state of charge was at around 39V when I was
testing), the EBS feature works as expected. If I connect my usual 12S pack (which was hot off the
charger and running at 49.9V), the EBS feature DOES NOT work.
Studying the PCB, there is an interesting resistor array that appears to be in parallel with one of the
resistors that form what I'm assuming is part of the voltage divider that is feeding the LVC
measurement to the MCU.
Any of these resistors can be jumpered to GND to change the balance of the voltage divider. It's
interesting that the options go all the way up to 80V. The board is not populated with components
that would allow you to even think about going there. The caps are 63V units, and these are the
FETs that come with this thing:
Those are 68V parts.
For giggles, I jumpered the "60V" resistor in the LVC array, and now EBS (or regen, if true) works
with the 12S pack. The bike won't run, however, with the 10S pack - evidently, the LVC has moved
up, well above 39V - I need to go back at this with a variable power supply to determine what the
real cut-off values are. At least, if none of them are satisfactory, there's a clean place on the board
to play with different resistor values :-).
Anyways, I thought I toss this out there - the markings (and chip used) on this board seem to be
very similar to the board posted earlier in the thread. I've mapped out where all of the coloured
wires go, and what the do (though I have no idea how the "alarm" feature is used), so FWIW - this is
the diagram: !Missing XLD500WController.jpg
The "power and electric lock" function is straightforward. The heavy red and black are your main
battery power, and the orange wire is the "ignition" which provides battery power to the actual
controller logic.
Phase and hall wires are standard, as well. There's a group of pads on the PCB - "5V", "U", "V", "W",
and "GND" all together. These are the red, yellow, green, white, and black hall wires, respectively.
The EBS brake wires are both grey and, when jumpered together, turn on the braking (or regen, if
true) capability - provided the LVC and power source are compatible. These are connected to pads
labelled "DS" and "X" on the PCB
The "high potential brake" (it's purple) is an input signal that would be used if this controller were
used on a scooter. You'd connect this to the same 12V signal that drives the bike's tail light. It goes
to "SH" on the PCB and has the same effect as shorting the low potential brake.
The low "low potential" brake (the one most of us actually use) is a black and white, going to "GND"
and "SL", respectively. When shorted, this switches off motor power and activates EBS.
The throttle ("handle accelerator", as diagrammed) is red, white, and black. Red goes to "+4.3V",
black to "GND", and white to "SD" - the latter being the actual throttle signal.
The "gear switch" is the 3-speed control. Black goes to "GND", grey to "K1", and white to "K2". Left
open, the motor runs at its "medium" speed. Short black to grey, and speed is reduced to "low".
Short black to white and you get full speed.
The "reverse function" (brown and black, going "DC" and "GND", respectively) reverses the motor
when shorted.
The "cruise function" (blue and black, going to "Q" and "GND", respectively) holds your current
speed when shorted.
The "autometer signal" is interesting. It seems analogue (though probably just buffered PWM). The
faster you go, the more voltage you read on this line. What's weird is that it hangs out of the
controller, unprotected and uninsulated, but ramps up as high as 18V when the bike is at full
throttle on a 39V pack. It's blue, and connected to "S+". I have no idea how I'd use this, though
driving a regular analogue panel meter could be fun. :-)
There are two connectors for an alarm function - which I have NO idea about.
Alarm power (red and black) goes to pads marked "PS+" and "GND".
Alarm signal is three wires - Grey goes to "A3", white goes to "W", and orange just brings back out
full battery voltage (it's directly connected to the orange "ignition" wire).
Dunno if any of this is useful, but its the first time I've had my mitts on one of these "X806M" based
controllers.
I'm dubious about the "sine wave" output of this thing. So far, the motor I'm playing with sounds
exactly the same as it did with the older model Infineon job that was previously on there.
Using a variable power supply to figure out where the "real" LVC kicks in, it looks like the "auto-
detecting" feature that this controller is alleged to have (auto-sensing 36 vs 48 volt operation)
doesn't have any smarts behind it at all. No matter whether you feed the controller 36 or 48V, the
LVC trips at 33V - and doesn't release until voltage gets back to 35V. Not really useful if you were
genuinely running this thing at 36V. Does anybody really DO that?
So I tacked a multi-turn pot into the jumper for the 60V setting and twiddled with it over the
voltage range of 35 - 50V. I determined that a value of around 18K coaxed the LVC up to around
36V. This suits me fine on a 12S LiPo pack, as I wanted the controller to trip BELOW the circuitry I
have on the actual pack itself. More importantly - the "EBS" feature works on the larger pack with
this mod, as well. So I took out the pot and just bridged the pads with an 18K surface-mount
resistor. LVC is at 36.1V, and EBS still works on 12S.
Still haven't determined if there is any genuine regen happening (as opposed to just
braking), as I fried a piece of gear when setting up to test this when I inadvertently
reversed the polarity of my power supply. D'oh!
Just to confirm when DS and X are connected, the regenerative braking is working. The brake is
connected to the provided wires outside the box.
Experimentations
Underpowered Running Test
I'm Running my XLD 1000W controller at 36V with a Q128C motor. Works great.
However the battery cutoff is high at 33.5V though. I'm leaving about 3-to-5%
battery capacity on the table because of this. I will be modding one of the
voltage-splitter resistors (next to the four voltage selection jumpers?) to bring
LVC down to 30v.
PS: Controller can be had for $14 now. That is a screaming deal IMO given it's
performance/construction I have observed.
PSS: It is NOT sign wave....its a kind of stepped waveform similar to trapazoid
that adds additional voltage step-downs/ups to smoothout waveform. Motor is
VERY quiet with this controller and I am quite happy.....my trike-build has met
my goal for stealthiness using this controller. sine wave.jpg
Success!!
I replaced the 2.0K resistor (see end of tweezers) with a 2.2K resistor. That lowered LVC to 31v.
Since I'm running this controller at only half i
t's rated capacity, I went ahead and removed it from the huge aluminu heat-sink case and made a
much tighter fitting aluminum enlosure. Much smaller now. I'll shrink it and the battery together as
a single unit that can be removed from trike for riding without e-power or safely storing the LIPO
pack.