View Full Version here: : General control USB -> prallel port
bojan
08-12-2021, 12:53 PM
I was thinking.. it would be very convenient to have general control utility to switch ON or OFF various things in observatory (power, lights, filters.. you name it)..
I have couple of National Instruments USB-6501 modules, they are ideal for that purpose from h/w point of view.. but I don't have any drivers (I know they are part of NI packages, but the price for all that is out of amateur's pocket.
Does anyone knows of alternative solutions for application that can be used to control 6501?
Also, how about USB-> parallel adapter?
Or this Arduino relay board :
https://www.jaycar.com.au/arduino-compatible-8-channel-relay-board/p/XC4418?pos=7&queryId=12c2cbc7f882e1b700396391e7b 4fa23&sort=relevance
Thanks in advance!
bojan
08-12-2021, 08:46 PM
I found something very interesting: software for LPT1 control.
https://www.instructables.com/Home-Automation-Control-a-Relay-with-your-Paralle/
The computer I am using (HP Compaq workstation, 32-bit W'7 Pro) has LPT1 port (I also have USB-LPT adapter).
And here - USB-Parallel..
https://sigma-shop.com/category/4/relay-boards.html
redbeard
09-12-2021, 03:01 PM
Hi bojan,
LPT control is a bit old and clunky. I used to use the LPT port to control things back in the 486 PC days.
Why not use an Arduino controller that is not only easy to connect hardware to, but also as an interface for the PC where any programming language could be used? That way software or hardware control could be used.
I'm interested in this topic and keen to see where it goes.
Cheers,
Damien.
bojan
09-12-2021, 05:09 PM
Damien,
Arduino is also on the table, of course.
Also, I asked Bob (Brown) if his MyFocuserPro2 app can be "widened" a bit to include support for filters and Bahtinov mask (which is the main reason I am doing this.. I want to be able to control it without climbing on the ladder in the dark to check focus between exposures).
I want to do it simple - if something free already exists, why not use it (even with small mods if possible :) )
redbeard
09-12-2021, 05:59 PM
What kind of control are you looking at for your filters and B mask?
Something like a relay and an actuator/solenoid for B mask?
Are the filters in a filter wheel and need to be controlled via Ascom or another method? Just need to determine exactly how you want to control those things.
Do you want to be able to control from PC only or standalone?
There are so many ways this can be done, just wanting to know what your preferred method is.
Cheers.
bojan
09-12-2021, 06:36 PM
Preferred method is from PC.. which is on WiFi (so it can be controlled from inside of house). But also stand-alone.
As for B mask, I was thinking of very simple motorized mechanical design - one DC motor and limit switches that stop motor when mask is in position, so only one control line is needed.
Long time ago I was using HP V.. predecessor of National Instruments Lab View. I even have installation disks somewhere.. problem with this is, HPIB interface card is needed (I have it, but it wouldn't fit in my comp, it is too old).
But, it is very easy to "write" applications for it, similar to Lab View.
As for filters, not sure yet, but they will probably be on wheel (again, simple DC motor.. or stepper, I will decide when need arises).
So.. for the star I would like to have something like this, but in Arduino form:
https://sigma-shop.com/product/66/usb-to-serial-8-digital-channel-output-modul.html
If there is nothing available like that in Arduino world, then I will buy that module and be done with it.
bojan
11-12-2021, 07:22 AM
Idea for remote bahtinov came from here: https://www.youtube.com/watch?v=KrSrh4rIldk
This is no-nonsense circuit (with limit switches) for motor control.
Either H-bridge (controlled by single control line) or dpdt switch can be used.
Motor can come from some toy or I can use something like this (https://www.ebay.com.au/itm/403276088783?hash=item5de520c5cf:g: qecAAOSwlflhg6lY) or this (https://www.jaycar.com.au/dc-geared-motor-with-rubber-wheel/p/YG2900?pos=4&queryId=147e60ea3b153b0b0fd17d3815e 3cc0c&sort=relevance) depending on output speed (perhaps reduction should use worm gear instead).
bojan
11-12-2021, 01:57 PM
Found something suitable in my drawers.. I think that came from trash can lid opener, output shaft was spring loaded (I removed the spring, it would return to original position when power is removed.
it works OK at 5V / 250 mA.
bojan
12-12-2021, 11:04 AM
This LPT port tester works on w'7 (LPT1):
http://www.downtowndougbrown.com/2013/06/parallel-port-tester/
However, I want to use USB-LPT adapter I purchased a long time ago (because everything in my obs is on USB), device manager finds it and lists it as LPT3 but the above app doesn't recognize it for some reason.
bojan
13-12-2021, 12:50 PM
I think I found the solution for $25, local supply:
https://au.banggood.com/8CH-Channel-12V-Computer-USB-Control-Switch-Free-Drive-Relay-Module-PC-Intelligent-Controller-p-1533752.html?cur_warehouse=CN&rmmds=search
redbeard
16-12-2021, 12:24 AM
Hi bojan,
I've had limited success with the USB LPT devices to do similar things in the past, as they sometimes just don't seem to match the old school way of hardware/addressing or something like that.
That last board you posted looks like the go, in my quick look, I could not find the API so to speak, so not sure on control.
Although, if you did it in Arduino + relays or other hardware, there would be a lot more flexibility on what you could do to it. For example, you could add input switches to give it stand alone operation without a PC and also use inputs as a way of detecting triggers, (micro switch etc). Use PWM to control motors, stepper motor control... I'm guessing you have no issues with coding, either way, I'll be happy to help out with code if you need a hand.
Keen to see what bits end up in the device.
Cheers,
Damien.
bojan
22-12-2021, 10:31 AM
Damien,
Thanks for the offer for help, let's see what happens.
At the moment, I have LPT1 port working, and relay box (donated to me by Avandonk couple of years ago..).
So for the start, I have to have all those gadgets installed (mask mechanism, filters etc.).
bojan
24-12-2021, 05:15 PM
Today, USB card arrived, but without any software.
After driver is installed, device manager display properties as shown below.
Also, I found on this website (https://www.alibaba.com/pla/Taidacent-ULN2803-Chip-5V-12V-24V_60613299640.html?mark=google_sh opping&biz=pla&searchText=Relays&product_id=60613299640&pcy=AU&src=sem_ggl&from=sem_ggl&cmpgn=15507598789&adgrp=130399874349&fditm=&tgt=pla-1545918019116&locintrst=&locphyscl=9071448&mtchtyp=&ntwrk=u&device=c&dvcmdl=&creative=568030162520&plcmnt=&plcmntcat=&p1=&p2=&aceid=&position=&localKeyword=&pla_prdid=60613299640_uplift&pla_country=AU&pla_lang=en&gclid=EAIaIQobChMImZ_KqfP79AIVx4NLB R3JRgqKEAsYBCABEgJHOfD_BwE) something that looks like the same card, but app I found somewhere else (looks the same) doesn't recognize the card.. so I am a bit stuck here.
Anybody knows where can I download the test app?
bojan
24-12-2021, 07:20 PM
This (https://www.alibaba.com/product-detail/Taidacent-ULN2803-Chip-5V-12V-24V_60613299640.html) looks like the same thing..
Found both apps (as on images supplied by website), but neither finds the board...
redbeard
24-12-2021, 07:50 PM
I agree that it does look like the same board and therefore the software you found on another website should work. But maybe each manufacturer/seller has a different code? I would not normally think so.
I went back to the website where the relay device was and worked out how to download the software from their web site:
https://au.banggood.com/8CH-Channel-12V-Computer-USB-Control-Switch-Free-Drive-Relay-Module-PC-Intelligent-Controller-p-1533752.html?cur_warehouse=CN&rmmds=search
Then where it has the text:
>>>File download: Click here to open<<<
Right click on it and choose 'Save Link As" or similar depending on web browsers, and save the file to your hard disk. The file is in RAR format so you may need to download a free RAR extractor program from:
https://www.7-zip.org/
Keep extracting until you get to a folder called USBRelay. The files are there.
Ice in space limits the size of the files so I can't upload unfortunately.
The other thing too is this board is not 'serial USB', it's 'HID USB' which is much different and cannot be used with serial communications.
If you get stuck getting the files as they have not made it easy, I'll see if I can put then on 'BOX drive' or similar.
Cheers and Happy Happy.
Damien
redbeard
24-12-2021, 08:07 PM
I wasn't very clear on my explanation of where I downloaded the files: I meant to say that the files I downloaded were from the exact site where you bought the relay board from so that might make a difference.
bojan
24-12-2021, 10:40 PM
Damien, I already downloaded from your link and it doesn't work.
I also asked seller to provide a link.
bojan
24-12-2021, 10:47 PM
I will also try the app with different comp...
bojan
25-12-2021, 08:44 AM
Hmm..
It seems installed driver is from here:
https://sourceforge.net/projects/libusb-win32/
There is also a source code on link below that could be used for developing applications, but the test GUI should be quite OK for me.. provided it worked..
http://myosuploads3.banggood.com/products/20191106/20191106020257USBRelay.rar
Now.. my comp (this one I am using at home ) is 64-bit W7 Pro.. maybe I need 32-bit? (it doesn't complain...)
bojan
25-12-2021, 10:35 AM
Well, application works on 32-bit machine.
So - now I can start building gadgets and control them :-)
The first one will be remote controlled Bahtinov... and power On_OFF switch for mount.
Then, ROR motor...
redbeard
26-12-2021, 09:54 AM
That's great to hear.
I'm fairly sure that the files you downloaded include the source code which is written in c++ which may come in handy if you ever wanted to modify or add functionality.
I don't know c++ but I have visual studio installed and might have a look to learn something. I do know some c# so that may help.
When I get some time I'm thinking of making an Arduino version that has serial comms so app development is more flexible and easy to implement. Also, I'm interested in writing an ascom driver so some fun to be had there too. Have not done that before.
Zubenel
31-07-2024, 05:07 AM
Very late to the thread. The focus issue has surpassed the B mask now days. Nina works fab with Hocus Focus.
I am interested how you went with automating the ROR. I’m looking at what locals use for the Ror motor and control software. Cheers
bojan
31-07-2024, 08:33 AM
It is still work in progress..
https://www.iceinspace.com.au/forum/showthread.php?t=176799&page=4
vBulletin® v3.8.7, Copyright ©2000-2025, vBulletin Solutions, Inc.