![]() |
|||||||||
Intoduction | Gallery | Reviews | Object Catalogue | Contact me | My Flickr Photostream | ||||||||
USB Focus Controller NOTE: This is not really a how-to but more of a what i did! Parts Required Small project Box Large project box 4 x 12v LED illuminated buttons L293D IC (H bridge) chip 16 pin IC socket Arduino Nano 5 x 2.2k resistors 2 x 10k potentiometer 1 x 43v 1000UF capacitor 16x2 LCD display 3x4 Matrix keypad Copper clad board Etching fluid 4 Port passive USB hub USB RS323 adaptor Dual USB headers 4 x 5mm nylon PCB standoffs 4 x 10mm nylon PCB standoffs Various M2 and M3 nuts and bolts RJ45 cable RJ9 cable 12v Plug & cable Short USB mini cable Long USB mini cable Various colours wires PCB pins and sockets DPDT switch 15v Zenner diode Termination block I have a SkyWatcher "AutoFocuser" attached to my focuser in my telescope and i'm not overly impressed with the simple hand controller for it and I have seen various USB focus controllers on the market but none of them seem to meet my reqirements, they are either USB 5v or quite pricey! So i've decided to make my own. In the beginning i didn't plan to add many features but as time went on things progressed, hence the reason it's not a how-to! The features NOW include:
Build Process 1. The basis of this focuser is an Arduino nano (£7 ebay) and initially i believed i had a stepper motor so i ordered a EasyDriver stepper controller. ![]() 2. After a bit of testing and a push in the right direction from 'Gina' on Stargazers Lounge i found out i actually had a DC motor not a stepper so the EasyDriver was of no use! ![]() 2a. Diagram of the Arduino pins. ![]() 3. After a little playing i managed to get the LCD and four buttons to work with pull down resistors on each button pin. (See schematic and code in appendix 1) ![]() 4. Here's the keypad attached and working to slew the focuser to an absolute position. NOTE: I have had issues with using 7 digital pins for the keyboard so check out appendix 2. ![]() 5. Configured and working L293D (H-Bridge chip) driving motor. ![]() 5a. Diagram of the L293D PINs. ![]() 6. Using ExpressPCB i designed a PCB for my focuser. I also included two mini PCB sections at the side for the LCD and keypad sockets, of which the keypad is now superseded by the new 1 pin PCB. ![]() 7. Using a laser printer and iron transfer method i 'printed' my PCB, i also had to touch it up with a permanent pen. See my PCB etching how-to. ![]() 8. The PCB ready for etching. ![]() 9. The Etched PCB ![]() 10. Here i've drilled 1mm holes for each component as required and soldered on the sockets and plugs. ![]() ![]() 11. Solder the remaining components on to the board and build LCD and Keypad sockets. ![]() ![]() 12. All tested prior to building into the enclosure. ![]() 13. Position LCD and Keypad on the main enclosure ready for cutting in and do the same with the hand controller buttons. ![]() ![]() 14. Remove the case from the USB hub. ![]() 15. Unsolder two of the USB sockets from the hub and solder the headers on. ![]() 16. In the hand controller drill an appropriate hole and insert the buttons ![]() ![]() 17. Using the schematic solder and connect up the buttons. ![]() ![]() 18. Mark and cut out holes for LCD, Keypad, USB ports and all cables. ![]() 19. Fit LCD and Keypad (Here i cut the LCD hole too large, Doh!) ![]() 20. Start fitting the components to the enclosure. ![]() ![]() 21. I Soldered a DPDT switch to the +12v and the +5v on the USB (Red). ![]() 22. All components squezed in! ![]() 23. A top and side view of the USB and RS323 Ports. ![]() ![]() 24. The completed focus controller. ![]() END OF MAIN PROCESS Appendix 1 Before you attempt to write an ASCOM driver I would recommend that you watch Tom How's ASCOM tutorial on youtube Link. 17/06/2014 21:28 Here is the latest source code for the Arduino Nano and the ASCOM driver in VB.NET, as well as the original schematic for the board design. Please feel free to contact me if you have any questions I will help as best I can. Note: With VS2013 Express you will need to tick the 'Register for COM interop' property on the 'compile' tab of the driver project else when you compile the driver it will not register with ASCOM.
This is also the latest PCB design, if you fancy building one email me and i'll send you a printable PDF at 100% and the ExpressPCB file. ![]() Appendix 2 I've added provision on the PCB for a capacitor if i need one, i decided to add one as good measure i added a 43v 1000uf (it was the largest i had). I added it across the +12 and the Ground, this should fill in any voltage drops. I also added a diode on pin 30 for the +12v in for the Arduino as i was finding there was a 3.3v voltage leak. ![]() With the above PCB design i was using all but one of the digital pins and 6 of the analog pins in digital mode and I was beginning to get a few issues. As one of the digital pins in use was pin 0 which is also used buy the Arduino as RX so when keys 7, 8 or 9 were pressed there was a second delay before it was displayed on the LCD. Also when i transmit commands over serial the Aduino reported key 7 has been pressed and 7 was displayed on the LCD. To solve this i had read about using a matrix keypad with 3 pins (+5v, GND and an Anlogue pin). As i have already printed my board which included headers for the LCD display and the Keypad so i decided the best way forward was to print an new PCB to attact to the Keypad header. To help with the build I decided to include the resistor values on the printing. ![]() ![]() ![]() One other problem that arose was that if the focuser was in use before a serial connection was established the Arduino would reset itself when a serial connection was established. To overcome this I had to add a 120 ohm resistor between the +5v and the RST pins. ![]() Note: This mode does however stop the uploading of scripts to the Arduino so I am planning to add a switch to disable it when I need to upload a new script. Appendix 3 - USB Focuser Mk2 Although I managed to get all the features of my Mk1 focuser working in test when I used it in earnest Solar imaging the LCD stopped showing any useful information and with the added fact that I didn't really use the keypad I decided to build a smaller simpler Mk2 version of my focuser. Here is the PCB design and the Arduino code for the new Mk2 and the driver is the same driver as above albeit both have been updated with recent changes. The driver also now includes a small controller app to control the focuser this uses the driver for communication so you can use it for testing, feel free to play with the code that's why i've published it :o)
Again this is not a full how to but a what I did, however if you've read the above 'how-to' you should be able to get the gist. This is the smaller "simpler" Mk2 PCB diagram with the final etched version below it. ![]() ![]() Here I have mounted it in a smaller case from Maplin and mounted then connected the buttons. ![]() As in the article above I soldered two headers directly on to a USB hub, but here i have also soldered on the RS232 and a USB mini for connection to the Arduino. This also dramatically reduces the cable length and saves space in the smaller case. ![]() As before the USB headers are available at the top of the case and here we have the RS232 and RJ45 (for connection to hand controller) along with the 12v power. ![]() ![]() At the bottom is the USB cable for PC connectivity and a FLASH switch. The FLASH switch enables/disables the 120 ohm resistor connected to the +5v and RST pins on the Arduino to stop it resetting on serial connection, when enabled it restricts the flashing of new code to the Arduino to by flicking a switch you can flash the device. ![]() Here is the front of the final build. At the top is 3 LED (power, slew in & slew out), a Halt button to stop the focuser slewing and three position buttons (Park/home, slew 50% and slew 75%). Also on the side of the focus controller is the power switch which switches both 5v USB and 12v power to the device. ![]() As ever if you have any questions or you feel i can offer you some advice please contact me, I'd be happy to oblige. Also for a small fee i would be happy to etch you a PCB or may even be able to provide a partial kit for you to build one yourself. Good luck and have FUN!
|
Blogs Reviews SkyWatcher EQ5 How-to's PCB Etching Projects/Mods EOS DC Power Hartmann Mask Scope Cooler Solar Filter SPC900NC Cooling USB Focus Controller Xbox WebCam Recomended ![]() ![]() ![]() ![]() ![]() ![]() Adverts |
||||||||
![]() |