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 4 months 1 week ago #17859

Thanks Greg, never thought into that direction, will have a closer look.

How is the motor driver and sensor connected to the Rpi? Directly or via the PiFace? Would be great if you could share more details/picture of your project!

Best, Helge

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

Astroberry PiFace 4 months 1 week ago #17860

Motor is has a spindle with an O-ring around it for friction drive to the filter wheel. Small 1/16" diameter magnets are glued into holes in the filter wheel using a home made jig for location. Hall sensors sense magnetic fields so no physical connection between wheel and sensors.

Motor can slip under the posts and the spring fixed to the fixed posts supplies tension/force on the friction drive.

The wheel portion (that holds the filters) is actually flipped upside down from it's original configuration and the detente balls and springs removed so wheel is free to spin.

The 2 boards are screw mounted to the case using tapped holes in the case (small holes, like #1 screws ). Sensors are mounted over holes in the case (holes probably not needed in the aluminum) with slots milled to allow the sensor to get closer to the wheel (may also not be needed. Once working I'll "pot" the sensors in epoxy or similar.

Connection to the RPI (or other) is via USB to the Arduino Nano (skinny board shown).
The following user(s) said Thank You: HelgeMK

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

Astroberry PiFace 4 months 1 week ago #17864

  • Kaczorek
  • Kaczorek's Avatar Topic Author
  • Away
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 393
  • Karma: 4
  • Thank you received: 135

HelgeMK wrote: 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?


Have you tried using PiFace Focuser 2? The driver supports 2 stepper motors and the code for the second focuser is cloned from the first one, except other address is used i.e. IndiPiFaceFocuser1 (GPIOB) vs IndiPiFaceFocuser2 (GPIOA).

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

Astroberry PiFace 4 months 1 week ago #17875

Well, I have been using the Focuser 2 (GPIOA) from the beginning for the stepper that drives the focuser. For some reason, here the Output-pins 4-7 are powered.

Not sure where the pin base is set to 4, instead of 0, i.e. whether output 7 actually corresponds to MCP27s13-pin 28 (GPA7) or whether the sequence is twisted upside-down, i.e. output pin 7 is MCP23s17-pin 21 (GPA0), and 6 is pin 22 (GPA1) etc.? (See also schematics for PiFace digital).

For the filterwheel I wanted to use the Focuser 1 (which is assigned to GPIOB). Here the driver relates to the inputs 0-3, but that is not working. So question is, whether both focusers could be assigned to GPIOA, one to the Pins 0-3, the other (as is) to pins 4-7?

The below command from the library PiFace-focuser.cpp ( indiPiFaceFocuser2) refers to GPIOA, but could not get my head around, where the assignment to pin 4-7 comes from - would be really curious to understand:

mcp23s17_write_reg(payload, GPIOA, 0, mcp23s17_fd);

Could it just be a matter of transponing the stepstates for example like this:

int step_states[8] = {0xa, 0x2, 0x6, 0x4, 0x5, 0x1, 0x9, 0x8};

into ... = {0xa0, 0x20, 0x60, 0,40, 0x50, 0x10, 0x90, 0x80};

I.e. to change the bits from e.g. from 1010 to 10100000 thus accessing the pins further "to the right" on the PiFace board.

...providing both steppers are not run at the same time.

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

Last Edit: by HelgeMK.

Astroberry PiFace 1 month 2 weeks ago #19997

  • Kaczorek
  • Kaczorek's Avatar Topic Author
  • Away
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 393
  • Karma: 4
  • Thank you received: 135
Hi Helge. It's not going to work this way.
What you're really looking for is selecting ports A and B. Take a look at core library github.com/piface/libmcp23s17/blob/master/src/mcp23s17.h
See lines 54-55:
#define GPIOA 0x12 // port A
#define GPIOB 0x13 // port B

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