Author Topic: Mysterious things while hacking a Makita BLDC motor trigger  (Read 7539 times)

0 Members and 1 Guest are viewing this topic.

Offline steveinfranceTopic starter

  • Newbie
  • Posts: 7
  • Country: fr
Mysterious things while hacking a Makita BLDC motor trigger
« on: September 05, 2018, 05:13:55 pm »
Firstly 'Hello to All'
I've been tinkering with electronics for 50 years and am still alive to tell the tale although, in my youth, I did have some unfortunate contacts with anode voltages of Military wireless sets.
I will try to explain the problem - please tell me if I'm not making things clear.

I would like to use a Makita BLDC cordless drill motor and gearbox for some equipment we're making.
It offers a compact and reliable motor and gearbox which will require a housing made but that's not a problem.

The plan is to throw away everything else and drive the controller from a PLC and use an external power source.

The battery supply has a small third terminal which, I think, goes to a temperature sensor in the battery.
Connecting a 220  \$\Omega\$ resistor to +ve makes the drill happy to run off a bench PSU (it is an 18 V drill).

Next, and this is where the fun starts, the trigger.
It is marked as an Omron C3JW-4B but (apart from buying replacements at 1/3 the price of the whole drill) there's nothing about it on the Internet - trust me !
Contacting Omron they tell me Makita bought out their division that makes similar switches and regard its workings as a proprietary secret so no datasheet.

The trigger has two components - a set of beefy contacts to supply +V to the controller and a 5 pin miniature connector.
There's a first pressure which switches power and a second pressure which starts the motor and makes it spin faster the more it's pressed.
There's also a forward/reverse (F/R) switch.
Nothing too difficult so far.

Disconnecting +ve in and +ve out from the switch and jumpering them together lets the motor start on second pressure and run as expected.
So, a 5 pin 'black box' to sort out.

I cut the wires and took them to a breadboard - the drill still worked !

With the controller connected there were three easy ones - GND which was common with I/P GND
One which sat at 18 V until second pressure then fell to 0 V no matter what so it was there to detect 'second pressure'
One which sat at 3.5 V with the F/R switch in 'Forward' and 0V with the switch in reverse.
Disconnecting these from the trigger and jumpering them to GND as required gave the expected results - motor starts on 'second pressure' in the direction set by the F/R switch.

This left 3 connections to the trigger - GND, grey and white (colour of wires).
With the controller connected to the trigger white sat at 2.5V no matter what and grey went from 2.2 to 0V as the trigger was pulled.
Easy !
White is the excitation voltage for the speed pot and grey is the 'wiper' O/P.

So, disconnect the trigger completely and look at resistance values with my trusty Fluke DVM.
I should say for all resistance measurements I took them with the DVM leads both ways round in case of a diode type junction somewhere.

The 'second pressure' detect went from O/C to 'closed' as expected, as did the F/R switch.

White to GND read a constant 15  \$\Omega\$ while grey to GND went from 15 to 0  \$\Omega\$ so that seemed to fit in with white supplying 2.5 V across the pot which was passed back to the controller by grey on the slider to give speed.

15  \$\Omega\$ seems a bit low but anyway let's connect two 10  \$\Omega\$ resistors between white (2.5 V) and GND so we should get 1.25 V at the junction and connecting that to grey should give half speed (or thereabouts).

Now this is where the mystery starts (hope you weren't holding your breath).

With the two resistors between white and GND white fell to 0V so it wasn't happy feeding 20 \$\Omega\$ let alone 15.

I completely disconnected the trigger from the controller.

I put a 220  \$\Omega\$ resistor in series with white and the DVM read 15  \$\Omega\$ between the free end of the resistor and GND.

I put a 220  \$\Omega\$ resistor in series with grey and the DVM read 15 to 0  \$\Omega\$ between the free end of the resistor and GND.

In other words the DVM couldn't see the 220  \$\Omega\$ resistor.

How is this possible ? The 220  \$\Omega\$ resistor measured correctly.
I checked white to GND and  grey to GND for volts (in case of a capacitor or backup battery) and diode (both ways) but nothing.

I repeat there was no voltage supply of any sort (apart from the DVM) to the trigger - it was literally in my hand.
HELP (Please).










 

Offline xavier60

  • Super Contributor
  • ***
  • Posts: 3034
  • Country: au
Re: Mysterious things while hacking a Makita BLDC motor trigger
« Reply #1 on: September 05, 2018, 10:47:02 pm »
 I can't make much sense of that. This is what I traced out on my DHP481 a few years ago.
HP 54645A dso, Fluke 87V dmm,  Agilent U8002A psu,  FY6600 function gen,  Brymen BM857S, HAKKO FM-204, New! HAKKO FX-971.
 

Offline steveinfranceTopic starter

  • Newbie
  • Posts: 7
  • Country: fr
Re: Mysterious things while hacking a Makita BLDC motor trigger
« Reply #2 on: September 06, 2018, 08:51:56 am »
Thanks
Your schematic is exactly what I expected and partially what I found.
My problem is that  yellow (gnd) to white on your diagram should give the resistance of the speed pot which measures with a DVM as 15  \$\Omega\$.
The exciting voltage applied to white by the controller is 2.5V.
I tried to explain that if I put 20 (2x10  \$\Omega\$) between gnd and white the voltage fell to near zero so the pot can't really be 15  \$\Omega\$ - which seems far too low anyway.
I didn't believe the value so, among other things, I put a 220  \$\Omega\$ resistor with one end connected to the white lead and the other to the DVM.
If the pot was really 15  \$\Omega\$ one would expect to see a reading of 235  \$\Omega\$ but it still read 15  \$\Omega\$ - as if the resistance wasn't there - which seems impossible to me.
I can't work out what could possibly be inside the trigger to 'confuse' the DVM.
Sorry about the glare on the DVM, I was allowing 5  \$\Omega\$ for the DVM leads so I said 15  \$\Omega\$ while the DVM reads 20
« Last Edit: September 06, 2018, 09:10:15 am by steveinfrance »
 

Offline capt bullshot

  • Super Contributor
  • ***
  • Posts: 3033
  • Country: de
    • Mostly useless stuff, but nice to have: wunderkis.de
Re: Mysterious things while hacking a Makita BLDC motor trigger
« Reply #3 on: September 06, 2018, 09:23:42 am »
Just a wild guess:
There's no stinkin' pot inside the trigger, but a linear magnetic sensor (Hall element) with some signal processing. These are available as single chip solutions today and have three pins: GND, supply and output voltage proportional to magnetic field.
This would (Edit: not) explain your DVM measurements as far as I could follow your description.
Does the controller work if you just apply a variable voltage to the speed control (wiper?) input?
« Last Edit: September 06, 2018, 09:27:47 am by capt bullshot »
Safety devices hinder evolution
 
The following users thanked this post: steveinfrance

Offline xavier60

  • Super Contributor
  • ***
  • Posts: 3034
  • Country: au
Re: Mysterious things while hacking a Makita BLDC motor trigger
« Reply #4 on: September 06, 2018, 09:27:19 am »
I think that there is something wrong with your meter. Seems it is trying to tell you that the pot is 20300 ohms.
Try measuring the 220 ohm resistor and some other values.

Edit: I see where you said earlier that the 220 ohm resistor measured correctly. But look at the 2 readings in the 2 photos, the 22 difference.
« Last Edit: September 06, 2018, 09:36:04 am by xavier60 »
HP 54645A dso, Fluke 87V dmm,  Agilent U8002A psu,  FY6600 function gen,  Brymen BM857S, HAKKO FM-204, New! HAKKO FX-971.
 
The following users thanked this post: steveinfrance

Offline steveinfranceTopic starter

  • Newbie
  • Posts: 7
  • Country: fr
Re: Mysterious things while hacking a Makita BLDC motor trigger
« Reply #5 on: September 06, 2018, 09:45:51 am »
Xavier,
You're absolutely right.
I put 10K in series with the pot and measured the voltage drop.
The pot is 20K and my meter has lost its decimal point sanity.
I do apologise,
Will go away and grovel but at least, thanks to you, I've sorted it.
 

Offline Fred27

  • Supporter
  • ****
  • Posts: 727
  • Country: gb
    • Fred's blog
Re: Mysterious things while hacking a Makita BLDC motor trigger
« Reply #6 on: September 06, 2018, 09:54:49 am »
I may have missed something but it sounds like the "5 pin black box" is the brushless motor driver.

If you want to simply drive the motor from DC then you'd be best to look at an earlier model that used a brushed motor.
 

Offline steveinfranceTopic starter

  • Newbie
  • Posts: 7
  • Country: fr
Re: Mysterious things while hacking a Makita BLDC motor trigger
« Reply #7 on: September 06, 2018, 10:14:04 am »
No, it was the trigger.
My fault in trusting the DVM, and also paranoia that there was some sneaky Makita smoke in there.
Sorted now, thanks.
 

Offline steveinfranceTopic starter

  • Newbie
  • Posts: 7
  • Country: fr
Re: Mysterious things while hacking a Makita BLDC motor trigger
« Reply #8 on: September 06, 2018, 11:30:19 am »
Last words !
Xavier's diagram is correct (except there's no switch in the trigger on the grey lead).
The pot is 20 K.
The motor is running happily on an external DAC giving 0 - 2.5 V between grey and yellow (GND).
White doesn't need to be connected to anything so it isn't current sensed.
Red (trigger sense) must be O/C when power is first connected or the motor won't arm. It can be connected to GND a few ms later and then used as a start/stop signal to the motor.
The motor will restart at any speed set by the volts on grey. Just remember that 2.5 V is 0 rpm and 0 V maximum.
There's an irritating ~5 minute timeout built into the controller which stops the motor. This is reset by a quick O/C on red.
Hacking BLDCs like this is quite attractive to robotic and other communities.
Is there anywhere on the website we could put this thread or this post so it can easily be found with Google for lost souls like me ?
Edit - I see it's already on Google. Worth changing the thread subject to just 'hacking a Makita BLDC motor trigger' ??
Very useful to be able to talk a problem over - helps concentrate the old mind.
Thanks again to all - I'll be back......
« Last Edit: September 06, 2018, 11:45:54 am by steveinfrance »
 

Offline xavier60

  • Super Contributor
  • ***
  • Posts: 3034
  • Country: au
Re: Mysterious things while hacking a Makita BLDC motor trigger
« Reply #9 on: September 06, 2018, 11:56:22 am »
I traced out the trigger in my drill for the opposite reason, to keep the trigger and build a replacement for the old burnt out motor controller. So I didn't get a chance to take any voltage measurements at the trigger.
Looks like I have used it upside down with my  replacement motor controller, using the White as negative ground.
Although I didn't have to, I made my controller take notice of the 3rd battery contact. In my case I noticed it was the 3rd battery contact that times out every few minutes,goes high Z. A brief 5v pulse applied to the 3rd contact via a 100K resistor is enough to make it output battery voltage again. A MOSFET switches battery voltage via a 4 amp fuse.
« Last Edit: July 18, 2023, 11:22:13 am by xavier60 »
HP 54645A dso, Fluke 87V dmm,  Agilent U8002A psu,  FY6600 function gen,  Brymen BM857S, HAKKO FM-204, New! HAKKO FX-971.
 

Offline xavier60

  • Super Contributor
  • ***
  • Posts: 3034
  • Country: au
Re: Mysterious things while hacking a Makita BLDC motor trigger
« Reply #10 on: September 06, 2018, 12:11:10 pm »
I think I have figured it out. It is a simple handshake between the battery and controller.
The controller expects the 3rd contact to switch off every few minutes. The controller then responds by pulsing the 3rd contact, causing the battery to turn it on again.
I guess that if the battery feels stressed, it will hold the 3rd contact in the off state.
HP 54645A dso, Fluke 87V dmm,  Agilent U8002A psu,  FY6600 function gen,  Brymen BM857S, HAKKO FM-204, New! HAKKO FX-971.
 

Offline xavier60

  • Super Contributor
  • ***
  • Posts: 3034
  • Country: au
Re: Mysterious things while hacking a Makita BLDC motor trigger
« Reply #11 on: September 06, 2018, 12:39:50 pm »
There is actually a 4th contact on the battery that is in line with the 3rd contact. the 4th contact has permanent 18v on it.
When the battery is slid into the tool's battery holder, a blade momentarily connects the 3rd and 4th contacts together.
This seems to be needed to initially wake up the battery. 
HP 54645A dso, Fluke 87V dmm,  Agilent U8002A psu,  FY6600 function gen,  Brymen BM857S, HAKKO FM-204, New! HAKKO FX-971.
 

Offline steveinfranceTopic starter

  • Newbie
  • Posts: 7
  • Country: fr
Re: Mysterious things while hacking a Makita BLDC motor trigger
« Reply #12 on: September 06, 2018, 12:56:28 pm »
How very devious.
All I wanted was to make the controller think it was connected to a genuine Makita battery.
I'd assumed the controller took a look at the third contact once and, if OK, forgot about it.
I suppose it makes sense (literally) for the controller to check if the battery's getting red hot but-assuming it's a thermistor in there- I would have expected it to shut things down if the third contact went high or O/C rather than giving it a tickle (technical term) from time to time.
I know there's a lot of processor in the battery pack hence a lot of complaints about it 'bricking' the battery on deep discharge so perhaps, as you suggest, the third contact is via the battery processor rather than directly connected to the sensor.
Maybe I've got to spoof the third wire input to the controller along the lines you suggest.
That would be good because it would be better, in my application, to keep the motor running for as long as I want rather than as long as the controller decides.
This will keep me quiet for a while !
Was your controller for a brushed motor ?
If you managed to build a BLDC controller I'd be mighty impressed.
Just out of interest it costs about £500 for a commercial BLDC motor and controller with less performance than the Makita which I can buy for £75 without battery, also programming these controllers is a right old game,  so it's worth spending some time on a one-off hack for a potentially quite large production run.
 

Offline xavier60

  • Super Contributor
  • ***
  • Posts: 3034
  • Country: au
Re: Mysterious things while hacking a Makita BLDC motor trigger
« Reply #13 on: September 06, 2018, 01:12:33 pm »
I made the controller for a BLDC model, DHP481. It was a very challenging project and not really worth the time I spent on it.
When I did actually need to use a drill to drive a chemical applicator, I used a brushed model.
Much simpler to control the power directly to the brushes with a buck converter.
https://www.eevblog.com/forum/projects/cordless-drill-hacking/msg1579870/#msg1579870
« Last Edit: August 07, 2021, 10:54:33 pm by xavier60 »
HP 54645A dso, Fluke 87V dmm,  Agilent U8002A psu,  FY6600 function gen,  Brymen BM857S, HAKKO FM-204, New! HAKKO FX-971.
 

Offline steveinfranceTopic starter

  • Newbie
  • Posts: 7
  • Country: fr
Re: Mysterious things while hacking a Makita BLDC motor trigger
« Reply #14 on: September 06, 2018, 02:20:01 pm »
I'm impressed.
The reason for a BLDC is that the equipment will have to work in some possibly difficult atmospheres.
The drill itself is, of course, not ATEX approved nor could be because of the power switching contacts in the trigger.
There's an electrolytic in the controller which produces a nice fat spark on power-on.
I can't just put the whole thing in a sealed box because of air cooling for the motor so I can't use a brushed motor.
If you're right about the handshake to the third contact I'd have to detect that and send something comforting back to the controller.
I'll probably start by interrupting the red lead for a few ms every couple of minutes which seems to reset the controller timer and won't have much effect on performance.
I'll have an optoisolator or reed in there anyway driven by the PLC so less programming to do and I/O to handle.
As you say, it's still easier than building a bespoke controller.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf