-
PID Autotune controllers added
05/15/2018 at 20:57 • 0 commentsThe code now includes generic PID controller functions that can be used for different purposes such as velocity and position tracking.
And to use all these PID controllers, I added a PID autotuner based on the Nelder Mead algorithm that searches over a R3 space for the optimum coefficients to obtain the lowest rise time. These functions are included in the gen_algo.c file and should be applicable to other projects as well.
I decided to reorganise the code this way so that it is portable to other projects. I was also got rather annoyed with having to write the same code over and over again in another project so this quickly became a priority. This reduces the code I have to rewrite and test and should result in increased productivity in the future since the code has already been written. -
Progress!
04/12/2018 at 13:44 • 0 commentsBasic dynamic control over CAN bus complete, each board will discover and self-assign its position in a series. Currently you can only connect to a board at a end of a series for the dynamic addressing to work. An additional wire is required for this addressing. This increases the number of wires between boards to 5, POWER, CAN + 1 wire.
UART has been tested with the Launchpad boards but not with a custom board because UART0 has not been broken out for some reason on the Launchpad.
-
Node assignment
04/10/2018 at 22:29 • 0 commentsOne problem that this project faces is a dynamic assignment of nodes. However, there is no way to tell over the CAN bus which node is closer to the computer and how they are connected serially.
One way would be to do this in software where each board is set by the user, or using a jumper to select the node number. However, this detracts from the modular nature of the project.
So I decided to add one more wire between boards to help tell how the boards are connected serially. A config protocol is written in the program so that each board will be able to tell the next how far they are from the controlling board. -
Controller Version 1 assembled
04/09/2018 at 15:43 • 0 commentsWhen assembling version 1, I realised that I had made a few mistakes in the layout of the chip. I used a wrong header for the encoders, and I cannot just use any 16MHz crystal. There are some requirements, which rules out Abracon crystals. Reading the datasheet closer, it appears that that TI prefers CVX's crystals, so I will use that, even though they are slightly more expensive. I have also reduced the size of the decoupling capacitors. I have also added USER leds and a 3.3V regulator so that the board can be powered straight off the 12V supply, minimising the amount of supplies I have to add.
Once I confirm the design the next batch will be sent off to be made.Currently a simple version of the CAN bus is working.
-
Controller version 1 received
04/07/2018 at 04:17 • 0 commentsTurns out that Sparkfun's M04 JSTPTH connector did not have 0.1" holes, which means that I couldn't connect the header that I already soldered onto the connector.
Oh well, that's not such a big deal since some temporary measures can be put in place. I made the changes and for the time being will use some jumpers to connect the encoders to the board.