Low Level

From Elcano Project Wiki
Revision as of 23:59, 15 August 2024 by Elcanoadmin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

LowLevel v4 PCB

The V4 LowLevel PCB builds upon the V3.1 PCB. It still communicates over the CAN bus with the manual control or autonomous system from the receiver system. However, the new LLB is the daughter board for the Arduino Due microcontroller board.

Functionality:

  • Uses binary control for steering as opposed to a PWM input
  • LLB uses internal CAN bus module, removing the need for any external CAN modules
  • Runs on 3.3V of power internally with power provided to the Arduino DUE through a 5v regulator on the DBW board
  • Steering and throttle headers added to lower connector size

Steering Connector J8 Motor Connector J7

  • RJ-45 adapter connected to steering pins

Steering header adapter

  • Brakes use solenoids instead of actuators

Solenoid Brakes

  • Creates file for outputting date and stores it in SD card
  • PCF8523 RTC calculates and stores the following using system time:
    • Milliseconds since compile time
    • Epoch time
    • Date (YYYY/MM/DD)
    • Day of the week
    • Standard time (HH:MM:SS) (AM/PM)

DBW v4 Board

DBWv4Board.jpg DBWv4Layout.png

Power is supplied to the board through the 12 V input on the screw terminal closest to the Arduino DUE and steps this down to 5V and 3.3V through its voltage regulators. The 12V input also supplies the solenoid brakes and to the steering board. CAN L and H are also accessible on this screw terminal or can be connected to from the CAN header that is above the steering header. DBW v4 uses level shifters to convert the peripheral voltage 0-5V to 0-3.3 V which the Arduino DUE is able to operate at. The advantage of this is that the Arduino DUE's internal CAN bus can be used instead of an external module with the trade off being the added complexity of the level shifters. An improvement that can be made is to replace 5 V peripherals with 3.3 V peripherals to reduce the amount of level shifters. This is relevant to the current angle sensors using 5 volts and they can be easily converted to using 3.3 V. The brake relays on the DBW v4 board are setup backwards with 24 V being sent to the brakes by default and this needs to be fixed in future iterations. Other future improvements are the addition of RJ-45 connectors that will eliminate the need for a converter box to be used. Problems with the 5V and 3.3V regulator have been found with the 3.3V regulator failing on at least 3 boards. The 12 volt input is directly connected to multiple IC's and has a high risk of damage if there is a voltage spike created from the connected power supply to the board.


LowLevel v3.1 PCB

Functionality:

  • The LowLevel Board (LLB) is a daughter board (shield) for an Arduino Mega microcontroller. It has been renamed "Drive-By-Wire". It implements drive-by-wire, turning a trike into a CAN-bus based vehicle compatible with commercial self-driving equipment. The LLB communicates over the CAN bus with the higher-level autonomous system or manual control from the receiver system. It directly manages the actuators: the throttle to the motor, the turning servo, and the brakes.


  • Motion directives are received on a CAN bus interface, processed, and articulated.
  • System status (turn angle, wheel linear velocity) is reported back to CAN bus.
  • LLB v3.x has the following interfaces:
    • One CANbus channel on two connectors; a DB9-M and a three-pin screw terminal. The board includes a 120 ohm terminating resistor.
    • X3 Motor (DB-15M): Interface to E-bike controller
      • Analog voltage (approximately 0v to 4v) output to hub motor throttle
      • Digital outputs for activating reverse and regenerative braking.
      • PWM output for PWM-operated braking (no longer used)
      • Analog inputs for hall sensor feedback from motor controllers supporting this feature. These inputs are NOT 5V SAFE. They absolutely require external supporting circuitry.
      • A few spare connections for future expandability, such as a second DAC output and one digital GPIO.

DETAILS > DB15M

    • Steering Header (RJ45):
      • Two sets of pins to support analog potentiometers (5v, signal input, ground) giving angle of front wheels
      • One PWM output (with its own ground) to drive the steering actuator.
      • This cable is broken out into its component signals using an RJ45 patch jack, mounted near the steering actuator.
    • X4 (ODO): Cyclometer (reed switch) input jack. This is pulled high by default, and brought low when the magnet passes the sensor.
    • High current pluggable terminal for solenoid brakes:
      • Connections for ground, 12v, and 24v.
      • Two relay outputs to solenoids: on/off and 12/24V.
  • The LowLevel runs on 5V power, and provides outputs for sensors. Note that the Arduino Mega 2560's regulator has a fairly low current limit, and should not be used for any significant current supply. The Arduino's DC input jack accepts 12V, and its USB port may be connected to a typical USB power supply. The 12V is provided by a DC-DC converter from the main battery (36 to 50V).

Image: LowLevel.JPG

NEXT > High Level

LowLevel v2.1 PCB

Functionality:

  • Version 2.1 used UART serial connections to other boards instead of the CAN bus. It interprets messages from higher-level autonomous systems or manual controls (RC, joystick). It directly manages the state of the actuators; the hub motor, the turning servo, and the brakes.


  • Depending on the current firmware or operating mode, motion directives are received on one of three interfaces;
  • LLB v2.x has the following low-level interfaces:
    • X2 Cruise (DB-25F) - ElcanoSerial messages from High Level.
    • X3 Motor ( DB-15M): Analog voltage (0,4v) output hub motor.
    • X1/X5 Turn Sensors (RJ45): SPI wheel angle sensor digital inputs. (Digital urn sensors were never implemented.)
    • X4 (ODO): Cyclometer (reed switch) input jack. Board layout was incorrect. This signal needs to be jumpered to Arduino pin D2.
    • JP9 (8 pin): Joystick analog input signals.
    • JP12 (3 pin): Pulse output signal to steer.
    • JP11 (3 pin): Pulse output signal to apply main brakes. (No longer used)
    • JP5 (4 pin): Left wheel angle sensor analog input. (Little used since it covers 360 degrees and is less accurate)
    • JP6 (4 pin): Right wheel angle sensor analog input. (Trike prefer this, since it is +/- 30 degrees, and more accurate)
  • LLB v3.x makes significant wiring changes:
    • Removes the ElcanoSerial connection and the DB-25F.
    • Removes JP9, joystick analog inputs.
    • Removes headers used to interface the RC receiver.
    • Adds one CANbus interface on a DE-9F socket. For legacy compatibility UART serial is be available on this interface as well.


LowLevel v1.0 PCB

  • The first version of the LLB was called MegaShieldDB. It had similar functionality, but different connectors. It had five DB connectors.


NEXT > High Level