One reason is that I want to design and build something that is my own and not simply build someone else's project. But, the main reason I want to use Raspberry Pi (if possible) is that I understand RPi and I do not know and understand Arduino and ESP32, especially if (when) something goes wrong and I need to fault-find and fix it. I also want to write generative music in Python, so the existing code is not something I will necessarily use, as I will write my own from scratch - coding doesn't scare me as much as getting the hardware right.Redesigning the project to use a Pi will be a significant effort, but nothing ought to stop you. However, the design is already complete and working, and easy to replicate, so why do you want to do all this work?
I am not so sure I understand. Why won't the Pi generate consistent PWM signals? Do the below proposals using PCA9685 overcome the issue?If you implement this with a Pi you will probably run into difficulties caused by the nondeterministic nature of the Pi OS. In other words, you won't be able to generate the PWM signals consistently. Having said that, the nature of the controlled system is that it is mechanical and has a lot of inertia, so minor variations from the intended output might not matter.
I like this idea, as it might allow me full functionality as the original design. Are there any downsides, apart from elegance? Or is there a better, more elegant way to do this and retain the functionality?You could use something like a PCA9685 (six of them), and delegate the PWM generation to hardware, but then you lose the elegance of the original design.
Thanks - I will have a think about this. My initial concern, having not chained microcontrollers together is how to do this, the complexity and if there is latency in doing so.You could use four Pi Picos to generate the 22 PWMs each internally (using software, not enough internal hardware timer comparators I don't think) and drive the TIPs directly via resistors from the RP2040 GPIOs. MUCH less wiring.
EM noise can be dealt with by some soft spacers/felt, which are commonly used. Thanks for the grounding advice - I will pay attention to this.Yes - EM noise from the solenoids. Shield the electronics and make sure you've got good grounding so that no earth currents from the solenoids reach the MCUs. The Arduino processors are much more resilient to ground noise than Pis of any sort as they are 5V devices.
Indeed, no inputs here.It only applies to pins used as inputs, which is not the case here. Plus, using the SPI version means you need to wire several CS pins.
You still won't get consistent software PWM.
On the issue of software PWM, as mentioned above, is it best to consider hardware PWM using 6x PCA9685? If this is the case, the idea I now have is: Raspberry Pi 5 -> 6x Adafruit 16-Channel 12-bit PWM/Servo Driver - I2C interface - PCA9685 (with external 5V supply) _> 88 LED -> 88 TIP 120 -> 88 JF-1039B solenoids with flyback diodes. If this seems sensible, I think I will try a proof of concept with the Pi, one PCA9685, 8x LED, 8x TIP120 and 8x solenoid.
Any feedback on the above would be great, thanks again!
Statistics: Posted by cairanvanrooyen — Mon Dec 23, 2024 2:59 pm