by PaulL » Thu Sep 12, 2013 11:39 am
by PaulL
Thu Sep 12, 2013 11:39 am
I don't know where else to put this - I have a few threads spread around, but since I'm swapping out the Roboard for a Kontron PicoITX board, I don't think this belongs under the Roboard forum. There isn't much Robonova left in my bot either, so the Robonova forum doesn't make much sense, either.
So, I'll put most of the stuff about the build here instead.
I've been working a bit on the electronics side of things.
As a review, I'm using a Kontron PicoITX 1.6 Ghz SP w/ 2Gb RAM, this will mostly run high level processes on the bot. I'll hook up a STM32F103CBT6 to the Kontron board to run all of the bot-specific peripherals (servos, sensors, power control, etc). He'll have a camera in his head, a small CMOS NTSC camera that will plug into an NTSC to USB converter. I'm using 2C LiPo packs for power.
I ran out of pins on the STM32 for PWM (other functions making use of GPIO). SO, I was planning on using a PCA9685 for 16 of the PWM signals, but I'm reconsidering the mixed PWM approach (PWM on the STM32 and the PCA9685) since I've managed to run out of pins.
I'm at a bit of an indecision point. I have 400khz on the I2C bus (STM32 limited, the PCA9685's can go faster), and I can use a separate I2C bus just for motion with sensors and such on the other bus. This means up to 32 channels of PWM (using two PCA9685's), but it's restricted to the 400khz bus. I don't know if there's enough bandwidth for 250hz (4mS) updates, and I'm not sure how much trouble maxing out the I2C bandwidth is going to cause for the STM32's other code.
The fastest interface on the STM32 short of SPI is serial. I haven't found any SPI-based PWM controllers - and if I do use SPI, it's more pins. Not as many pins as using the STM32's onboard PWM, but it's more pin usage.
I was planning on using Pololu servo controllers in the hands to keep me from having to run 6 more wires (5 for finger servos, 1 for wrist) back up each arm, but this morning, I'm questioning that as well.
I'll likely do a custom board for the controller - which made me think - why not just do some STM32's in the hands on custom boards as well, add a couple more STM32's to the controller strictly for PWM, and run everything over high speed serial? This could give me some interesting sensor options for the hands, and the speed would be much faster than I2C (particularly if interpolation is done at each controller).
This isn't an option one would consider for volume manufacturing, but then, that's not quite why I'm doing all of this.
So yes, I'm pondering the use of 5 x 72Mhz STM32's - and even to me, it seems excessive. And there's the issue of board space in using 3 STM32's on the controller board.
I think I need to do some experimentation with the PCA9685's and an STM32 and see how things work out before I make a decision. It's still an interesting thought though, putting an STM32 on the back of each hand. That would provide more options than just having PWM controllers there.
It won't be much work to take some code I was experimenting with that used the STM32's PWM, PWM from a PCA9685, and PWM on a Pololu board and modify it to test a pair of PCA9685's at 250 hz updates for all channels on the 400khz I2C bus.
I don't know where else to put this - I have a few threads spread around, but since I'm swapping out the Roboard for a Kontron PicoITX board, I don't think this belongs under the Roboard forum. There isn't much Robonova left in my bot either, so the Robonova forum doesn't make much sense, either.
So, I'll put most of the stuff about the build here instead.
I've been working a bit on the electronics side of things.
As a review, I'm using a Kontron PicoITX 1.6 Ghz SP w/ 2Gb RAM, this will mostly run high level processes on the bot. I'll hook up a STM32F103CBT6 to the Kontron board to run all of the bot-specific peripherals (servos, sensors, power control, etc). He'll have a camera in his head, a small CMOS NTSC camera that will plug into an NTSC to USB converter. I'm using 2C LiPo packs for power.
I ran out of pins on the STM32 for PWM (other functions making use of GPIO). SO, I was planning on using a PCA9685 for 16 of the PWM signals, but I'm reconsidering the mixed PWM approach (PWM on the STM32 and the PCA9685) since I've managed to run out of pins.
I'm at a bit of an indecision point. I have 400khz on the I2C bus (STM32 limited, the PCA9685's can go faster), and I can use a separate I2C bus just for motion with sensors and such on the other bus. This means up to 32 channels of PWM (using two PCA9685's), but it's restricted to the 400khz bus. I don't know if there's enough bandwidth for 250hz (4mS) updates, and I'm not sure how much trouble maxing out the I2C bandwidth is going to cause for the STM32's other code.
The fastest interface on the STM32 short of SPI is serial. I haven't found any SPI-based PWM controllers - and if I do use SPI, it's more pins. Not as many pins as using the STM32's onboard PWM, but it's more pin usage.
I was planning on using Pololu servo controllers in the hands to keep me from having to run 6 more wires (5 for finger servos, 1 for wrist) back up each arm, but this morning, I'm questioning that as well.
I'll likely do a custom board for the controller - which made me think - why not just do some STM32's in the hands on custom boards as well, add a couple more STM32's to the controller strictly for PWM, and run everything over high speed serial? This could give me some interesting sensor options for the hands, and the speed would be much faster than I2C (particularly if interpolation is done at each controller).
This isn't an option one would consider for volume manufacturing, but then, that's not quite why I'm doing all of this.
So yes, I'm pondering the use of 5 x 72Mhz STM32's - and even to me, it seems excessive. And there's the issue of board space in using 3 STM32's on the controller board.
I think I need to do some experimentation with the PCA9685's and an STM32 and see how things work out before I make a decision. It's still an interesting thought though, putting an STM32 on the back of each hand. That would provide more options than just having PWM controllers there.
It won't be much work to take some code I was experimenting with that used the STM32's PWM, PWM from a PCA9685, and PWM on a Pololu board and modify it to test a pair of PCA9685's at 250 hz updates for all channels on the 400khz I2C bus.