An update - I connected everything up yet again, but with no logic shifters, just straight from the Pi to the stepper drivers, and this time nothing happened at all - clearly the 3.3v from the Pi is just not reliable enough to power the drivers. Why it worked on my one and only previous test and didn't work today I have no idea. It certainly wasn't a wiring fault - I've wired this thing up so many times now I can do it blindfold.
Previously I had ordered some 3d printing stuff from Aliexpress and happened to see these:
https://www.aliexpress.com/item/1005005 ... 1802bBvj9h
Only a couple of pounds so not much to lose, and it arrived this morning. While they claim it works with the Pi, a couple of customer reviews say that in order for that to happen the surface mount LEDs on the inputs have to be removed or bridged, so I did that, wired it up and it worked. And it's been working all day.
Just to prove it:
https://www.dropbox.com/scl/fi/ct645o6l ... a1o9&raw=1
In case anyone is interested:
The Python script itself uses the Astropy library to poll the data for the sun's altitude and azimuth angles every 15 minutes, not for the current time but for 7.5 minutes in advance of current time, (so that the panel position is reasonably close to being accurately aligned). It then uses this to calculate the change from the previous polling data. This is converted to steps. Direction for the altitude is set depending on am or pm, and obviously the azimuth is set for the whole day east to west. The script starts at 6am and runs until 7pm, at which time the panel returns to the start position, which is governed by 2 microswitches. The script waits until 6am the following day and restarts. The whole rig has to be set up correctly to start with, in the correct orientation and with the microswitches adjusted correctly.
Work still to do includes tidying up the wiring, adding a decent mains rocker switch on the enclosure, screened cabling and XLR plugs for the stepper motor connections, fitting the display screen to the enclosure and mounting the aliexpress mosfet board properly. And then maybe starting on something a bit bigger so it can do some real work - I've got a feeling that this little test rig consumes a bit more electricity than it collects.
Thanks for all the help - I've learned something about mosfets, npn transistors, opto-isolators and logic levels over the past few months despite the fact that none of them seemed to work very well for me.
Previously I had ordered some 3d printing stuff from Aliexpress and happened to see these:
https://www.aliexpress.com/item/1005005 ... 1802bBvj9h
Only a couple of pounds so not much to lose, and it arrived this morning. While they claim it works with the Pi, a couple of customer reviews say that in order for that to happen the surface mount LEDs on the inputs have to be removed or bridged, so I did that, wired it up and it worked. And it's been working all day.
Just to prove it:
https://www.dropbox.com/scl/fi/ct645o6l ... a1o9&raw=1
In case anyone is interested:
The Python script itself uses the Astropy library to poll the data for the sun's altitude and azimuth angles every 15 minutes, not for the current time but for 7.5 minutes in advance of current time, (so that the panel position is reasonably close to being accurately aligned). It then uses this to calculate the change from the previous polling data. This is converted to steps. Direction for the altitude is set depending on am or pm, and obviously the azimuth is set for the whole day east to west. The script starts at 6am and runs until 7pm, at which time the panel returns to the start position, which is governed by 2 microswitches. The script waits until 6am the following day and restarts. The whole rig has to be set up correctly to start with, in the correct orientation and with the microswitches adjusted correctly.
Work still to do includes tidying up the wiring, adding a decent mains rocker switch on the enclosure, screened cabling and XLR plugs for the stepper motor connections, fitting the display screen to the enclosure and mounting the aliexpress mosfet board properly. And then maybe starting on something a bit bigger so it can do some real work - I've got a feeling that this little test rig consumes a bit more electricity than it collects.
Thanks for all the help - I've learned something about mosfets, npn transistors, opto-isolators and logic levels over the past few months despite the fact that none of them seemed to work very well for me.
Statistics: Posted by Newlands — Mon Apr 07, 2025 7:36 pm