Dynamic Controls Power chair, RC Boat trailer project

Power wheelchair board for REAL info!

POWERCHAIR MENU! www.wheelchairdriver.com/powerchair-stuff.htm

Re: Dynamic Controls Power chair, RC Boat trailer project

Postby woodygb » 27 Feb 2018, 12:48

Arduino Shark EMU schematic.jpg
An expert is a person who has made all the mistakes that can be made in a very narrow field.
Niels Bohr
User avatar
woodygb
 
Posts: 7070
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Dynamic Controls Power chair, RC Boat trailer project

Postby gcebiker » 27 Feb 2018, 23:54

Woody, can you post a picture or model of your joystick / power module and your Arduino Code please ?
(or email the Arduino sketch...no point in someone using one that may have errors.)

I will load it onto mine and check for faults (hardware / software / timing ).
and compare the output with the logic analyzer.

My code emulates my Joystick, a REM01 (Pretty sure now i forgot to mention that explicitly ...anywhere, i will address that)

If you have a different Joystick with more functions and you use my start up sequence it will still work but will not enable the extra functions present in the Power Module.
http://greenmobility.com.au/rc-wheelchair-controller/
My YouTube Ch -- https://www.youtube.com/user/gcebiker
User avatar
gcebiker
 
Posts: 879
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Dynamic Controls Power chair, RC Boat trailer project

Postby gcebiker » 28 Feb 2018, 00:16

Abbreviated my code is.
300ms Pulse High (of full battery volts, this is not a data pulse but a DG419 (maxim brand) voltage pulse)

- Then data
(your Start up packet you capture)
- a break

Then your joystick data
(if the joystick is not centered it wont start till it is '192')




No "off" pulse is needed, if the max timing is exceeded the Power Module will stop anyway, it will keep sending its own packets but wont "restart" till a new "startup" packet is sent from the Joystick.
http://greenmobility.com.au/rc-wheelchair-controller/
My YouTube Ch -- https://www.youtube.com/user/gcebiker
User avatar
gcebiker
 
Posts: 879
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Dynamic Controls Power chair, RC Boat trailer project

Postby woodygb » 28 Feb 2018, 01:18

Hi Tony it is very early Shark DK-REMA06 ....the module itself is now obselete ...I will check the model number when it is daylight here.

The code is yours that you posted here and unmodified except for pin numbers as I'm using a Pro Mini.... I'll email you the code tomorrow.

I did try replacing your start up sequence with what I thought might be my start up code ... but nothing.

I checked the ON pulse timing with another Arduino and a bit of code and it was within the parameters.



Image
An expert is a person who has made all the mistakes that can be made in a very narrow field.
Niels Bohr
User avatar
woodygb
 
Posts: 7070
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Dynamic Controls Power chair, RC Boat trailer project

Postby gcebiker » 28 Feb 2018, 03:56

Ill need the model of the Power module as well.(well probally not now that i think of it as the module will just ignore bits of start up code that its not capable of ..lights, etc)

If that is an attendant Joystick you will only need to enable the 'attendant BIT' to 'on' or what ever it is, tho that should be part of your captured start up packet ...mmm

Only thing i can think off is that you have A/B reversed but i bet that is the first thing you tried.

Non the less, i will load your code and try it on my emu to see what it outputs.
Can you cut and paste the bit of code you have changed (into a post) and i will put into my Nano code emu/test.
http://greenmobility.com.au/rc-wheelchair-controller/
My YouTube Ch -- https://www.youtube.com/user/gcebiker
User avatar
gcebiker
 
Posts: 879
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Dynamic Controls Power chair, RC Boat trailer project

Postby woodygb » 28 Feb 2018, 11:29

Power module is a DK-PMA01
An expert is a person who has made all the mistakes that can be made in a very narrow field.
Niels Bohr
User avatar
woodygb
 
Posts: 7070
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Dynamic Controls Power chair, RC Boat trailer project

Postby gcebiker » 28 Feb 2018, 13:02

Woody, your problem is with the Joystick data.

The power module is seeing that the joystick is not centered, just tweak the RC fine adjustment to get the read out to be 192, when stationary.

Column number Joystick Sent start with 96 : Controller Replies start with 33
0 1 2 3 4 5 6 7 8 9 : 0 1 2 3 4 5

96 193 192 255 223 128 140 128 180 15 33 128 128 192 158 15


That joystick code should be 96,192,192 ...else it throws an error.
I find that i cant get mine dead on, so i just start it and then 'tap' the joystick till i hear the brakes click...then its good to go.

Depends on the dead band how much it needs 'tapping'
http://greenmobility.com.au/rc-wheelchair-controller/
My YouTube Ch -- https://www.youtube.com/user/gcebiker
User avatar
gcebiker
 
Posts: 879
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Dynamic Controls Power chair, RC Boat trailer project

Postby gcebiker » 28 Feb 2018, 13:17

If thats an issue for anyone,

Just send a 'fake' packet of Joystick data before the real data,

make a new function
eg Void fakeData () {

fill with fake data


Adjust the "Void Setup () {"
Code: Select all
// If 'off' turn 'on'
  // check state, if on/off button is pressed, change state to "ON" and run start up sequence.
  else if (onOffVal > 1500 && onOffState == LOW)
  {
    onOffState = !onOffState;     // toggle state to HIGH if in'off mode' and on/off button is pressed
    digitalWrite(led, onOffState); // turn on LED pin to get visual indication of on/off state
    sharkStartup();              // call function sharkStartup()

  }


To call the Fake data after the startup data
Code: Select all
// If 'off' turn 'on'
  // check state, if on/off button is pressed, change state to "ON" and run start up sequence.
  else if (onOffVal > 1500 && onOffState == LOW)
  {
    onOffState = !onOffState;     // toggle state to HIGH if in'off mode' and on/off button is pressed
    digitalWrite(led, onOffState); // turn on LED pin to get visual indication of on/off state
    sharkStartup();              // call function sharkStartup()
    fakeData ();   // call fake Joystick data packet so that the Power Module arms, to allow for 'dirty pots'
  }

:thumbup:
http://greenmobility.com.au/rc-wheelchair-controller/
My YouTube Ch -- https://www.youtube.com/user/gcebiker
User avatar
gcebiker
 
Posts: 879
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Dynamic Controls Power chair, RC Boat trailer project

Postby woodygb » 28 Feb 2018, 14:05

The original Sharks joystick sends 193 on one channel and 192 on the other and starts up just fine.

I did try altering the R/C transmitter offsets and make it send EXACTLY 192 ...but nothing.
An expert is a person who has made all the mistakes that can be made in a very narrow field.
Niels Bohr
User avatar
woodygb
 
Posts: 7070
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Dynamic Controls Power chair, RC Boat trailer project

Postby gcebiker » 01 Mar 2018, 04:55

Just to be sure, Woody the Arduino Pro Mini....
Are you using the 3.3v or the 5V model ?

Or are you powering the MAX485 and DG419J from a Traco Power 5V/12v Reg ?

Just trying to rule out brown outs.
http://greenmobility.com.au/rc-wheelchair-controller/
My YouTube Ch -- https://www.youtube.com/user/gcebiker
User avatar
gcebiker
 
Posts: 879
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Dynamic Controls Power chair, RC Boat trailer project

Postby woodygb » 01 Mar 2018, 11:41

5v model and YES ......Iam powering the MAX485 and DG419J from a Traco Power 5V/12v Reg ? .
An expert is a person who has made all the mistakes that can be made in a very narrow field.
Niels Bohr
User avatar
woodygb
 
Posts: 7070
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Dynamic Controls Power chair, RC Boat trailer project

Postby gcebiker » 01 Mar 2018, 13:21

Pics from todays build for the code tester.
Woody, i will cut and paste your start up code and use the same power module as you.

I have run out of Traco Power regulators but i hope it will work as is from a 5v supply, else i will use one of the DC-DC converters i have laying around.

Bare boards from 'Dirty Cheap PCB' with Low profile components
DSC_0133.JPG


With Arduino mounted
DSC_0134.JPG

Ill solder some pins into the outputs and ground so i can connect the logic tester tomorrow.

Arduino Nano Ver 3.0 code pre adding woddys start up code, to test its working.
SR_RC_PCB_Board_July_26_2017.zip
(4.82 KiB) Downloaded 275 times
http://greenmobility.com.au/rc-wheelchair-controller/
My YouTube Ch -- https://www.youtube.com/user/gcebiker
User avatar
gcebiker
 
Posts: 879
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Dynamic Controls Power chair, RC Boat trailer project

Postby woodygb » 01 Mar 2018, 13:53

Thank you very much Tony... I will keep my fingers crossed that you can identify the problem.

If yours setup works it at least identifies the problem as being at my end/build.
An expert is a person who has made all the mistakes that can be made in a very narrow field.
Niels Bohr
User avatar
woodygb
 
Posts: 7070
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Dynamic Controls Power chair, RC Boat trailer project

Postby gcebiker » 03 Mar 2018, 08:33

The issue is with the timing,

I have eliminated code being the issue

I am now looking into the Version of Arduino or versions of Software Serial Being the reason.

The timing is to be 20ms between packets but at present its 38.92ms, thus the Shark Power Module is signaling a Bus Fault and Shutting down.
http://greenmobility.com.au/rc-wheelchair-controller/
My YouTube Ch -- https://www.youtube.com/user/gcebiker
User avatar
gcebiker
 
Posts: 879
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Dynamic Controls Power chair, RC Boat trailer project

Postby woodygb » 03 Mar 2018, 10:14

Thanks for that Tony.....I'll also have a little poke about at my end for information.
An expert is a person who has made all the mistakes that can be made in a very narrow field.
Niels Bohr
User avatar
woodygb
 
Posts: 7070
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Dynamic Controls Power chair, RC Boat trailer project

Postby gcebiker » 03 Mar 2018, 12:08

Perhaps running it on USB is to much with the MAX485, DG419 and RC Receiver.

Low power leading to timing issues ?

Ill try to fit it to the chair power, but given the wacky timing i am glad i did not mess with the Arduino running the working RC chair.
Ill report back if i find anything.

//EDIT, YEP lOW POWER , fitting the module to the chair and powering via the TracoPower VReg, fixed the timing.

So now to put in Woddys code (was getting wacky timing errors so reverted to my startup packet to try and identify the problem)
http://greenmobility.com.au/rc-wheelchair-controller/
My YouTube Ch -- https://www.youtube.com/user/gcebiker
User avatar
gcebiker
 
Posts: 879
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Dynamic Controls Power chair, RC Boat trailer project

Postby gcebiker » 03 Mar 2018, 12:21

Yes :dance Woody your code works.
Looks like you may have a brown out somewhere leading to bad timing, Insufficient power via USB 2 and USB 3 ports.

During build up i was powering mine via the chair...a fluke that i did not stump myself in the process of it all.

Well thats that solved cheers

...tho i did roll back the version of the Arduino IDE i was using, doubt that made any difference as the timing issue went away once the EMU was powered via the wheelchair.
http://greenmobility.com.au/rc-wheelchair-controller/
My YouTube Ch -- https://www.youtube.com/user/gcebiker
User avatar
gcebiker
 
Posts: 879
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Dynamic Controls Power chair, RC Boat trailer project

Postby woodygb » 03 Mar 2018, 13:33

Thank you for trying ...but ultimately it helps very little as I am using a TRACO etc etc ...so I very much doubt that I have any brown out problems.

I will need to buy in the same model of Arduino that you use and see what happens.
An expert is a person who has made all the mistakes that can be made in a very narrow field.
Niels Bohr
User avatar
woodygb
 
Posts: 7070
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Dynamic Controls Power chair, RC Boat trailer project

Postby gcebiker » 03 Mar 2018, 14:08

I will post you one of my boards, should be cheap enough in a DL envelope.
PM me an address and I will do it Monday.

I will included an Arduino Nano with it...Ive got loads of em.

Jim had to pay a small 'import tax' or something on his but i did send a whole box of stuff to him.

Hopefully a DL envelope wont cause to much of a stir. I think it was called an handling fee ?
http://greenmobility.com.au/rc-wheelchair-controller/
My YouTube Ch -- https://www.youtube.com/user/gcebiker
User avatar
gcebiker
 
Posts: 879
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Dynamic Controls Power chair, RC Boat trailer project

Postby gcebiker » 03 Mar 2018, 15:17

One of my first videos of the process.

https://www.youtube.com/watch?v=YVvPwSwwGj8&index=18&list=UU6XFCNoJ44ECOPWs-7ruHkA

..super messy but it worked...a real pita to solder those boards though.

Blue boards are available from Dirty Cheap PCB's via this link http://dirtypcbs.com/store/designer/det ... -v3-23-zip for anyone wanting to build this up.

Short run down on the boards/build http://gctek.me/dynamic-controls/shark/ ... ontroller/

Woody, i will send yours pre populated with most of the parts (the one i built up to test the code) :ebay
http://greenmobility.com.au/rc-wheelchair-controller/
My YouTube Ch -- https://www.youtube.com/user/gcebiker
User avatar
gcebiker
 
Posts: 879
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Dynamic Controls Power chair, RC Boat trailer project

Postby gcebiker » 03 Mar 2018, 15:35

]http://www.wheelchairdriver.com/board/download/file.php?id=7848&mode=view

Other tiny things, perhaps an issue
Ro Goes to D6 (you have it going to D5 in your diagram.)
Code: Select all
// Pin outs for RS485 chip
const int roPin = 6;        // to RO of Max485 to RX of Arduino
const int dePin = 7;        // to DE and RE of Max485
const int diPin = 9;         // to DI of Max485 to TX of Arduino


And you have pinMode (dePin, OUTPUT) ...which of course it is but just checking you are using DI of the Max485 to connect to the Arduino SoftSerial TX line ?
Apparently depending on the version of the Arduino IDE/ SoftwareSerial/ NewSoftSerial you are using the TX line does need to be explicitly set as Output...
Which would be pinMode (diPin, OUTPUT); , where as you have set DE and left out DI.

Maybe the dePin, OUTPUT is blocking the Max485 from Transmitting ?
I dont have that in my test code for your start up data.
SR_RC_PCB_Board_March_3_2018_woody.zip
(5.08 KiB) Downloaded 297 times


Grasping at straws here.
http://greenmobility.com.au/rc-wheelchair-controller/
My YouTube Ch -- https://www.youtube.com/user/gcebiker
User avatar
gcebiker
 
Posts: 879
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Dynamic Controls Power chair, RC Boat trailer project

Postby woodygb » 03 Mar 2018, 16:20

My diagram?....That is a copy of one you posted.
An expert is a person who has made all the mistakes that can be made in a very narrow field.
Niels Bohr
User avatar
woodygb
 
Posts: 7070
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Dynamic Controls Power chair, RC Boat trailer project

Postby woodygb » 03 Mar 2018, 17:04

According to the Realterm software program my setup IS outputting the correct code ....

I'm fairly certain now that it is a Comms mismatch .... so I will attempt to read the signal timing.
An expert is a person who has made all the mistakes that can be made in a very narrow field.
Niels Bohr
User avatar
woodygb
 
Posts: 7070
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Dynamic Controls Power chair, RC Boat trailer project

Postby gcebiker » 04 Mar 2018, 04:42

woodygb wrote:My diagram?....That is a copy of one you posted.


...not sure where it came from then...i cant draw that well.
http://greenmobility.com.au/rc-wheelchair-controller/
My YouTube Ch -- https://www.youtube.com/user/gcebiker
User avatar
gcebiker
 
Posts: 879
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Dynamic Controls Power chair, RC Boat trailer project

Postby woodygb » 04 Mar 2018, 10:20

gcebiker wrote:
woodygb wrote:My diagram?....That is a copy of one you posted.


...not sure where it came from then...i cant draw that well.


viewtopic.php?f=2&t=4867&p=105227#p105228
An expert is a person who has made all the mistakes that can be made in a very narrow field.
Niels Bohr
User avatar
woodygb
 
Posts: 7070
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Dynamic Controls Power chair, RC Boat trailer project

Postby gcebiker » 04 Mar 2018, 13:40

Oh its been a long year, forgot about that misadventure.
Yeah the pins are non critical...and changed when i built the V3.23 boards.

This is Ver 3.25 , Ive not had them made yet.
Ver3.25.png


Its not much different, just put in the trace for the 5v supply i forgot in 3.23 ...not a big issue anyway and added a spot to wire in a switch if desired (or wire link if not)

Its a bit big, i was thinking off making it small enough to fit inside a Wii Nunchuck Receiver case...but getting on the water fishing is taking precedence now that the Power chair ver3.23 is working.
http://greenmobility.com.au/rc-wheelchair-controller/
My YouTube Ch -- https://www.youtube.com/user/gcebiker
User avatar
gcebiker
 
Posts: 879
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Dynamic Controls Power chair, RC Boat trailer project

Postby gcebiker » 17 Mar 2018, 09:39

Sold the Poly Craft boat today, thinking it was too heavy for the RC Power chair to tow it.

Swapped out the Lead Acid batteries for 45Ah LiFePo4's ...thinking the batteries were getting voltage sag and shutting it down.

...only to find its still having the same issues.

So its likely that there are timing issues when the RC power chair gets under load.
Code will need to be altered to read / respond to packets from the power base.

Woody yours should be there or not far away, its not seeming to be a problem driving around unloaded...

Ive not tried to program via the RC Shark Emulator but will give it a go tomorrow, see if i can lower the voltage cut off limits.
http://greenmobility.com.au/rc-wheelchair-controller/
My YouTube Ch -- https://www.youtube.com/user/gcebiker
User avatar
gcebiker
 
Posts: 879
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Dynamic Controls Power chair, RC Boat trailer project

Postby woodygb » 17 Mar 2018, 10:04

Hi Tony,

It did indeed arrive... MANY THANKS.

I added the Traco and the link ......sadly I still have the same issue.

Woody
An expert is a person who has made all the mistakes that can be made in a very narrow field.
Niels Bohr
User avatar
woodygb
 
Posts: 7070
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

Re: Dynamic Controls Power chair, RC Boat trailer project

Postby gcebiker » 18 Mar 2018, 00:17

...not wiring , not code.

PPM values/code for values ?

only thing different is the RC inputs ?
http://greenmobility.com.au/rc-wheelchair-controller/
My YouTube Ch -- https://www.youtube.com/user/gcebiker
User avatar
gcebiker
 
Posts: 879
Joined: 11 Jul 2015, 14:20
Location: Gold Coast, Queensland, Australia.

Re: Dynamic Controls Power chair, RC Boat trailer project

Postby woodygb » 18 Mar 2018, 10:02

I do not know what you want to me to say ... as far as I'm aware it is setup EXACTLY how it is supposed to be and is outputting the expected pulse and code.
An expert is a person who has made all the mistakes that can be made in a very narrow field.
Niels Bohr
User avatar
woodygb
 
Posts: 7070
Joined: 12 Mar 2011, 18:45
Location: Bedford UK

PreviousNext

Return to Everything Powerchair

Who is online

Users browsing this forum: acid_coke, Bing [Bot], shirley_hkg and 78 guests

 

  eXTReMe Tracker