Contents

Hardware

For connecting the various components without the need for soldering, the use of so-called jumper-wires is recommended. Of course, also regular cables can be soldered onto the pin headers. For the optional Bluetooth Bee module, soldering unfortunately is inevitable because of the short pins and their small pitch.

  1. The jumper-settings on the Discovery Board must be as follows:
    CN4 – Both jumpers fitted (“DISCOVERY”-setting). This enables the onboard ST-LINK/V2 programmer/debugger to be used for our STM32 microcontroller. If the jumpers are not fitted, you can use the ST-LINK programmer for programming external microcontrollers.
    JP3 – fitted. With this jumper, you can measure the current consumption of the microcontroller. Just remove it and insert a current measurement device instead.
    JP1 and JP2 are fitted by default and can be kept like this. Both jumpers connect GND to GND and thus have no direct use. If you would require more ground pins – here you go!
  2. Besides the jumpers, there are several solder bridges on the board that don’t need to be changed. Further information on their use can be found in the board’s User Manual.
  3. Now you can wire all components according to the following table:
    Port / PinConnection to
    Connectors for rotary encoder (speed controller)
    stm32f429i_disco_bottom_markup
    Bottom view of the board
    PA5Rotary encoder (speed controller) Channel A
    PB3Rotary encoder (speed controller) Channel B
    PC13Rotary encoder pushbutton (Select)
    3VRotary encoder supply voltage
    GNDRotary encoder ground
    PA0External Emergency Stop button (optional) as alternative to the blue button on the board. The button must pull PA0 to VDD (3.3V). The internal Pull-Down resistor of the blue on-board button does the rest. For more information please consult the schematics or the User Manual.
    LED Ring
    PE2Sparkfun LED Ring CLK Pin or Seeed Studio Circular LED DCKI Pin
    PE3Sparkfun LED Ring LATCH Pin
    PE6Sparkfun LED Ring DAT Pin or Seeed Studio Circular LED DI Pin
    3VSeeed Studio Circular LED Ring supply voltage
    GNDSeeed Studio Circular LED Ring ground
    DCC signal output to input-optocoupler of a DCC booster
    PC8DCC signal to booster
    PA7DCC signal (complementary) to booster
    GNDDCC reference ground to booster
    Bluetooth module for a wireless connection to an Android mobile device
    PA9Bluetooth Bee v2.0 Rx Pin
    PA10Bluetooth Bee v2.0 Tx Pin
    GNDBluetooth Bee v2.0 GND Pin
    3VBluetooth Bee v2.0 3V3 Pin
    Connection of an external 5V power supply as alternative to USB power supply
    GNDExternal ground
    5VExternal 5V power supply

Encoder-Interface

If you use the Seeed Studio Grove encoder, the signal of the encoder pushbutton unfortunately is not available on the 4-pole interface. The pushbutton also connects to GND instead of supply voltage level. Thus some minor modifications have to be done: a separate jumper cable must be soldered to the pushbutton pin at the encoder (to be able to connect it to PC13 on ARC1) and the circuit track to R5 must be opened, e.g. by cutting with a knife (see figure).

seeed_encoder_mod

When using an arbitrary custom encoder (neither the Seeed Studio Grove encoder nor the Sparkfun Illuminated encoder), the encoder must switch its phases A and B against VDD (3V). Depending on whether the pushbutton switches to GND or to VDD, you have to choose between different ARC1 firmware versions:

ARC1 version for Seeed Studio: Encoder-Pushbutton switches to GND
ARC1 Version for Sparkfun: Encoder- Pushbutton switches to VDD (3V)

Booster-Interface

As there are many commercial and DIY boosters on the market / on the web and a booster would require a custom PCB layout, a booster is not (yet) part of the ARC project. A good list of boosters is given here, but also Google will give a bunch of good results for boosters. Also recommended are the boosters of the OpenDCC project.

ARC1 provides a differential 3.3V DCC signal on pins PC8 and PA7 (positive signal on PC8, negative signal on PA7). Any GND pin can be used as reference for the DCC signal. Thus ARC1 should be compatible with almost any available booster circuit.

Import for the selection and connection of a booster is the galvanic isolation between the booster and ARC1 (e.g. by use of an optocoupler). Most of the commercial and DIY boosters provide adequate means of galvanic isolation. The isolation is important, as in many cases the command station (e.g. ARC1) and the boosters are supplied by different power sources or are localized at different places and thus operate at a different ground level. If there is no galvanic isolation, equalizing currents on the DCC signal lines can permanently destroy your command station.

Software

A great advantage of the ST Microelectronics development boards is, that they are already equipped with an on-board programmer and you won’t need to buy or build a separate programmer for flashing the firmware to ARC1. ST’s proprietary programming and debugging interface is called ST-LINK/V2 or ST-LINK/V2-1 and uses the Mini-USB interface of the board.

Important note: For flashing the firmware, any external 5V power supply should be disconnected. While flashing, the board will get powered by USB.

  1. First of all, you need the ST-LINK USB driver. You can find it here: http://www.st.com/en/embedded-software/stsw-link009.html. Unfortunately you have to register on the ST website first.
  2. You will also need the STM32 ST-LINK utility for programming / flashing of ARC1 based on the compiled firmware binary files. You can download this tool after registering (of course you will only need one registration) here: http://www.st.com/en/embedded-software/stsw-link004.html.
  3. Connect the Mini-USB interface (NOT the Micro-USB interface next to the display) of the development board with your PC. After some seconds the demo-software of ST should appear on the LCD display.
  4. Double-check the correct jumper setting (see above).
  5. Run the STM32 ST-LINK utility and open the ARC-firmware file (*.hex) with “File->Open File” (STRG+O).
  6. Establish a connection to the development board with “Target->Connect”. If the USB driver was installed successfully, this should not evoke any problems. A successfully established connection should give the following log output:
    16:40:44 : Connected via SWD.
    16:40:44 : Connection mode: Normal.
    16:40:44 : Debug in Low Power mode enabled.
    16:40:44 : Device ID: 0x419
    16:40:44 : Device flash Size: 2MBytes
    16:40:44 : Device family: STM32F42xxx/F43xxx
  7. After the connection is established, select “Target->Program & Verify” (STRG+P) and “Start” in the following dialog window to start the programming. You don’t need to change the settings.
  8. The programming and verification should take around 10-20 seconds. After it is completed successfully, the board should restart and boot into the ARC1 firmware. The log output should list something like this:
    16:47:16 : Memory programmed in 12s and 293ms.
    16:47:16 : Verification…OK
    16:47:16 : Programmed memory Checksum: 0x015A31B9
  9. ARC1 is now ready for use and the ST-LINK utility can be closed. Sometimes a manual reset is required before the board starts into the firmware for the first time (reset by pressing the black reset button on the board or by shortly disconnecting the power supply).