This is one of the first test of the smart motor driver for robotics. You can see here the motor running in a closed loop control algorithm and the rpm being plotted on the computer in real time.
The idea is to run the motor as close as possible to the desired RPM no matter what. In robotics this is pretty useful because it allows the robot to move precisely and consistent even in a ramp. Making the navigation easier and frustration free.
And now this is how it started, with a simple schematic of the future PCB and what I learned after experimenting a little bit:
And also paper models playing while designing in Eagle...
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
I am trying to use one of the features called PID from your code, that I got it from Github. yet while trying to build the program in MPLABXIDE 5.30 version am getting error at 43-46 line where the EEPROM address initialization starts, am sorry as I am completely new to this coding world I tried to debug with the little experience I have, but couldn't able to fix. Can someone please help me to fix the error?
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/Users/U56670/work_file/2020/pic_test/DESIGN_hard_soft-smart_motor_driver-1.0.0/smart_motor_driver-1.0.0/Software/MPLAB XC8'
make -f nbproject/Makefile-default.mk dist/default/production/MPLAB_XC8.production.hex
make[2]: Entering directory 'C:/Users/U56670/work_file/2020/pic_test/DESIGN_hard_soft-smart_motor_driver-1.0.0/smart_motor_driver-1.0.0/Software/MPLAB XC8'
"C:\Program Files (x86)\Microchip\xc8\v2.10\bin\xc8-cc.exe" -mcpu=12F1840 -c -fno-short-double -fno-short-float -O3 -fasmfile -maddrqual=require -xassembler-with-cpp -mwarn=-3 -Wa,-a -DXPRJ_default=default -msummary=-psect,-class,+mem,-hex,-file -ginhx032 -Wl,--data-init -mno-keep-startup -mno-osccal -mno-resetbits -mno-save-resetbits -mno-download -mno-stackcall -std=c90 -gdwarf-3 -mstack=compiled:auto:auto -o build/default/production/main.p1 main.c
::: advisory: (2051) The current license does not permit the selected optimization level, using optimization level 2
"C:\Program Files (x86)\Microchip\xc8\v2.10\bin\xc8-cc.exe" -mcpu=12F1840 -Wl,-Map=dist/default/production/MPLAB_XC8.production.map -DXPRJ_default=default -Wl,--defsym=__MPLAB_BUILD=1 -fno-short-double -fno-short-float -O3 -fasmfile -maddrqual=require -xassembler-with-cpp -mwarn=-3 -Wa,-a -msummary=-psect,-class,+mem,-hex,-file -ginhx032 -Wl,--data-init -mno-keep-startup -mno-osccal -mno-resetbits -mno-save-resetbits -mno-download -mno-stackcall -std=c90 -gdwarf-3 -mstack=compiled:auto:auto -Wl,--memorysummary,dist/default/production/memoryfile.xml -o dist/default/production/MPLAB_XC8.production.elf build/default/production/main.p1
::: advisory: (2051) The current license does not permit the selected optimization level, using optimization level 2
Non line specific message::: advisory: (1492) using updated 32-bit floating-point libraries; improved accuracy might increase code size
:0:: error: (1347) can't find 0x5B words (0x5b withtotal) for psect "text1" in class "CODE" (largest unused contiguous range 0x14)
Non line specific message::: advisory: (1493) updated 32-bit floating-point routines might trigger "can't find space" messages appearing after updating to this release; consider using the smaller 24-bit floating-point types
:0:: error: (1347) can't find 0x34 words (0x34 withtotal) for psect "text20" in class "CODE" (largest unused contiguous range 0x14)
:0:: error: (1347) can't find 0x33 words (0x33 withtotal) for psect "text3" in class "CODE" (largest unused contiguous range 0x14)
:0:: error: (1347) can't find 0x28 words (0x28 withtotal) for psect "text7" in class "CODE" (largest unused contiguous range 0x14)
:0:: error: (1347) can't find 0x25 words (0x25 withtotal) for psect "text4" in class "CODE" (largest unused contiguous range 0x14)
:0:: error: (1347) can't find 0x1F words (0x1f withtotal) for psect "text15" in class "CODE" (largest unused contiguous range 0x14)
:0:: error: (1347) can't find 0x1D words (0x1d withtotal) for psect "text12" in class "CODE" (largest unused contiguous range 0x14)
:0:: error: (1347) can't find 0x1C words (0x1c withtotal) for psect "text6" in class "CODE" (largest unused contiguous range 0x14)
:0:: error: (1347) can't find 0x1B words (0x1b withtotal) for psect "text19" in class "CODE" (largest unused contiguous range 0x14)
(908) exit status = 1
nbproject/Makefile-default.mk:138: recipe for target 'dist/default/production/MPLAB_XC8.production.hex' failed
make[2]: Leaving directory 'C:/Users/U56670/work_file/2020/pic_test/DESIGN_hard_soft-smart_motor_driver-1.0.0/smart_motor_driver-1.0.0/Software/MPLAB XC8'
nbproject/Makefile-default.mk:91: recipe for target '.build-conf' failed
make[1]: Leaving directory 'C:/Users/U56670/work_file/2020/pic_test/DESIGN_hard_soft-smart_motor_driver-1.0.0/smart_motor_driver-1.0.0/Software/MPLAB XC8'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make[2]: *** [dist/default/production/MPLAB_XC8.production.hex] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 6s)
This is the error am getting. Thanks in Advance
Are you sure? yes | no