Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
This is a very popular board since it runs on I2C and you can daisy chain multiple boards together.
I have been working on a 2 part project.
1. A ESP32 using the PCA9685 to control Servo's. Positions are read every 0.25 sec from a SD card and then sent to the servo. This give a resolution where a slow sweeping move can be obtained that runs over many seconds.. Not just a fast Point A to Point B movement.
2. A programmer using a PicoMite, Touch Screen, and an SD Card. This can be plugged in to a PCA9685 and the user can then use the touch screen to set the positions of the servos and record them on to the SD Card. Naming of Servo's, Min/Max, Defaults, and where the servo is reverse or not can all be included in to the code. Afterward the CD Card can be plugged in to the ESP32 (1) and set to run.
My big issue has been trying to find a easily programmable graphics system with multiple screens. Plus I am very comfortable with using BASIC.
Can anyone help with the Servo Controller? Many thanks David Boccabella a.k.a. Marcwolf
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9757
Posted: 02:36am 07 Mar 2022
Copy link to clipboard
Print this post
Should be easy enough, you just need to read the manual for the controller chip used, and translate that into MMBASIC instead of Arduino C code.
I'll have a look at the PDF for this chip and post back later, but as the chip is clever enough to keep the PWM rates running for all 16-channels by itself, it should simply be a case of using the chip PDF to work out the commands you need to send, and using the I2C commands - see the appendix's in the various user manuals, as there is an I2C section in each one.Smoke makes things work. When the smoke gets out, it stops!
Tinine Guru Joined: 30/03/2016 Location: United KingdomPosts: 1646
Posted: 03:54am 07 Mar 2022
Copy link to clipboard
Print this post
Any reason for not simply using a slaved Picomite? Doesn't it have 16 PWMs?
Craig
disco4now Guru Joined: 18/12/2014 Location: AustraliaPosts: 1052
Posted: 04:17am 07 Mar 2022
Copy link to clipboard
Print this post
Here something I used some time ago. Should be a start.
DiscoNow:- WOW.. Many many thanks . This will certainly give me something to work the BASIC's from - No pun intented.
Tinine :- Te reason for not using the PicoMite to drive the servos is that the PCA9685 is NOT limited to just 16 servos. It can be daisy chained and run over 500 servos.
Again many thanks for everyone's help.
Tinine Guru Joined: 30/03/2016 Location: United KingdomPosts: 1646
Posted: 04:11pm 07 Mar 2022
Copy link to clipboard
Print this post
but nothing to stop PicoMites being chained together.
I have 255 addresses on my RS422/485 full duplex link which could give me 255*16 servos.
Craig
Tinine Guru Joined: 30/03/2016 Location: United KingdomPosts: 1646
Posted: 07:31pm 07 Mar 2022
Copy link to clipboard
Print this post
@Marcwolf
Sounds like you have something cool going on
I use PicoMites for system management and I/O expansion BUT the heavy lifting (real-time) stuff is handled by the Parallax P2 "Edge" module.
The P2 can give you at least 56 channels of PWM and even without over clocking, you are looking at 14bit resolution @10KHz.
This would give you the best synchronisation and coordination possible. Programming in "FlexBasic" is a walk in the park.
EIGHT parallel processors and not as scary as it sounds