Page 438 - ARM Based Microcontroller Projects Using MBED
P. 438

424                        17. STM32 NUCLEO EXPANSION BOARDS

                 17.14.2 Aim
                   The aim of this project is to show how the X-NUCLEO-IHM13A1 expansion board can be
                 used in a project to control the speed of a small brushed DC motor.
                 17.14.3 Block Diagram

                   The block diagram of the project is shown in Fig. 17.18. The expansion board is plugged on
                 top of the development board via the Arduino UNO R3 connectors.
                 17.14.4 Circuit Diagram

                   Fig. 17.19 shows the project circuit diagram. The arm of A10K linear potentiometer
                 is connected to analog input PA_1 of the Nucleo-L476RG development board. The other two
                 terminalsofthepotentiometerareconnectedto+3.3VandGNDpinsofthedevelopmentboard.

                 17.14.5 Program Listing

                   The program listing (program: PotMotor) is shown in Fig. 17.20. Analog voltage of the poten-
                 tiometer is read into variable pot. The value read is a floating point variable between 0 and 1.0,
















                 FIG. 17.18  Block diagram of the project.




















                 FIG. 17.19  Circuit diagram of the project.
   433   434   435   436   437   438   439   440   441   442   443