2015-01-05 08:30:57 -08:00
|
|
|
# Board - CJMCU
|
2014-10-24 17:15:57 -07:00
|
|
|
|
2015-01-05 08:30:57 -08:00
|
|
|
The CJMCU is a tiny (80mm) board running a STM32F103, which contains a 3-Axis Compass (HMC5883L)
|
2014-10-24 17:15:57 -07:00
|
|
|
and an Accelerometer/Gyro (MPU6050).
|
|
|
|
|
|
|
|
This board does not have an onboard USB-Serial converter, so an external adapter is needed.
|
|
|
|
|
2015-01-05 08:30:57 -08:00
|
|
|
# Hardware revisions
|
|
|
|
|
|
|
|
| Revision | Notes |
|
|
|
|
| -------- | ----- |
|
|
|
|
| 1 | no boot jumper at the edge of the board. |
|
|
|
|
| 2 | identified by no boot jumper pads at the edge of the board. |
|
|
|
|
|
|
|
|
Version 2 boards are supported from firmware v1.4.0 onwards, do NOT flash earlier versions to version 2 boards.
|
|
|
|
|
2014-10-24 17:15:57 -07:00
|
|
|
# Pins
|
|
|
|
|
2015-01-05 08:30:57 -08:00
|
|
|
## RX Connections
|
2014-10-26 17:37:56 -07:00
|
|
|
|
2015-01-05 08:30:57 -08:00
|
|
|
| Pin Label | Description |
|
|
|
|
| --------- | ------------------------ |
|
|
|
|
| PA0 | RC Channel 1 |
|
|
|
|
| PA1 | RC Channel 2 |
|
|
|
|
| PA2 | RC Channel 3 / USART2 TX |
|
|
|
|
| PA3 | RC Channel 4 / USART2 RX |
|
|
|
|
| VCC | Power +3.3v |
|
|
|
|
| GND | Ground |
|
|
|
|
|
|
|
|
## Serial Connections
|
2014-10-24 17:15:57 -07:00
|
|
|
|
2015-01-05 08:30:57 -08:00
|
|
|
USART1 (along with power) is on the following pins.
|
2014-10-26 17:37:56 -07:00
|
|
|
|
|
|
|
| Pin Label | Description |
|
|
|
|
| --------- | --------------- |
|
2015-01-05 08:30:57 -08:00
|
|
|
| TX1 | UART1 TX |
|
|
|
|
| RX1 | UART2 RX |
|
2014-10-26 17:37:56 -07:00
|
|
|
| GND | Ground |
|
|
|
|
| 3V3 | Power +3.3v |
|
|
|
|
| 5V | Power +5v |
|
2014-10-24 17:15:57 -07:00
|
|
|
|
2015-01-05 08:30:57 -08:00
|
|
|
USART2 is the following pins.
|
|
|
|
|
|
|
|
| Pin Label | Description |
|
|
|
|
| --------- | ----------- |
|
|
|
|
| PA2 | USART2 TX |
|
|
|
|
| PA3 | USART2 RX |
|
|
|
|
|
|
|
|
|
|
|
|
## Power Connections
|
2014-10-26 17:37:56 -07:00
|
|
|
|
|
|
|
| Pin Label | Description |
|
|
|
|
| --------- | ----------------------- |
|
|
|
|
| Power + | Power - 1 Cell 3.7v Max |
|
|
|
|
| Power - | Ground |
|
2014-10-24 17:15:57 -07:00
|
|
|
|
2015-01-05 08:30:57 -08:00
|
|
|
## Motor Connections
|
|
|
|
|
2014-10-24 17:15:57 -07:00
|
|
|
In standard QUADX configuration, the motors are mapped:
|
2014-10-26 16:49:08 -07:00
|
|
|
|
2015-01-05 08:30:57 -08:00
|
|
|
| Cleanflight | CJMCU |
|
2014-10-24 17:15:57 -07:00
|
|
|
| ----------- | ------ |
|
|
|
|
| Motor 1 | Motor3 |
|
|
|
|
| Motor 2 | Motor2 |
|
|
|
|
| Motor 3 | Motor4 |
|
|
|
|
| Motor 4 | Motor1 |
|
|
|
|
|
|
|
|
It is therefore simplest to wire the motors:
|
|
|
|
* Motor 1 -> Clockwise
|
|
|
|
* Motor 2 -> Anti-Clockwise
|
|
|
|
* Motor 3 -> Clockwise
|
|
|
|
* Motor 4 -> Anti-Clockwise
|
|
|
|
|
2015-01-05 08:30:57 -08:00
|
|
|
If you are using the Hubsan x4/Ladybird motors, clockwise are Blue (GND) / Red (VCC) wires, anticlockwise
|
|
|
|
are Black (GND) / White (VCC).
|
|
|
|
i.e. there is one wire on each motor out of the standard RED/BLACK VCC/GND polarity colors that can be used to identify polarity.
|
2014-10-24 17:15:57 -07:00
|
|
|
|
|
|
|
If you have wired as above, Motor1/Motor2 on the board will be forward.
|
|
|
|
|
|
|
|
# Connecting a Serial-USB Adapter
|
|
|
|
|
|
|
|
You will need a USB -> Serial UART adapter. Connect:
|
2014-10-26 16:49:08 -07:00
|
|
|
|
2015-01-05 08:30:57 -08:00
|
|
|
| Adapter | CJMCU |
|
2014-10-24 17:15:57 -07:00
|
|
|
| ----------------- | -------------------------- |
|
|
|
|
| Either 3.3v OR 5v | The correct 3.3v OR 5v pin |
|
|
|
|
| RX | TX |
|
|
|
|
| TX | RX |
|
|
|
|
|
|
|
|
When first connected this should power up the board, and will be in bootloader mode. If this does not happen, check
|
|
|
|
the charge switch is set to POW.
|
|
|
|
After the flashing process has been completed, this will allow access via the cleanflight configurator to change
|
|
|
|
settings or flash a new firmware.
|
|
|
|
|
|
|
|
WARNING: If the motors are connected and the board boots into the bootloader, they will start
|
|
|
|
to spin after around 20 seconds, it is recommended not to connect the motors until the board
|
|
|
|
is flashed.
|
|
|
|
|
|
|
|
# Flashing
|
|
|
|
|
|
|
|
To flash the board:
|
|
|
|
* Open Cleanflight Configurator
|
2015-01-05 08:30:57 -08:00
|
|
|
* Choose the latest CJMCU firmware from the list.
|
|
|
|
* Select "Load Firmware [Online]" and wait for the firmware to download.
|
2014-10-24 17:15:57 -07:00
|
|
|
* Tick "No Reboot Sequence" and "Full Chip Erase"
|
|
|
|
* Connect the USB->Serial adapter to the board
|
|
|
|
* Select the USB-UART adapter from the top left box
|
|
|
|
* Click "Flash Firmware"
|
|
|
|
* You should see "Programming: SUCCESSFUL" in the log box
|
|
|
|
* Click "Connect" -> This should open the "Initial Setup" tab and you should see sensor data from the quad shown
|
|
|
|
* Unplug the quad and solder across the 2 "BOOT0" pins - This prevents the board from going into bootloader mode on next
|
|
|
|
boot, if anything goes wrong, simply unsolder these pins and the bootloader will start, allowing you to reflash. You cannot
|
|
|
|
overwrite the bootloader.
|
|
|
|
|
|
|
|
# Helpful Hints
|
|
|
|
|
2014-10-26 17:37:56 -07:00
|
|
|
* If you are only using a 4 channel RX, in the auxiliary configuration tab, you can add a "Horizon" mode range around 1500
|
2014-10-24 17:15:57 -07:00
|
|
|
for one of the the AUX channels which will result in it being always on
|
|
|
|
* Enabling the feature MOTOR_STOP helps with crashes so it doesn't try to keep spinning on its back
|
|
|
|
* When the power runs low, the quad will start jumping around a bit, if the flight behaviour seems strange, check your batteries charge
|
|
|
|
|