Jump to content

stargazine_ep44_banner.thumb.jpg.6153c4d39ed5a64b7d8af2d3d6061f61.jpg

RPi3B ... new mb for lappy ... what to do? ...


Recommended Posts

Just connected up the RPi 3 with the Ubuntu Mate OS and yes, the WiFi is set up and working :)  Ubuntu Mate looks rather easier (or familiar) than Raspbian.  Now seeing what I have installed.

  • Like 3
Link to post
Share on other sites
  • Replies 198
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Just connected up the RPi 3 with the Ubuntu Mate OS and yes, the WiFi is set up and working   Ubuntu Mate looks rather easier (or familiar) than Raspbian.  Now seeing what I have installed.

Hello folks! Been reading this thread with great interest. Ekos shall be available on Linux, Windows, and soon OSX in addition to KState Lite on Android (not yet released). INDI Library only available

I need an emoticon with a light bulb going on! I see where the confusion has arisen. I thought the "SD card adapter slot" was referring to the slot on the RPi motherboard where the SD card goes,

Posted Images

INDI and KStars are installed and I've just installed TeamViewer.  Ran sudo apt-get update and now running sudo apt-get upgrade.  When that's finished I'll reboot to check all's well and then make a backup of the micro SD card.

Link to post
Share on other sites

I could try the Raspbian micro SD card in another RPi 3 but with Ubuntu MATE working I don't see much point unless I have problems with that.  I prefer Ubuntu as that is much the same as Mint so I'm very used to the layout - much the same software installed too, like Firefox and Thunderbird - not that I plan to use Thunderbird much if at all.  Firefox is useful for downloading any additional apps.

Once I have things running I shall remove all the software I don't need.  26GB free ATM but the fewer apps installed the more the card image will compress for eventual upload for anyone else to use.

That's the WiFi problem solved then and that leaves seeing if I can get Ekos working remotely.  As things stand I have KStars with Ekos installed on the RPi so I could drive the system through TeamViewer if there's enough capacity by using KStars and Ekos locally.

  • Like 1
Link to post
Share on other sites

So Dave, the race is on to see who can get an auto-focuser working for the RPi and INDI/Ekos first :D

There is a focuser driver in INDI and once I get Ekos/INDI running I can see which pins on the RPi are controlled by the focuser driver and then work out how to wire up a stepper motor for focussing.  Maybe a use for my mini oscilloscope at last :D There are two possibilities for driving a 28BYJ-48 stepper motor.   4 wires to a ULN2003AN driver chip or 2 wires (step and direction) to a Pololu driver module as used in 3D printers. 

Edited by Gina
Link to post
Share on other sites

I've found some info for the Astroberry Focuser for which there is an INDI driver.

Quote

2. Astroberry Focuser
* Stepper motor - PG2528-0502U 5V 0.2A 0,5Nm (with builtin gear 76:1)
* Stepper motor controller - Low-Voltage DRV8834 10,8V 2A.
Wiring Raspberry Pi to the motor controller:
GPIO04 - DIR
GPIO17 - STEP
GPIO22 - M0
GPIO27 - M1
GPIO23 - SLEEP
Note: Make sure you connect the stepper motor correctly to the controller (B2, B1 and A2, A1 pins on the controller).
Remember to protect the 5V power line connected to VMOT pin on the motor controller with 100uF capacitor.

This is using a Pololu type micro-stepping driver module and I have a modification to the 28BYJ-48 stepper motor to convert it to a bi-polar connection with two independent coils like the NEMA series of stepper motors.  The 28BYJ-48 stepper motor is ideally suited to the focuser application for camera lenses and telescopes due to it's small size and power requirements and the 64:1 internal gearbox.

This is the pinout info I require so I won't be needing my oscilloscope after all - except perhaps to check if the pins are actually being controlled.

Edited by Gina
Link to post
Share on other sites
54 minutes ago, Gina said:

So Dave, the race is on to see who can get an auto-focuser working for the RPi and INDI/Ekos first :D

There is a focuser driver in INDI and once I get Ekos/INDI running I can see which pins on the RPi are controlled by the focuser driver and then work out how to wire up a stepper motor for focussing.  Maybe a use for my mini oscilloscope at last :D There are two possibilities for driving a 28BYJ-48 stepper motor.   4 wires to a ULN2003AN driver chip or 2 wires (step and direction) to a Pololu driver module as used in 3D printers. 

I have quite a few spare Pololu drivers from my 3D printer build so I will probably go down that route and mod a 28BYJ-48 stepper.

  • Like 1
Link to post
Share on other sites

I found this interesting article whilst googling for Rpi3/Indi combinations. It's a pdf and he uses dual Rpi2's but some useful config info for Raspbian and Ubuntu.

http://atm.udjat.nl/stepper/Remote Control - EN.pdf

The website it is from looks interesting too

http://atm.udjat.nl

 

Edited by tekkydave
Link to post
Share on other sites

Ah yes - I found that article too but not the web site so thanks for that :)  Looks like INDI etc. will make for a very versatile control system.  And not just for scope and camera control plus focuser but all sorts of observatory control.  I like the idea of an integrated system rather than lots of separate apps cobbled together as we seem to have with EQMOD ASCOM.

Link to post
Share on other sites
16 hours ago, Gina said:

No, it's not that simple - the coils are connected together at their centre taps and that connection has to be broken.

It is that simple, but there is of course a caveat ;)

That caveat is you can only use full stepping then it will work fine driving a 5 wire unipolar as bipolar on any driver, half stepping will work fine on the drivers we like to use A4988 or DRV8825 but nothing more microsteppy will work properly.

  • Like 1
Link to post
Share on other sites
19 hours ago, Gina said:

I've found some info for the Astroberry Focuser for which there is an INDI driver.

This is using a Pololu type micro-stepping driver module and I have a modification to the 28BYJ-48 stepper motor to convert it to a bi-polar connection with two independent coils like the NEMA series of stepper motors.  The 28BYJ-48 stepper motor is ideally suited to the focuser application for camera lenses and telescopes due to it's small size and power requirements and the 64:1 internal gearbox.

This is the pinout info I require so I won't be needing my oscilloscope after all - except perhaps to check if the pins are actually being controlled.

Any idea what step resolution this uses? There are connections to the M0 and M1 so maybe it changes dynamically. The Pololu uses 3 pins to define step resolution so may need some extra circuitry?

Edited by tekkydave
  • Like 1
Link to post
Share on other sites

From the DRV8834 specs:

 

The resolution (step size) selector inputs (M0 and M1) enable selection from the six step resolutions according to the table below. M0 is floating by default, while M1 has an internal 200 kΩ pull-down resistor, so leaving these two microstep selection pins disconnected results in 1/4-step mode. For the microstep modes to function correctly, the current limit must be set low enough (see below) so that current limiting gets engaged. Otherwise, the intermediate current levels will not be correctly maintained, and the motor will skip microsteps.

M0 M1 Microstep Resolution
Low Low Full step
High Low Half step
Floating Low 1/4 step
Low High 1/8 step
High High 1/16 step
Floating High 1/32 step
  • Like 1
Link to post
Share on other sites

That interesting - particularly the three state M0 - never thought of that, I assumed they were using just the four resolutions :)  I would imagine that when M0 is connected to to the RPi it only has two states unless the RPi has a floating state...

Link to post
Share on other sites

Looking at the astroberry focuser source it looks like setting the gpio pin to an input makes it floating (see case 3 and 6)

bool FocusRpi::SetSpeed(int speed)
{
	/* Stepper motor resolution settings (for PG2528-0502U)
	* 1) 1/1   - M0=0 M1=0
	* 2) 1/2   - M0=1 M1=0
	* 3) 1/4   - M0=floating M1=0
	* 4) 1/8   - M0=0 M1=1
	* 5) 1/16  - M0=1 M1=1
	* 6) 1/32  - M0=floating M1=1
	*/

    switch(speed)
    {
    case 1:	// 1:1
        bcm2835_gpio_fsel(M0, BCM2835_GPIO_FSEL_OUTP);
		bcm2835_gpio_fsel(M1, BCM2835_GPIO_FSEL_OUTP);
        bcm2835_gpio_write(M0, LOW);
		bcm2835_gpio_write(M1, LOW);
        break;
    case 2:	// 1:2
        bcm2835_gpio_fsel(M0, BCM2835_GPIO_FSEL_OUTP);
		bcm2835_gpio_fsel(M1, BCM2835_GPIO_FSEL_OUTP);
		bcm2835_gpio_write(M0, HIGH);
        bcm2835_gpio_write(M1, LOW);
        break;
    case 3:	// 1:4
        bcm2835_gpio_fsel(M0, BCM2835_GPIO_FSEL_INPT);
		bcm2835_gpio_fsel(M1, BCM2835_GPIO_FSEL_OUTP);
        bcm2835_gpio_write(M0, BCM2835_GPIO_PUD_OFF);
        bcm2835_gpio_write(M1, LOW);
        break;
    case 4:	// 1:8
        bcm2835_gpio_fsel(M0, BCM2835_GPIO_FSEL_OUTP);
		bcm2835_gpio_fsel(M1, BCM2835_GPIO_FSEL_OUTP);
        bcm2835_gpio_write(M0, LOW);
        bcm2835_gpio_write(M1, HIGH);
        break;
    case 5:	// 1:16
        bcm2835_gpio_fsel(M0, BCM2835_GPIO_FSEL_OUTP);
		bcm2835_gpio_fsel(M1, BCM2835_GPIO_FSEL_OUTP);
        bcm2835_gpio_write(M0, HIGH);
        bcm2835_gpio_write(M1, HIGH);
        break;
    case 6:	// 1:32
        bcm2835_gpio_fsel(M0, BCM2835_GPIO_FSEL_INPT);
		bcm2835_gpio_fsel(M1, BCM2835_GPIO_FSEL_OUTP);
		bcm2835_gpio_write(M0, BCM2835_GPIO_PUD_OFF);
        bcm2835_gpio_write(M1, HIGH);
        break;
    default:	// 1:1
        bcm2835_gpio_fsel(M0, BCM2835_GPIO_FSEL_OUTP);
		bcm2835_gpio_fsel(M1, BCM2835_GPIO_FSEL_OUTP);
        bcm2835_gpio_write(M0, LOW);
        bcm2835_gpio_write(M1, LOW);
        break;
    }
	return true;
}

 

  • Like 1
Link to post
Share on other sites

Ah yes, I see :)  I think the same applies to the Arduino. 

Given that code, I guess we could modify it to use 3 GPIO pins and to work with the Pololu A4988 driver module, then recompile and install new driver (if it's worth bothering).  I don't see that we need all these speed settings but won't know for sure until testing.  On my current remote focussing unit with the Arduino Nano I have three speeds - x1, x10 and x100 but don't use the x100.  These speeds are simply set up in the sketch by changing the number of steps sent to the stepper motor per control step.  But this is using manual control not auto-focussing.

Link to post
Share on other sites

Two problems!  The Astroberry driver doesn't work with INDIserver and whatever hardware I've tried I only get the simulator in Ekos.  That's with KStars/Ekos running locally. 

I'm wondering whether to take a different tack for the focuser for my all sky camera.  The focus should only need setting once after the dome is installed so a simple Python app should be enough or I could go back to an Arduino with a single control wire.  However, I would still like to use the RPi with INDI driver and connection with KStars/Ekos or PixInsight for the camera.

ASC aside, I want remote focussing for the NB astro imaging system as well as INDI controlled imaging and camera/FW control so I really want to get this sorted out!!!

Link to post
Share on other sites

I have some success! :)  With a few things working in Ubuntu MATE on the RPi 3 such as the WiFi and remote connection through TeamViewer, I went back to trying KStars/Ekos on the Linux Mint laptop.  Read the Ekos INDI web page again and the configuration for remote connection and put the IP address of the RPi WiFi in the connection box.  The port was already set to 7624, agreeing with the port listed in the CLI on the RPi.  Then connected to INDI and went into the Device Selection and chose the ASI CCD driver which was listed. 

Next on to the Ekos control section and saw that the remote camera was correctly shown as ZWO CCD ASI178MM :)  So I had a remote connection HOORAY!!! :)  Then in the Main Control tab I clicked Connect and the green light came on, set the exposure to 0.1s and Set and... low and behold a new window popped up with the image from the ASC camera.

  • Like 2
Link to post
Share on other sites

I never use the IP address. Instead I use the computer name assigned during Ubuntu installation with .local appended e.g. astro-pi.local

Pretty sure no other software is needed although I also use Samba

  • Like 1
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.