Welcome, Guest
Username: Password: Remember me
20 Aug 2017
INDI development team is happy to announce the release of INDI Library v1.5.0. This new exciting release builds on the maturity of INDI Library and comes with many new supported devices and fixes for existing drivers.
Read More...

TOPIC: Astroberry PiFace

Astroberry PiFace 1 year 1 month ago #9665

Thank you, the changes did the trick for now. I can install the Binaries as well as compile.

I haven't gotten Indi server to run and haven't tried controlling the Piface (1) yet, but hope to this weekend.

Please Log in or Create an account to join the conversation.

Astroberry PiFace 9 months 3 weeks ago #12787

  • Kaczorek
  • Kaczorek's Avatar Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 368
  • Karma: 3
  • Thank you received: 120
The new version of Astroberry PiFace is ready for download!
Starting from version 2.0.1 the driver supports up to 8 relays (requires 2 PiFace Relay Plus addon modules) and 2 stepper focusers.
You can get the source code here or download binary files for raspberry pi here .

Upcoming... support for 4 x PWM for your dew heaters, coolers or other devices.

Have fun people!
The following user(s) said Thank You: knro

Please Log in or Create an account to join the conversation.

Astroberry PiFace 8 months 1 week ago #13688

Well it winter again and may make some headway on an Pi-observatory controller. Upgraded to a Pi3, unfortunately got the PiFace digital 2 instead of the Relay plus. Just loaded up, the first 4 outputs work and all go on and if with the all-on/all-off buttons (for those that might find themselves in the same boat). No worries, fine for now.

Anyway, all else seems to work. I would like to use the Astroberry-Piface_relay as the initial controller. Does anyone have an Ekos startup script that toggles something via the astroberry-piface/indi server connection? Will figure it out if not, but would save a lot of time.

Thx,

Greg

Please Log in or Create an account to join the conversation.

Astroberry PiFace 8 months 1 week ago #13712

Not to reply to myself... ;) but with a little wacking and hacking,I have full access to the PiFace Digital2. (Relay driver only).

Kaczorek, pretty easy to work on... THX.

Greg

Please Log in or Create an account to join the conversation.

Astroberry PiFace 8 months 4 days ago #13841

  • Kaczorek
  • Kaczorek's Avatar Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 368
  • Karma: 3
  • Thank you received: 120
I'm glad it works with PiFace Digital2. It was not tested with this hardware but it's a good news that the driver supports both PiFace Relay Plus and PiFace Digital2.
You can control your relay with a python scripts. I have not developed these for my relays but there was a thread somewhere on the forum on this topic.

Please Log in or Create an account to join the conversation.

Last Edit: by Kaczorek. Reason: typo

Astroberry PiFace 2 months 1 week ago #17799

Hi Radek,

I was wondering about the following: as reported, I can run with the PiFace Digital2-Board the focuser. For the small stepper (28byj48), I do not need additional power supply, and obviously no additional driver board. For the focuser, the PiFace uses the pins 4-7 by default. I.e. Pins 0-3 are still available (and can be used for a second focuser). Now, couldn't those pins be equally used to run a filterwheel (was thinking about "upgrading" my manual filterwheel, by attaching a.m. stepper motor)?

I had a look at the lib, piface-focuser.cpp, but my programming skills are too limited to modify. I guess it is the section around IndiPiFaceFocuser1, but cannot directly see where the a.m. pins are addressed, etc.

If I may ask whether you were considering to also integrate the ability to drive a filter wheel?

Best, Helge

Please Log in or Create an account to join the conversation.

Astroberry PiFace 2 months 1 week ago #17818

Radek,

I know this is the PiFace thread, but this may be of interest. It's Arduino based with some INDI and ASCOM support. Works with the small motors as well as larger ones and many stepper drivers. Attach to the Pi via USB and put the INDI server on the PI.... my plan anyway. Pi is then the mount "hub" with power and WIFI (or Ethernet) connection minimizing trip hazards.

If you want to omit the Arduino, you may find the example code for your setup useful.

I also have a 28byj48 in my filter wheel that I "borrowed" from someplace. A bit slow, but faster than I am.

BTW the 28byj48 is supposed to be pretty minimal for a focuser unless there's a good gear ration or it's light (eyepiece only??)..

Please Log in or Create an account to join the conversation.

Last Edit: by Gregj888.

Astroberry PiFace 2 months 1 week ago #17821

  • Kaczorek
  • Kaczorek's Avatar Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 368
  • Karma: 3
  • Thank you received: 120

HelgeMK wrote: (...) couldn't those pins be equally used to run a filterwheel (was thinking about "upgrading" my manual filterwheel, by attaching a.m. stepper motor)?


Yes, they can. However it's a bit more complicated than just using a stepper motor to get a wheel moving. Electronic filter wheels need to calibrate starting position and then track actual position. In majority of cases it's accomplished by either optical or magnetic encoder, which reads actual position of the filter wheel.

HelgeMK wrote: I had a look at the lib, piface-focuser.cpp, but my programming skills are too limited to modify. I guess it is the section around IndiPiFaceFocuser1, but cannot directly see where the a.m. pins are addressed, etc.


The PINs are not addressed directly. PiFace addon uses SPI bus available on RPi. This means that you need to access specific registers of mcp23s17 chip, which is the heart of PiFace, instead accessing specific PINs.

HelgeMK wrote: If I may ask whether you were considering to also integrate the ability to drive a filter wheel?


I would love to! However the issue raised in the first answer above stops me from doing this.
You can however use any stepper motor to drive your wheel with a PiFace Focuser 2. It is just workaround but this way you can move the wheel in both directions by a predefined number of steps. It's not going to be perfect because you miss a feedback from actual wheel position. You can try anyway!

Please Log in or Create an account to join the conversation.

Last Edit: by Kaczorek.

Astroberry PiFace 2 months 1 week ago #17822

  • Kaczorek
  • Kaczorek's Avatar Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 368
  • Karma: 3
  • Thank you received: 120

Gregj888 wrote: I know this is the PiFace thread, but this may be of interest. It's Arduino based with some INDI and ASCOM support...


Hi Gregj888, indeed it's interesting. I have been thinking of it recently. In such a setup you only use USB at RPi and don't mess with GPIO or any addons/hats. This approach however, requires a user to have a DIY mentality. The reason I developed drivers for PiFace was to help users that are aiming at plug-and-play approach. I'm in the process of developing a dedicated addon to RPi that can address key needs of an astrouser. Maybe Arduino will find its place in this project. Thanks anyway!

Please Log in or Create an account to join the conversation.

Astroberry PiFace 2 months 1 week ago #17829

Kaczorek, No real difference in the computer based DIY aspect that I can see. Plug in the stepper drivers or wire us 3 wires per, so some. The hard part is doing the mechanicals. 2 advantages for the Arduino option are: 1) more stepper driver options at a lower cost and; 2) electronic package is much smaller and lighter. There's no reason the focuser and a filter wheel can't be run from either a Pi or Arduino (nano for instance). I would with the PI, not so with an Arduino with the decision based on size. Once the DIY hat is on... :-)

On the filter wheel, a couple of bi-polar hall sensors (IE. A1309KUA-9) and a 6 magnets can do 8 filter slots with position and filter encoding ( if I did it right: NNSSN-S- adjacent sensors, several options for 5, I'm using SN-NS, full feedback). Magnets give N, S and none with 2 sense positions 1 slot apart.

Please Log in or Create an account to join the conversation.

Astroberry PiFace 2 months 1 week ago #17855

"The PINs are not addressed directly. PiFace addon uses SPI bus available on RPi. This means that you need to access specific registers of mcp23s17 chip, which is the heart of PiFace, instead accessing specific PINs."

Apparently, the IndiPiFaceFocuser1 seems to address the Input-ports 0-3 of PiFace Digital 2, (i.e. GPB 0-3), see datasheet for mcp23s17. So far checked with the voltmeter/continuity tester. I have seen in your code that focuser1 addresses GPIOB, so that seems to make sense. However, with that I cannot run the stepper. Presumably, because those are input ports (?).

So for running a second stepper via PiFace Digital 2, the focuser1 also needed to be assigned to GPIOA, question remains how to address GPA0-GPA3? If the assignment could be done, it would already be a big step ahead, since it would allow steering the filterwheel, as you say just via number of steps, taking advantage of the presets. Maybe it is already reasonably precise, even without optical encoder? With the a.m. Input-pins, one might be able to add an encoder at a later stage.

Best, Helge

Please Log in or Create an account to join the conversation.

Last Edit: by HelgeMK.

Astroberry PiFace 2 months 1 week ago #17858

Helge,

You can run a step based system, but they tend to not be robust. Best with hard slip proof connections (gears or timing belts or mounted to the motor shaft). Biggest issue is the wheel will need to be at a "home" position each time you turn it on or you'll have the re-calibrate it (tell it where it is).

For a couple of bucks a hall sensor can give you a "Home position" and for a couple of more you can get a full closed loop readout. You can even use a DC motor then, though it needs to run slow enough to sense. Feed hall output to an ADC pin and will read mid scale for blank and 0 or full scale for a magnet depending on polarity (bi-polar hall sensor). Watch for max absolute value |A |+|B| from the 2 sensors after adjusting each for the 0 offset. This also should give repeatable positioning of the filter for flat field cal.

IMHO no real difference between GPIO and SPI/GPIO except some loss of high speed over SPI that will not matter on a motor. Programming is different, but not with the right library.

Here's mine- Knockoff Arduino nano.... Second sensor not yet in place but would be covered anyway.
Attachments:

Please Log in or Create an account to join the conversation.

Time to create page: 0.134 seconds

Login



3rd Party

Choose from the numerous 3rd party INDI drivers to suit your needs!

Got Problem?

Check out the FAQ, the forum, and the bug tracking system to resolve any issues you might have!
You can also subscribe to INDI newsletter and development mailing lists to get the latest updates on INDI!


Gallery

Replica

Why INDI

Replica