Skip to content

A fully 3D-printed remote controller that uses Long Range (LoRa) radio communications to control an RC car.

License

Notifications You must be signed in to change notification settings

TimHanewich/LoRaLink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LoRaLink RC Remote Controller

A fully 3D-printed remote controller that uses Long Range (LoRa) radio communications to control an RC car.

Onboard Components

LoRaLink has quite a few physical components that serve various functions, including control input, communication, GUI display, etc.:

In addition to the components above, you'll also need:

  • 4 M2 screws (about 8 mm in length will work)
  • 1 long M2 screw (16-18mm?) for screwing in the 18650 battery holder to the bottom
  • Some 22-gauge wire (or whatever gauge you have/prefer)
  • A 47K Ohm resistor
  • A 100K Ohm resistor
  • A lot of solder!

Wiring

The wiring diagram for the LoRaLink controller is included below. However, you can open the schematic file on draw.io as well (may be a bit easier to read).

wiring

Assembly

I've provided the STL files for this design that you can 3D-print yourself on Thingiverse here. Altogether, there are three parts you'll need to print:

  • bottom.stl - The "box" of the controller, that each electronic component will go into.
    • bottom_v2.stl - Raspberry Pi Pico USB is now accessible from the side. TP4056 moved over a bit to make room.
    • bottom_v3.stl - 20mm taller (to better accomodate electronics).
  • top.stl - The top plate of the controller that the power switch, SSD-1306, potentiometers, and buttons will be mounted to.
  • 18650_frame.stl - A frame to hold the 18650 battery. Wrap wires around both ends to touch each terminal. Screw this into the bottom.stl.

Changelog

For a full changelog, view the changelog.md file.

Communication Protocol

I've designed a minimalistic, lightweight, robust communication protocol to allow communications between the LoRaLink controller and the device that it is being controller.

All encoding/decoding of these packets into their binary representation is handled by the bincomms.py module, but I further describe the communication protocol below.

The LoRaLink controller and the device being controlled will use a pre-established protocol for communicating with each message being stored as a packet. There for four packet types:

  • Packet Type 0 = Operational Command
  • Packet Type 1 = Operational Response
  • Packet Type 2 = Pulse Call
  • Packet Type 3 = Pulse Echo

These packets are further described below:

The "Pulse Call" Packet

When the LoRaLink controller boots up, it first aims to establish communication with the controlled device via a "pulse" check. The LoRaLink controller sends out this packet to the device and then awaits a response, confirming the presence of the controlled device.

The Pulse Call packet is only a single byte:

pulse call

The "Pulse Echo" Packet

When the controlled device (likely an RC car) boots up, it continuously listens for the Pulse Call packet above. Once it receives it, it confirms its presence by responding with the Pulse Echo packet, only a single byte:

pulse echo

The "Operational Command" Packet

Once communicatation is established via the Pulse Call/Echo packets above, The LoRaLink controller then begins continuously sending a stream of control commands to the controlled device using the Operational Command packet, consisting of two bytes, and described below:

operational command

A value of 1 in the Throttle Direction bit means the throttle is positive (forward) while a value of 0 means the throttle is negative (reversing). The same applies to the steering: 0 is a left turn, 1 is a right turn, for the Steering Direction bit.

The throttle value and steering value are encoded as 6-bit values as seen above.

The "Operational Response" Packet

Occasionally, during normal operation, the controlled device will send this packet back to the controller as a "I'm still alive" message, but also to inform it of its battery level (which will be displayed on the LoRaLink controller).

operational response

As seen above, the remaining 6 bits not used as a packet identifier are used to carry data about the battery.

Other Misc. Resources

  • The PowerPoint deck I used to create the visuals above that depict the binary communication protocol can be downloaded here.

About

A fully 3D-printed remote controller that uses Long Range (LoRa) radio communications to control an RC car.

Topics

Resources

License

Stars

Watchers

Forks

Languages