• 990.011 MuIn dsNAV - User Manual [EN]


    The dsNav board is designed around a Microchip dsPIC33FJ128MC802 motor controller DSC. All the documentation about dsPIC33FJ family is available for free at Microchip web site, as well as detailed description of every single feature of MC series. It is strongly recommended to download the PDF files in order to have a practical and fast reference for any doubt.

    Please read Datasheet for an overview of this product.

    All the pins of DSC are available on the board but this one is optimized to drive a couple of motors with a closed loop control. For this reason socket, plugs and pin headers are placed to easily interface two H-bridges to drive motors and two encoders for the feedback. The ENC1 and ENC2 encoders plugs follow the US Digital pinout.

    The used DSC is a 28 pin PDIP version, mounted on a socket to easily change it with other device of the same family available now or in future. Because dsPIC33FJ family has the very useful feature of pin remapping (see details on Microchip documentation), to match the description of the headers depicted on the board, the open source code freely available on our site could and should be used simply as a configuration template to develop your own code, or as a complete project using the whole program.

    Programming

    A simple build of the available software, less or more modified, or a brand new software started from scratch, can both be realized with Microchip C30 compiler (also available in free student edition). The software provided is fully compatible also with the free version of the C30 compiler. There are different ways to program the dsPIC: the best and more flexible way is with a good programmer. On our web store are available most of the Microchip programmers/debuggers, from the simple PicKit2 or 3 to the full featured ICD3. Connecting them to the standard pin out ICSP connector on the dsNav board, all the programming and debugging functions of the free Microchip MPLAB IDE can be used, making the development of your code a lot more efficient:


    A money-saving alternative could be through the use of the preprogrammed bootloader. A simple USB to serial adapter (e.g.: Serial-USB adapter 990.004 on our store) directly connected to the UART1 port allows the
    programming of the dsPIC with the hex file generated by the compiler:


    Both Microchip MPLAB IDE and C30 compiler can be used to obtain the hex file, all the debugger simulation features of MPLAB can be used as well. Only the on-chip debug cannot be used in this case.
    Note:since UART1 is shared with RS485, if RS485 is enabled, bootloading is not allowed. If you have another board (like a sensor board) connected to UART1, you must disconnect it before use a serial adapter in order to use bootloader feature.
    The preprogrammed bootlader program, on idle drives the two general purpose LEDs as a very basic test about the good health of the board even if no new code was burned in. Applying a 6 to 12V power supply to the “Power” connector, starts the LEDs blinking.


    H-Bridge connections examples

    The PWM1, PWM2 headers are designed to allow the connection to different H-bridge, according to the motors power requirements. Here is a brief description of PWM plug:


    Use with L298-based Hbridges
    A couple of GHM-01 12V motors can be driven with a simple “K CMD” double bridge based on popular L298 chip. In this case the software drives complementary PWM+, PWM- as required by L298. The current sense pin is used to have a feedback of the current load to the motors to potentially cut-off power in case of overload. Due to the internal circuit of the L298, a low voltage feedback, proportional to the current, is available.


    An high-impedance operational amplifier is provided on board to adapt the low level signal to the 0-3.3V range required by the dsPIC. In this case the “CS1 gain”, “CS2 gain” jumpers must be left open, cutting the default little track in between with a knife. This allows a 10x gain that arise a 0.33V level to the required 3.3V:


    Use with 990.009 TANK-3A HP
    A more powerful GHM03 pair of motors requires bigger H-bridges such a couple of 990.009 TANK-3A HP. This requires DIR and PWM signals from the dsNav board. This behavior can be easily changed on software. The LMD 18200 chip internal circuitry provide an higher voltage level for current sensing feedback. Leaving the “CS1 gain” and “CS2 gain” jumpers closed as at default, the gain of the op-amp is 1x acting solely as a buffer. With this H-bridge the “Thermal sensing” pin on the header is used, redirecting a voltage proportional to the bridge chip temperature to an A/D port of the dsPIC, allowing a further control for motor overload.

    If thermal sensors feature is used, it is advisable to enable the included low-pass filter, leaving the jump pads at the bottom side connected as at default:


    The A/D ports needed to read bridge temperature share the sam pins of PGC/PGD. If this feature is used the PGC and PGD headers must be leave open on programming and closed when used as analog input:


    In order to use all the capability of the dsNav board, performing an accurate PID control, H-bridges that work on all four quadrants must be used, meaning in LAP mode as the two examples shown. No Sign/Magnitude mode only Hbridges are recommended.

    Encoders

    Maximum performances are achieved only with high resolution encoders, mounted directly on motor axis, not on wheels or on intermediate gears. A 300cpr encoder is recommended such as Easy Roller 300CPR Quadrature encoders. Connector pinout is the same used by US Digital Encoders.


    At default no power supply is enabled for encoders. It can be chosen between 3.3V and 5V soldering one of the side pads with the central one:


    Encoders with higher power supply must be powered by an external power supply. Those encoders usually, have OC (open collector) output: leaving all pads unconnected the suitable level is obtained with the dsNav internal pull-up resistors.

    Serial communication

    DsPic33fJ128MC802 has two serial ports at TTL level. Both can be used in many different ways. They are available at UART1, UART2 pin header. Beside each header there are unsoldered more pads available for whatever use:


    UART 1 port is available on both UART1 header and on RS485 enable pads. If RS485 enable pads are closed , UART1 plug cannot be used (also bootloader feature cannot be used):


    Other RS485 pads connect termination resistor and/or bias resistors if required by the RS485 bus:


    UART 2 port is available on both UART2 header and on XBee socket. If XBee module is plugged in, UART2 plug cannot be used. Optionally a power supply (3.3V or 5V selectable) can be provided on a pin of the UARTx pin header by soldering the dedicate pads:

    Note: pads marked as V COM2 are used to setup the voltage on UART1 plug. Pads V COM1 are used for UART2 plug.
    Please note that all ports accepts TTL level only. To avoid permanent damages, the connection to a RS232 level standard PC port must be realized with a proper level translator. These are simple devices, usually based on popular MAX232 chip, such the “Serial RS232-TTL level converter” (990.008) also available on our web store.

    With modern computers it is even simpler to use a direct USB to serial TTL adapter, such the “Miniature USB->Serial adapter” (990.004) available on our web store as well. The FTDI FT232 chip is driven with standard FTDI drivers available on any operating system and compatible with most of the communication softwares.

    LEDs

    Five LEDs are displaced on the dsNav board. Power LED is on when suitable power supply is applied to the power connector. RSSI and ASSOC LEDs are driven by the XBee module, please read the XBee documentation of your specific module for the meaning of this signals.

    L1 and L2 are general purpose LEDs, driven each by a digital output of the DSC and can be used for any kind of alert. The example software provided uses them to show alarm status. Slow alternative blinking means “All OK” status, faster blinking displays a communication error, fastest blinking means that a motor overload occurred and both H-bridges are disabled. The normal status can be recovered reading the error code with the remote console.

    Remote control

    On the dsNav board is present all the circuitry needed to make an optional XBee module running. A typical configuration to establish a wireless link with a Mac or PC is depicted beside:


    The XBee module on the computer side can be connected via USB through an optional XBee – USB board (990.002). Please look at these boards documentation for configuration and usage.

    With the example firmware provided the dsNav board accepts data on UART2 port at 57600bps N81 with a simple communication protocol, as described in application notes. The same protocol is used by the example dsNavConsole software allowing a simple but powerful remote control and telemetry GUI on Mac OSX, Linux or Windows operating systems.

    Bootloader

    At shipping, the dsPIC33fJ128MC802 installed onto the dsNav board is preloaded with a bootloader. This allows the aforementioned programming of the DSC in a cheap and fast way with standard communication ports. All the considerations about serial connection to a RS232 serial port written above are valid as well.

    The bootloader is based on the open source work of Mikael Gustafsson (http://mrmackey.no-ip.org/elektronik...ader/index.php) and it is usable with the ds30loader GUI available at the developer site. Please read the original documentation on how to use this GUI with MacOSX, Linux and Windows operating systems. The bootloader of Mikael Gustafsson cannot be used directly with dsNav: please use the bootloader you can download on our site.


    Control Software

    Control software, named as dsNavCon, is an open source work of Guido Ottaviani and is freely downloadable from Google Code (http://code.google.com/p/dsnavconconsole/)


    dsNavCon is available as source code and binary for Windows, Linux and MacOS operating systems. It is distributed "as is" without any warranty or support and only for dimostration purposes.