Jump to content

Banner.jpg.b89429c566825f6ab32bcafbada449c9.jpg

Mountings and Controls For Widefield Imaging Rig


Gina

Recommended Posts

Next question is do I fault-find on the present board with Arduino Nano or do I go flat out for the direct INDI drive version?  I think the latter as I don't like the crudity of the Arduino design and I would want to modify the driver anyway (and write a sketch).  I would really like to get to grabs with dedicated INDI driver writing - so many possibilities, including observatory roof control etc.

Link to comment
Share on other sites

  • Replies 345
  • Created
  • Last Reply

The writer of the Astroberry driver has a more up to date version that uses the PiFace expansion boards. Might be worth looking at as these can be stacked using a PiRack card. It allows up to 4 PiFace cards to be driven from a single Pi. Thats 16 outputs I think.

Link to comment
Share on other sites

Thanks Dave :)  I've looked at the Pi-face before but this has been upgraded since I last looked.  I'll have another look.  At least it should give me more ideas for drivers :)

Link to comment
Share on other sites

Looked through the capabilities and code and it doesn't seem to do what I want as far as camera rotation is concerned.  Focuser is already cracked.  I've also Googled for INDI camera rotator and found nothing - at least not as yet, so it still looks like I'll produce my own.  I would like to ask questions in the INDI Forum but, for some reason, it won't accept my registration :(

Link to comment
Share on other sites

What I would really like to do is to avoid long "fly" leads from GPIO pins to circuit board and use a connector directly on the board as with a HAT.  I've searched for ready made HATs and found nothing suitable.  I could modify the sort of HAT I already use to take two stepper drivers by drilling an extra hole in the board to take the motor power for the second driver and wire that across to the next strip.  That would work for the non-zoom rig with just two stepper motors though would need a new box and won't fit between cage and dovetail bar.

To fit in the present box and between cage and dovetail bar, another idea would be to use strip board inverted with a GPIO connector soldered on at the end.  The driver modules would be underneath where there would be enough room to take them.  They do not need heatsinks as the motor current required is quite low and only applied for a short time (unlike a 3D printer).  Link wires would connect from the GPIO connector lines to the drivers.

This is the bare HAT.  There are 23 strips then 15 strips and 7 strips.  Two drivers of 16 pins need two rows of 16 holes so the 15 strips are one short.  A hole between the 15 set and 7 set in the appropriate place would take the extra pin from the socket and could be wired across to the first of the 7 strips.

HAT.JPG

Link to comment
Share on other sites

I've decided to go for the inverted stripboard approach as it will be less work than designing and printing a new box and a bracket to hold it somewhere.  Also, I can easily arrange to accommodate three stepper drivers to permit zoom control in addition to focus and rotation.  Driver-wise, the driver code for the rotation will only need slight modification for zoom control.

I know I haven't yet tried zoom lenses for normal imaging but I have tried one for my for all sky camera and apart from some peripheral distortion the resolution was pretty good and there were no reflections or other artifacts from the stars.  This gives me hope in trying them for DSO imaging. 

I might add the option to set up for different zoom lenses, making the GUI more user friendly and while all this is for my own use ATM I would like to think I might encourage others to try it - assuming I get decent results :)  And as such a user-friendly GUI would be wanted.

Link to comment
Share on other sites

I didn't like the inverted stripboard idea so went for a different option - connect from the GPIO pins with a female right angle PCB connector to a daughter board and thence with right angle pip to pin header to connect to the main stripboard.  At the same time I have reduced the distance from GPIO pins to stepper driver.  The space between the circuit board and side of the box will be occupied by the buck converter that supplies 5.1v to the RPi.

Circuit Construction 02.JPGCircuit Construction 03.JPG

Link to comment
Share on other sites

I can test the other driver circuits by changing the GPIO pin assignments in the focuser driver code and plugging a driver module and stepper motor connection in the other sections.  I want to know the that the hardware works before testing the software (new INDI drivers).

Rotator :-
Pin 19 - GPIO 10 - SLEEP
Pin 21 - GPIO 9 - STEP
Pin 23 - GPIO 11 - DIR
Pin 29 - GPIO 5 - Home Sensor (if I use it)

Zoom :-
Pin 31 - GPIO 6 - Zoom Home Sensor (if I use it)
Pin 33 - GPIO 13 - SLEEP
Pin 35 - GPIO 19 - STEP
Pin 37 - GPIO 26 - DIR

Link to comment
Share on other sites

This is the section of code that wants altering to change the GPIO pin assignments.

//RPi 2
#define DIR RPI_BPLUS_GPIO_J8_07	// GPIO4
#define STEP RPI_BPLUS_GPIO_J8_11	// GPIO17
#define M0 RPI_BPLUS_GPIO_J8_15		// GPIO22
#define M1 RPI_BPLUS_GPIO_J8_13		// GPIO27
#define SLEEP RPI_BPLUS_GPIO_J8_16	// GPIO23

No speed change required (running full-step only) so M0 and M1 are simply assigned to currently unused pins viz. 29 and 31, GPIO 5 and 6 which I may use as inputs later.

//Camera Rotator
#define DIR RPI_BPLUS_GPIO_J8_23	// GPIO11
#define STEP RPI_BPLUS_GPIO_J8_21	// GPIO9
#define M0 RPI_BPLUS_GPIO_J8_29		// GPIO5
#define M1 RPI_BPLUS_GPIO_J8_31		// GPIO6
#define SLEEP RPI_BPLUS_GPIO_J8_19	// GPIO10

//Zoom
#define DIR RPI_BPLUS_GPIO_J8_37	// GPIO26
#define STEP RPI_BPLUS_GPIO_J8_35	// GPIO19
#define M0 RPI_BPLUS_GPIO_J8_29		// GPIO5
#define M1 RPI_BPLUS_GPIO_J8_31		// GPIO6
#define SLEEP RPI_BPLUS_GPIO_J8_33	// GPIO13

 

Link to comment
Share on other sites

Edited rpi_focus.cpp, saved it back then recompiled which gave no errors but when I tried it the PSU showed 0.5A when the driver should be sleeping (and no rotation) so I have something wrong.  Having had one success, I think I'll leave it for tonight and see if I can find why it won't work tomorrow.  Could be hardware or the coding.

This is the list of commands :-

cd indi-astroberry
cmake -DCMAKE_INSTALL_PREFIX=/usr ../astroberry-svn
make
sudo make install

And this is the section of code concerned - I commented out the Focuser control and added the rotation code :- 



/*//RPi 2
#define DIR RPI_BPLUS_GPIO_J8_07	// GPIO4
#define STEP RPI_BPLUS_GPIO_J8_11	// GPIO17
#define M0 RPI_BPLUS_GPIO_J8_15		// GPIO22
#define M1 RPI_BPLUS_GPIO_J8_13		// GPIO27
#define SLEEP RPI_BPLUS_GPIO_J8_16	// GPIO23
*/

//Camera Rotator
#define DIR RPI_BPLUS_GPIO_J8_23	// GPIO11
#define STEP RPI_BPLUS_GPIO_J8_21	// GPIO9
#define M0 RPI_BPLUS_GPIO_J8_29		// GPIO5
#define M1 RPI_BPLUS_GPIO_J8_38		// GPIO6
#define SLEEP RPI_BPLUS_GPIO_J8_19	// GPIO10

 

Link to comment
Share on other sites

Been checking again this morning that both the hardware and software are correct and I can't find anything wrong.  Think I'll try the third stepper section.  Just a matter of editing the code and recompiling the software and plugging the driver and motor into the new places.

Link to comment
Share on other sites

//Zoom
#define DIR RPI_BPLUS_GPIO_J8_37	// GPIO26
#define STEP RPI_BPLUS_GPIO_J8_35	// GPIO19
#define M0 RPI_BPLUS_GPIO_J8_29		// GPIO5
#define M1 RPI_BPLUS_GPIO_J8_31		// GPIO6
#define SLEEP RPI_BPLUS_GPIO_J8_33	// GPIO13

 

Link to comment
Share on other sites

Hooray, that's working :)  After a bit of fault-finding.  The DIR wasn't working - going clockwise only.  But I found the problem - intermittent connection at the joint between connector and stripboard.  Se-soldered it and all is well.  And that is the reason the original build didn't work!  Magic found and solved :)  I guess the connection was making when I tested with the ohms on my DMM but not when testing operation.

Now I just have to find out why the middle circuit isn't working...

Link to comment
Share on other sites

I think I need something better than my eyesight, aided by reading glasses and a 3x magnifier and ring light!!  I have a USB microscope somewhere which, as I recall, gives around 200x magnification on a standard sized monitor.

Link to comment
Share on other sites

Very carefully checked over the hardware again including testing with DMM and still can't find anything wrong.  Edited and re-compiled code and that looks fine.  Still seeing half an amp on PSU when switched on but no operation, just as before.

I have had one thought - I'm using the pins that may be used for SPI and I'm wondering if somehow this has got turned on.  will now check with sudo raspi-config.

Link to comment
Share on other sites

Thanks Dave - yes, it has.

Turned it off and still the same but I'm wondering if something is turning it back on.  Need to tell if it's on or off - raspi-config doesn't tell you - only lets you turn it on or off. I'll do a Google...

Link to comment
Share on other sites

Found it :)

Quote

The SPI master driver is disabled by default on Raspbian. To enable it, use raspi-config, or ensure the line dtparam=spi=on isn't commented out in /boot/config.txt, and reboot. If the SPI driver was loaded, you should see the device /dev/spidev0.0.

 

Link to comment
Share on other sites

Seems to be off.

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
dtparam=spi=off

And I can't see the device listed.

pi@raspberrypi:~ $ ls /dev
autofs         cpu_dma_latency  gpiomem  loop1  loop-control      mqueue              pts    ram14  ram7     shm     tty1   tty16  tty22  tty29  tty35  tty41  tty48  tty54  tty60  ttyAMA0    vcio    vcs5   vcsa5      zero
block          cuse             hwrng    loop2  mapper            net                 ram0   ram15  ram8     snd     tty10  tty17  tty23  tty3   tty36  tty42  tty49  tty55  tty61  ttyprintk  vc-mem  vcs6   vcsa6
btrfs-control  disk             initctl  loop3  mem               network_latency     ram1   ram2   ram9     stderr  tty11  tty18  tty24  tty30  tty37  tty43  tty5   tty56  tty62  uhid       vcs     vcsa   vcsm
bus            fb0              input    loop4  memory_bandwidth  network_throughput  ram10  ram3   random   stdin   tty12  tty19  tty25  tty31  tty38  tty44  tty50  tty57  tty63  uinput     vcs1    vcsa1  vhci
cachefiles     fd               kmsg     loop5  mmcblk0           null                ram11  ram4   raw      stdout  tty13  tty2   tty26  tty32  tty39  tty45  tty51  tty58  tty7   urandom    vcs2    vcsa2  watchdog
char           full             log      loop6  mmcblk0p1         ppp                 ram12  ram5   rfkill   tty     tty14  tty20  tty27  tty33  tty4   tty46  tty52  tty59  tty8   vc-cma     vcs3    vcsa3  watchdog0
console        fuse             loop0    loop7  mmcblk0p2         ptmx                ram13  ram6   serial1  tty0    tty15  tty21  tty28  tty34  tty40  tty47  tty53  tty6   tty9   vchiq      vcs4    vcsa4  xconsole

So it should be alright.

Link to comment
Share on other sites

Further information - when the stepper motor is running it draws about 270mA (not 500mA).

When the RPi is powered the RESET line is "1" ie. no reset so the stepper driver is enabled whereas when switched off the +3.3v rail is at 0v = logic "0" and RESET is ON disabling the stepper driver.  I think the stepper driver is somehow ON and driving the motor, which isn't rotating so the current may be higher (no back EMF).

Wish there was a way to add overline to characters in the editor as this is RESET bar.

Looking at the A4988 driver datasheet, the STEP command works on a low to high transition of the STEP input so only a pulse train and not just a logic level causes a step.  ie. without a pulse train the driver should not drive the motor and draw current.

Link to comment
Share on other sites

This is very puzzling!!  How can the stepper driver cause motor coil current without stepping?  Or is it?

I've measured the driver output voltages across the coils and measured 13.5v on each!  Coil resistance is 55 ohms so expected current is 13.5/55 twice = 245mA x2 = 490mA which is roughly what I'm seeing.

I have also checked the voltages on the DIR, STEP and SLEEP pins on the driver when the 13.8v is on and the RPi is powered but nothing started up.  DIR=0.01v STEP=0.02v SLEEP=3.30v

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • 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.