How to Hack a PG Wheelchair controller

Recently I was very generously given a couple of large geared DC motors off an old electric power wheelchair and a PG motor controller to go with them for a future project.

IMG_6234 (Resized)

IMG_6233 (Resized)

Gearbox cover with lever for Freewheel release

IMG_6232 (Resized)

Brake unit

Brake unit

Whilst it’s possible to get a Sabertooth driver or similar off eBay it would be great if it were possible to interface with the gifted controller in a way that made it usefully compatible with an Arduino.

After trawling through the internet for a couple of hours two things became apparent. Firstly PG are very tight with what technical documents they release which meant that there was very little information out there about the controller and secondly what success people have had in interfacing with these controllers (which hasn’t been much) has been through the joystick user interface (which I didn’t have).

After cracking the controller open and having a poke around it became apparent that the motor driving stuff is all located on the top circuit board and all the control / user interface stuff is done on a separate circuit board that clips onto the back via a 22 pin connector. The  chosen plan of attack was to then write off any possibility of interfacing with the control board and just hack directly into the motor drivers.

Controller board that connects to back of motor driver board

Controller board that connects to back of motor driver board

This board basically consists of two H-Bridge drivers each driving 8 mosfets (4 pairs), one H-Bridge for each motor. Additionally there is a 12v regulator, a large central relay that switches the positive supply to the H-Bridge mosfets, and then the following

IMG_6247 ANNOTATED (Resized)

Mosfet 1 and Mosfet 2 – Power to electromagnetic park brakes

Mosfet 3 – Power to 12v Reg and Mosfet 4

Mosfet 4 – Power to Relay coil and ??

BJT 1 – Connected to Gate of Mosfet 1 and 2

BJT 2 – Connected to other side of relay coil and GND

After tracing as much of the pinout as possible the connector was (very poorly) removed and fly leads were soldered to the appropriate points as well as heavy gauge cables for the battery and motor connections. A computer power supply was connected to provide a 5v rail.

IMG_6242 (Resized)

IMG_6243 (Resized)

Testing then commenced with a couple of 12V batteries connected in series and one of the motors. Initially there was little success and so it became a game of working what needed to be powered on in what order. Eventually we got the following order worked out.

Mosfet 3 gate to GND (12v supply now active) Mosfet 4 gate to GND, BJT2 base to +5v (relay now switches on) Base of BJT1 to +5v (Mosfet 1 and 2 now powered, park brake clicks off) Pin 8 of H-Bridge to GND (enables outputs on H-Bridge) Pin 3 or Pin 4 of H-Bridge to GND (drives motors!!)

Basically now that it seems to be possible to run the controller without the proper joystick it should be a simple matter to connect everything to an Arduino and write some code to PWM control the H-Bridge to drive the motors properly. The rest of the unused flyleads appear to all be designed to be inputs back into the controller to make sure that the park brake is off, that the battery level is ok etc so it will also be a case of working out what gives what information and whether its worth providing that feedback as to what is going on to the Arduino. Ultimately though I now have a motor controller that I can control and even though this one was free they seem to be relatively cheap on eBay for the potential they have.

If anyone else wants to have a crack at this, first step will be to (properly) unsolder the white connector on the back of the driver board. Then starting at the left and working to the right (top row first) before doing the same for the bottom row the connections as I have worked them out are as follows

  1. GND?
  2. Mosfet 1 Drain – Monitoring of voltage?
  3. BJT1 Base
  4. H-Bridge Mosfets – Monitoring of voltage?
  5. H-Bridge Mosfets – Monitoring of voltage?
  6. Pin 8 on H-Bridges (DIS)
  7. H-Bridge Mosfets – Monitoring of voltage?
  8. H-Bridge Mosfets – Monitoring of voltage?
  9. Mosfet 2 Drain – Monitoring of voltage?
  10. Linked to 11 via cap
  11. Linked to 10 via cap
  12. Pin 3 H-Bridge 1
  13. Pin 4 H-Bridge 1
  14. Gate of Mosfet 3 via Resistor
  15. Gate of Mosfet 3
  16. 12v Reg output
  17. ??
  18. Base of BJT2
  19. Collector BJT2 – Monitoring of voltage?
  20. Gate of Mosfet 4
  21. Pin 4 H-Bridge 2
  22. Pin 3 H-Bridge 2

3 thoughts on “How to Hack a PG Wheelchair controller

  1. would it be possible to communicate with you via email? I have one of these i an building a r/c lawnmower with. The mower’s intended use will be for a friend of mine with cerebral-palsy. I am having a very hard time figuring out the control to make this happen. You have a great mind!!!

  2. Brilliant! I have sent my PhD Electrical Engineering son a link – he’ll enjoy the read. So cool to see someone putting the theory into practise – and as for your own smelter Awesome!!

    • Hi David, Thanks for the comment, finding ways of reusing things definitely opens up a lot of (cheap) doors when it comes to getting a project to work. Re the smelter I should have a new version up and running in a couple of months that should be more efficient 🙂

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s