Van Laddercase Step

In this passenger transport van for people with reduced mobility, the stairs that allow passengers to enter from the side have stopped working automatically.

Until now I was just working manually with one button that made the ladder open and another button that made the ladder retract.

If the user operating the ladder, opening or closing mechanism does not release the button, the motor will continue to apply force even when the ladder is fully open/close, causing an increase in current that leads to the fuse blowing.

Fig.1 - Ladder open.

Fig.2 - Ladder close.

These ladders operate with a DC 12V motor and have a maximum current consumption at peak of 8A.

There are some lengthy conditions in this project, such as:

  • The staircase must open as soon as the side door opens;
  • The staircase must close as soon as the side door closes;
  • The circuit must detect that the side door has been opened, and the motor will starts rotate clockwise, and as soon as the current sensor detects a current equal to or greater than 7A, it must stop the motor. This means that the entire staircase is now full open;
  • The circuit must detect that the side door has been close, and the motor will starts rotate counterclockwise, and as soon as the current sensor detects a current equal to or greater than 7A, it must stop the motor. This means that the entire staircase is now full close.

I decided to make a prototype, and the material used was:

Microcontroller Arduino Uno V3

Descrição da Imagem 1
Fig.3 - Arduino Uno V3 - Front view.
Descrição da Imagem 2
Fig.4 - Arduino Uno V3 - Rear view.

5V 2-Relay Module

Fig.5 - Module 2 Relays.

Specifications:

  • Operating voltage: 5V;
  • 2 Channels;
  • Item weight: 29g;
  • Dimensions: 4.9 * 3.8 * 1.7 cm.

Velleman WPSE323 - Module of currente sensor ACS712 20A

Descrição da Imagem 1
Fig.6 - Currente sensor ACS712 - Front view.
Descrição da Imagem 2
Fig.7 - C urrente sensor ACS712 - Rear view.

Specifications:

  • Operating voltage: 5V;
  • Measurement range: -20 to +20 A;
  • Output voltage: VCC/2 with no load;
  • Dimensions: 31 x 13 x 12 mm.

Motor 12VDC

Fig.8 - DC 12V Motor.

Specifications:

  • Shaft length: 45mm;
  • Housing dimensions: Ø24.2x30.5mm;
  • Operating temperature: -40...60°C;
  • Power supply voltage: 12V DC;
  • Operating voltage: 8.5...15.5V DC;
  • Motor type: DC;
  • Rated motor speed: 6900 rpm.

Button

Fig.9 - Button.

Specifications:

  • 12Vdc / 50mA contacts;
  • Working pressure 160 +/- 30 gf;
  • Resistance 100 Mohm Max.;
  • Dimensions: 6.0x6.0mm;
  • Button height: 1.5mm;
  • Total height 5.0mm;
  • Effective lifespan: 100,000 cycles.

The idea is to simulate the circuit...

Here is the circuit with everything is connected.

Fig.10 - Circuit I.

Fig.11 - General circuit with identified components.

Arduino Code for Motor Control with Current Sensor.

Here is the program for the Arduino Nano V3 that uses the ACS712 current sensor and a 2-channel relay module to control a 12VDC motor direction and shut it down when a current limit of 7A is reached.

This code implements the direction-changing logic with a single push button (simulating the opening or closing of the door).

  • ACS712 Sensor (Analog Output) - Pin A1 - Current reading.
  • Push Button - Pin 4 - Activate and change motor direction.
  • Relay 1 (Direction 1 Control) - Pin 3 - Activates Rotation in Direction 1.
  • Relay 2 (Direction 2 Control) - Pin 2 - Activates Rotation in Direction 2.
  • GND / VCC - GND / 5V - Component power supply.

The motor must be connected to the relays in a way that allows polarity reversal (and consequently, direction) when switching between Relay 1 and Relay 2. The current sensor should be placed in series with the motor's power line (GND or VCC).

Button and INPUT_PULLUP: The code uses the INPUT_PULLUP configuration for the button pin. This means the pin is normally HIGH, and when the button is pressed, it must connect pin 4 to GND, causing the reading to be LOW.

This activates a resistor (typically between 20 kΩ and 50 kΩ) connected internally between the digital pin and the +5V power supply (VCC).

When the button is not pressed (i.e., the circuit is "open"), this resistor pulls the pin voltage up to HIGH (+5V), ensuring the reading is stable and doesn't "float" (subject to electrical noise).

Relay Module: Most 5V relay modules are active-LOW, meaning the relay is turned ON when the Arduino pin is LOW and turned OFF when it is HIGH. The code is written assuming this configuration.

ACS712 Sensor: The readCurrent() function calculates the current in Amperes based on the 100 mV/A sensitivity of the ACS712-20A model.

Fig.12 - Code for the arduino part 1.

Fig.13 - Code for the arduino part 2.

Leave A Comment