Notifications
Clear all

Halls Effect Joystick

22 Posts
5 Users
4 Likes
1,247 Views
(@pgmall)
Member
Joined: 1 year ago
Posts: 8
Topic starter  

@zander There isn't a pot on the controller. I posted the .pdf on the controller.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6969
 

@pgmall Ok, decent documentation. If this documentation is not being fully understood, I think you should hire somebody to complete the job before you cause injury.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@hilldweller)
Member
Joined: 1 year ago
Posts: 111
 

Posted by: @pgmall

@hilldweller I understand where you're coming from. ....... and all liability would be on me being I had the final say

 

I'm glad you take it this way, I've been designing electronic circuits for a long time and just about all data sheets state "this device must not be used for medical purposes". This shows that the manufacturers know that given a good lawyer ( whatever that is ) the liability could pass through the device put on the market, say a wheelchair, to them, the maker of the control chip that drove it.

 

Strangely, I had this conversation with myself in November. I was going away to help my daughter in her new house and I built an emergency transmitter for my wife who is not brilliant on her feet. For what it is worth an Arduino type linked to a SIM900 that sends me and my other daughter a text. Tough I tested it well there is always the concern "what if it fails". Actually the biggest risk is she would forget to put the fob round her neck. Should I have gone and spent a load of cash on a commercial solution ? Even a commercial solution hinged on the fob being worn.

 

For many years I designed computers for CNC machines, I know of one case where a man lost a hand because he disabled a safety guard switch to enable him to work faster. I was cleared of blame. He had been working like this for ages and no-one took it up. But a really determined lawyer might have argued that it should have been impossible to disable that interlock.

 

Now, to be silly, your dad is waiting to cross a road, he knocks the JS. He lunges into the traffic. A huge wagon swerves and slams into a shopping mall, which collapses, cutting the power grid locally just as a 747 was on auto land at the nearby airport......  It turns out no-one knew that this 747 transported nuclear waste on a regular basic.

 


   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1680
 

Hi @pgmall,

  Like the other contributors, I am concerned about the liability situation, bearing in mind that even a 'modest' collision, especially if it was with a person, could become very stressful and expensive, especially if the 'ambulance chasers' become involved. Obviously, I take no responsibility for the consequences of you adopting any suggestion I might make.

This project has very laudable aims but it is not a simple problem. I suspect the commercial products are far from optimal solutions for many of their potential customers, as the needs of each customer will, in some ways, be specific to that person. As well as ensuring your product is 'fundamentally' safe, in that is does not do something like suddenly apply full power due to a faulty component or line of software, you must also ensure that it is usable and controllable by the person using it. You have the 'luxury' of being able to design something specifically for a specific person, but that 'luxury' comes with a responsibility if it fails to meet expectations, which may be 'expensive' in terms of disappointment, etc., even if it is not financially and legally expensive.

--------

Having now glanced at the motor controller spec, I can see that it offers a few options on the control side, which makes life a little easier in terms of driving it from an Arduino or similar, should you decide to have a system where the "joystick" is connected to the Arduino, which in turn runs some kind of control law algorithm that converts the joystick movements into power supplied to the motor. That is at least a minor 'win'.

As i mentioned in my last message, I think you need to carefully specify some aspects, then consider whether you can safely achieve them. As a start, I suggest:

  • The most appropriate 'form' of the 'joystick'. In principal, you could use one of the simple ones often supplied with games controllers and radio controlled model controllers ... but I suspect they are totally inappropriate, even if electrically they meet the requirements. Airbus aircraft pilots use a 'joystick' to fly the plane, but it isn't a simple 5cm pivoted stick!
  •  
  • The 'control law' algorithm that converts the joystick inputs into power drive level... for example, an electric motor can accelerate very quickly, and that can make controlling it difficult, so the algorithm might limit the rate of acceleration ... and possibly, also limit rate of deceleration in 'normal' driving ... but occasionally, the user may need to stop (and start?) quickly, so some means of 'overriding' the limits in an emergency may also be needed.

As I say these are only suggestions to think about ... only you know the needs of the intended user.

I wish you luck with your project. On the positive side, you might develop something that could be adopted by a commercial organisation to meet a currently unfulfilled need.

Take care and best wishes, Dave


   
Inst-Tech reacted
ReplyQuote
(@hilldweller)
Member
Joined: 1 year ago
Posts: 111
 

Posted by: @davee

  • Airbus aircraft pilots use a 'joystick' to fly the plane, but it isn't a simple 5cm pivoted stick!

 

Hole in One there Dave. Do you remember the Airbus that landed in a forest ? As far as I recall they blamed the pilot for ages then it got out it was the software that went into landing mode due to the unfortunate terrain he was flying over.

 

PS Plan B. If wheelchair user has use of both hands, throw in a dead man's handle on one side that chops the power to the motors. No arguing, no software, just a big switch.

 


   
Inst-Tech reacted
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1680
 

Hi @hilldweller,

  Thanks for your reply.

  I do recall an Airbus at a 'show' demonstrating the plane's ability to go from slow, level flight at (say) 100 feet above the ground to  steep climb, accidentally colliding with the forrest.

My impression from the news stories at the time was that he was treating it more like a fighter jet rather than a passenger jet. The idea being the pilot simply pulled the stick hard back and the control algorithms figured out the best combination of engine power, control surfaces, etc to climb as fast as possible whilst just avoiding stalling. At the time, it was suggested the pilot had not (sufficiently) realised the extent to which the ground in front was on an upward hill, and misjudged the distance needed to climb that much.

Whilst acknowledging he was employed to demonstrate the plane's capability at the limits, how and why things went so wrong is unclear to me, including whether or not control software 'got confused' , so that it made the wrong decision, or was the pilot simply asking the plane to do the impossible.

----------

Regarding the plan B, I agree with the sentiment, but in detail remember the motors can (potentially) provide braking for a quicker stop .. opening the supply could remove that action.

Best wishes, Dave


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6969
 

@pgmall I don't see a follow up from You so not sure what that means but here is what I got from the datasheet.

The drawing you posted is missing the arduino UNO needed to operate the chair properly. Without PWM and 'ramping' it will indeed operate as you have it wired. The doc tells us you need the following part https://wiki.seeedstudio.com/Base_Shield_V2/ plus the grove cable between the motor controller and the shield. Plug the cable into one of the analogue pair, either 0/1, 1/2, 2/3, 3/4 I would use 3/4 which is the A3 grove plug on the corner opposite the green led  and the other end into the motor controller analogue plug labelled [AN2 AN1 NC GND] Now plug the UNO into the shield.

This is where I get confused.

Where did that wiring diagram come from. It is confusing in that it only shows one joystick.

The comments and code say that Remote Control/Arduino mode is not implemented.

Here is the .h file showing the constructor commented out

/*
Cytron_SmartDriveDuo::Cytron_SmartDriveDuo(int mode, int rc1Pin, int rc2Pin)
{
_mode = mode;
_rc1Pin = rc1Pin;
_rc2Pin = rc2Pin;

pinMode(_rc1Pin, OUTPUT);
pinMode(_rc2Pin, OUTPUT);
}
*/

And here is the CPP code showing that the RC_MCU mode is NOT implemented.

class Cytron_SmartDriveDuo
{
public:
//Cytron_SmartDriveDuo(int mode, int rc1Pin, int rc2Pin); // For RC MCU mode
Cytron_SmartDriveDuo(int mode, int in1Pin, int in2Pin, int an1Pin, int an2Pin); // For PWM Independent mode
Cytron_SmartDriveDuo(int mode, int txPin, uint32_t baudrate); // For Serial Simplified mode
Cytron_SmartDriveDuo(int mode, int txPin, int boardId, uint32_t baudrate); // For Serial Packetized mode

Confused am I

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Page 2 / 2