The wheelchair has four wheels, which consist
of two rear wheels and two front wheels. The
two front wheels are pivot wheel which are
set free. There is no actuator which drives
both front wheels. Thus, the front wheels can
move freely in rotation and straight direction.
Therefore, movement of the wheelchair can
only be performed by driving the rear wheels.
Diameter of the front wheel is 10 cm and
diameter of the rear wheel is 22 cm. Two DC
motor are used as the actuator of the
wheelchair. One DC motor drives one rear
wheel.
Specifications of the DC motors are 20 V, 2 A,
and 200 rpm. The DC motor that is used to
actuate rear wheel, has its own gearbox to
reduce the speed of the motor in the ratio of
1:15. Then, speed of the motors is reduced again by using gears and chain system with ratio
1:5. Thus, speed of the motor is totally reduced with ratio 1:75. On the contrary, the torque
of the motor totally increases with ratio 1:75. Because the maximum gear box output speed
of the DC motor is 200 rpm
Joy stick controls the moving direction of the wheelchair (i.e. move forwards or backwards
and turn left or right). Maximum carrying weight of automated wheelchair is 100kg. Once
the weight limit is reached, alarm should be activated and blink a red bulb. Path should be
recorded and store in memory.
There should be a method to recall the path information and come back to the started
location. There should be means to stop the wheelchair whenever an emergency situation is
occurred. Wheelchair should stop if there are any obstacles. Speed of the motors can be
controlled by varying the duty cycle of the PWM (Pulse Width Modulation) signals

Dani AI

Generated

A compact roadmap and practical starter code for an 8051-based joystick wheelchair controller, with implementation and safety points pulled from the thread discussion.

Core architecture — analog two-axis joystick -> external ADC -> 8051 control logic -> motor driver (H-bridge) -> two drive motors; wheel encoders for odometry and path recording; load sensor for an overload alarm; short-range obstacle sensors and a hardware kill input for immediate stop. Classic 8051 variants usually lack ADC and PWM hardware, so plan an external ADC (serial or parallel) and implement PWM in firmware (timer ISR) or add a small PWM controller IC. As observed, expect motor current spikes on startup, on inclines, and under heavy load; include current sensing and a soft-start ramp.

Example Keil-C sketch (illustrative) showing software PWM in a timer ISR and mapping joystick ADC samples into direction + differential PWM:

/* Keil C (reg51.h) - illustrative software PWM + joystick mapping */
#include <reg51.h>
#define PWM_RES 100
#define CENTER 128
#define DEAD   12

sbit DIR_L = P1^0;
sbit DIR_R = P1^1;
sbit PWM_L = P1^2;
sbit PWM_R = P1^3;

volatile unsigned char tick;
volatile unsigned char dutyL, dutyR;

/* Timer0 ISR: advance PWM phase and set outputs */
void Timer0_ISR(void) interrupt 1 {
  tick = (tick + 1) % PWM_RES;
  PWM_L = (tick < dutyL);
  PWM_R = (tick < dutyR);
}

/* ADC_read(channel) must be implemented for chosen ADC hardware */
unsigned char ADC_read(unsigned char ch) { return 128; /* placeholder */ }

void map_joystick(unsigned char x, unsigned char y) {
  int cx = (int)x - CENTER;
  int cy = (int)y - CENTER;
  int base = (cy < 0) ? -cy : cy;
  if (base < DEAD) { dutyL = dutyR = 0; return; }
  int forward = (base * PWM_RES) / 127;
  int turn = (cx * forward) / 127;
  int l = forward + turn; int r = forward - turn;
  if (l<0) l=0; if (l>PWM_RES) l=PWM_RES;
  if (r<0) r=0; if (r>PWM_RES) r=PWM_RES;
  DIR_L = (cy >= 0); DIR_R = (cy >= 0);
  dutyL = l; dutyR = r;
}

Path recording and replay — record encoder tick deltas with timestamps to EEPROM or SD (simple record: [dt, left_ticks, right_ticks]). Replay requires closed-loop control (use encoder feedback and a speed/position PID) rather than open-loop timing; dead-reckoning drifts — periodic absolute corrections (beacons, markers, or external position sensors) improve return accuracy.

Practical cautions and workflow notes: calibrate joystick center and deadzone; implement soft-start to limit inrush; use hardware interrupt for an immediate kill switch; place current-sense and thermal/fuse protection; debounce and handle encoder noise; test incrementally on a bench rig without a seated user. Thread comments from and reflect common project planning realities — a minimal prototype is achievable in weeks, but a robust, safe product (sensors, failsafes, testing) requires more time and careful validation.

Recommended Answers

All 6 Replies

And your question?

This sounds more like an engineering task. There are websites like guru.com, etc. where you can post this kind of thing and find someone to build it for you! You will need to indicate whether you're trying to create a new wheel chair or retrofit an existing one! You will also need to indicate the stored history (for spying purposes) so you know where the wheel chair went that day when overlaid onto a map, as well as other information! Motors do not draw the same current all the time. When ever you accelerate they surge current (especially from a still position). Any incline will cause more current to be used. Carry a full or overweight capacity will surge! 2A is typically a running on flat plain no slope, with moderate load.

I do not think you will be able to code it in even 2-3 months.

Actually pretty straight forward! Two months no problem! And I need the work! My employer sent us all home over three weeks ago.

my question is coding for that project.

Sorry we digressed but this website policy is that we can't post code except in response to helping you correct your posted code. Since you haven't posted code our ability to help you is limited!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.