I am building the Arduino ASCOM Focuser Pro2 DIY and have run into a couple of challenges.
The schematic doesn't match the PCB in the area of the connections from the Arduino to the DRV8825 stepper controller and to the stepper.
On the schematic, it shows VMOT (Pin 1) going to D8 (J1.11) on the Arduino. That's supposed to be the power for the stepper controller, not a data line. That was the first clue. 2A, 2B are also going to pins on the Arduino. Those are the outputs of the DRV8825 to the stepper motor. Step and Dir (pins 9,10) are going to VCC. They should be going to pins on the Arduino.
Checking the pinouts, it appears that the PCB is correct and the schematic has the errors.
My DRV8825 doesn't seem to have the 1A, 1B, 2A, 2B pins in the same order. I imagine they just got the silkscreen labels wrong since otherwise the board looks identical to the ones in your document and others on the web. Here is a link to the one I got. The picture is a little small but you should be able to make out the output pins.
http://www.amazon.com/gp/product/B00W8UF4VU?psc=1&redirect=true&ref_=oh_aui_detailpage_o04_s00
| |
| | | | | | | |
| Amazon.com: uxcell® Geeetech DRV8825 StepStick Stepp...Descriptions:The DRV8825 stepper motor driver carrier is a breakout board for TI DRV8825 microstepping bipolar stepper motor driver. The module has a pinout an... |
| |
| View on www.amazon.com | Preview by Yahoo |
| |
| |
Also, it came with a heat sink, just not attached. I assume a little heat sink compound and it will be ok and stay put.
I am building the full board but at this time, am only desiring to have the Blue Tooth option as the USB ports on the laptop are full and it would be nice to not have another wire going to the scope. I might add some other options later. It's not clear which Arduino code I should use since the only one that has BT in it's title is DRV8825_M_BT which leads me to believe that it is the Minimal and not the F or Full version. None of the F or Full ones list the BT capability. So, which one should I use?
At this time, I am not using the push buttons but reading the text, it seems that I should still have R8, the 1M resistor in place. Is that correct?
I really appreciate that you have taken the time to provide us with this project and all your effort.
Ken
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Ken
The schematic doesn't match the PCB
Can you please send me the link to the schematic you are referring to as there are a lot on the site and it will help me narrow things down
My DRV8825 doesn't seem to have the 1A, 1B, 2A, 2B
I couldnt make out the pins, if they are not the same then you will have to make whatever changes are needed. Yes to the heatsink compund (1 used 3M heat tape, doublesided)
only one that has BT in it's title is DRV8825_M_BT
Yes, that is correct, I just did not get round to doing that as the focus lately is the wifi module
To make a BT version. I need to know the exact hardware circuit you are using (as some have crossed pins etc). For the drv8825 there is the original drv8825 and then the drv8825_hw203 version. Which is the one you are using?
as for the 1M resistor, must have. If no push buttons attached, need to comment out the push button code in the loop() part of the code
Cheers
Robert
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I took your advice and am trying to build the recommended Nano+DRV8825 driver board (HW203) also listed as DRV8825_HW203_F_IR_BT_REV2 SCHEMATIC AND BOARD.
I have the Nema17-PG27 also as recommended.
I am using the files from this directory:
Eagle PCB for DRV8825-HW203 which includes these files:
myFocuserAllRev2_F_IR_BT.jpg
myFocuserBT_Connection-Rev2.png
myFocuserComponentSide-Rev2.png
myFocuserSchematic-Rev2.png
myFocuserSolderSide-Rev2a.bmp
You can see the pins in the photo. I appear to have the pins you require and additionally, an En (I assume enable) and a State pin.
I have a background in electronics and computer repair but have never played with the Arduino so I'll have to see when I get to the step of looking at the code and commenting out the switches.
Thanks,
Ken
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Played with the focuser late last night and again today and after much work, I got it working complete with blue tooth! Now for putting it in a box and mouting the motor. That's going to take a bit of thought.
Found a problem in the code for the DRV8825_M_BT.ino. When I got the motor working, it seemed that it was only going half way around when I gave it the number of steps to do one revolution. I checked the micro-stepping section of the code and found it didn't match the pins for the stepper controller. Should have worked anyway since they should have all been 0s, but putting them to match the pins got it going correctly.
Also, I noticed the 9.1v zener was running quite hot. I replaced the 15 ohm resister with a 30 ohm and it's much better. Since I'm only running the Arduino and the Blue Tooth, it should be plenty of current.
I'm also starting to work on your SQM. Have most of the parts and starting to work on mounting them in the case. Looks like it's going to take a while for the IR/UV filter to get here but I can test it with one of the 1.25 filters I use with my camera.
I noticed in another post that you were talking about not adding any more options. I have one that I think would be useful. The computer control is great when I am close to focus but it would be nice to manually get it there. Since we shouldn't disconnect the motor, I thought perhaps a joystick might work. Just use one axis of it. When the joystick is centered, it doesn't do anything and of course, as you move one way or the other you have a variable speed. I wouldn't at thie point know how to write the code. I could figure out how to read the value from the joystick but to have it control your stepping routines, I'll have to look and study since I'm not a programmer.
I'm looking at this joystick. It's a thumb one so pretty small. Just run a wire up to the focuser box.
Hi Ken,
I mainly had in mind remote operation when I started this, and added the push buttons for manual control as well as the rotary encoder.
I am thick in the middle of the wifi option, I like the idea of a joystick and i'll have a look once I get done with the wifi project. Perhaps we can work on that together.
Cheers
Robert
PS I have since discovered as part of the wifi project that the BT code can be significantly improved, so I'll probably do that as well at some stage.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In times past I have always had a dislike for "digital" focusers. Ones that have an up/down and speed button. Too easy to overshoot and hard to find the sweet spot without playing with the speed button all the time.
I invented an analog one using two airplane servos. I ripped the guts out and just wired the motors together. When you turn one, the gearbox speeds it up and drives the motor which in this case is actually being a generator since it's a permenant magnet DC motor. The generated voltage then goes to the other servo which is a motor, geared down and then turns the focuser. That way I could turn the focuser without touching the telescope and it felt like I was using a focuser. Much better than all those buttons.
I think the joystick will work as well. The rotary encoder sounds good but with only 40 steps, I don't know that it would give the speed one needs. If it was driven by one of the servos as I did, it might. Otherwise your back to having to use a speed setting. So, I am curious to see if the joystick will feel sufficiently analog/human.
Having given it some thought and peeking at what others are doing a little bit (more of that to do), it seems that it should be almost trivial if I understand your code. Sounds like some folks do some buffering/averaging of the joystick values to smooth them out.
Here is Ken's brand of psuedocode:
Define the deadband for when the stick isn't being touched with a little margin.
Define the speed delay range.
Read the joystick.
If it's in the deadband, do nothing.
Else If it's above the deadband, Map (nice to see that command there!) the joystick value to the speed delay range.
Set TargetLocation to TargetLocation++
Else If it's below the deadband, Map the joystick value in reverse to the speed delay range.
Set TargetLocation to TargetLocation--
When the main loop runs, it should step accordingly with the appropriate delay for the desired speed.
The info on the Map command if you aren't familiar:
I am building the Arduino ASCOM Focuser Pro2 DIY and have run into a couple of challenges.
On the schematic, it shows VMOT (Pin 1) going to D8 (J1.11) on the Arduino. That's supposed to be the power for the stepper controller, not a data line. That was the first clue. 2A, 2B are also going to pins on the Arduino. Those are the outputs of the DRV8825 to the stepper motor. Step and Dir (pins 9,10) are going to VCC. They should be going to pins on the Arduino.
Checking the pinouts, it appears that the PCB is correct and the schematic has the errors.
http://www.amazon.com/gp/product/B00W8UF4VU?psc=1&redirect=true&ref_=oh_aui_detailpage_o04_s00
| |
| | | | | | | |
| Amazon.com: uxcell® Geeetech DRV8825 StepStick Stepp...Descriptions:The DRV8825 stepper motor driver carrier is a breakout board for TI DRV8825 microstepping bipolar stepper motor driver. The module has a pinout an... |
| |
| View on www.amazon.com | Preview by Yahoo |
| |
| |
Also, it came with a heat sink, just not attached. I assume a little heat sink compound and it will be ok and stay put.
I really appreciate that you have taken the time to provide us with this project and all your effort.
Ken
Hi Ken
The schematic doesn't match the PCB
Can you please send me the link to the schematic you are referring to as there are a lot on the site and it will help me narrow things down
My DRV8825 doesn't seem to have the 1A, 1B, 2A, 2B
I couldnt make out the pins, if they are not the same then you will have to make whatever changes are needed. Yes to the heatsink compund (1 used 3M heat tape, doublesided)
only one that has BT in it's title is DRV8825_M_BT
Yes, that is correct, I just did not get round to doing that as the focus lately is the wifi module
To make a BT version. I need to know the exact hardware circuit you are using (as some have crossed pins etc). For the drv8825 there is the original drv8825 and then the drv8825_hw203 version. Which is the one you are using?
as for the 1M resistor, must have. If no push buttons attached, need to comment out the push button code in the loop() part of the code
Cheers
Robert
Hi Robert,
Yes, I should have mentioned what variation.
I took your advice and am trying to build the recommended Nano+DRV8825 driver board (HW203) also listed as DRV8825_HW203_F_IR_BT_REV2 SCHEMATIC AND BOARD.
I have the Nema17-PG27 also as recommended.
I am using the files from this directory:
Eagle PCB for DRV8825-HW203 which includes these files:
myFocuserAllRev2_F_IR_BT.jpg
myFocuserBT_Connection-Rev2.png
myFocuserComponentSide-Rev2.png
myFocuserSchematic-Rev2.png
myFocuserSolderSide-Rev2a.bmp
So the link to the specific schematic is:
https://sourceforge.net/projects/arduinoascomfocuserpro2diy/files/Eagle%20PCB%20for%20DRV8825_HW203/myFocuserSchematic-Rev2.png/download
For the stepper, I'll have to play with a scope to see what the phases are up to.
Do you have a link to the 3M thermal tape perhaps?
I am using the Blue Tooth mentioned in the myFocuserPro2.pdf as the HC05.
http://www.amazon.com/gp/product/B00L083QAC?psc=1&redirect=true&ref_=oh_aui_detailpage_o04_s00
You can see the pins in the photo. I appear to have the pins you require and additionally, an En (I assume enable) and a State pin.
I have a background in electronics and computer repair but have never played with the Arduino so I'll have to see when I get to the step of looking at the code and commenting out the switches.
Thanks,
Ken
Hi Ken
1. Re the schematic - I could not find the right part in Eagle only one but it had issues. Unfortunately the pins on that part were all wrong, so the signal lines are in the wrong place. However, when transferred to a board layout it is good. I just have not got round to fixing the schematic
2. The 3M tape
3. http://www.ebay.com/itm/3M-Thermal-Adhesive-Tape-for-Heatsink-100x100mm-Square-/261685408047?hash=item3cedaa712f:g:RgcAAOSw9r1WDVmB
4. http://www.ebay.com/itm/3M-Double-sided-Thermal-Adhesive-Tape-for-LED-CPU-GPU-Heatsink-100mm-200mm-/181196406643?hash=item2a3025bf73:g:RdYAAOSwxCxT4urc
5. I never used the EN and State pin just connected RX,TX, GND, VCC (5V) and used 100ohm resistor in RXD and RXD lines (recommend though a bi-directional level shifter)
Robert,
Played with the focuser late last night and again today and after much work, I got it working complete with blue tooth! Now for putting it in a box and mouting the motor. That's going to take a bit of thought.
Found a problem in the code for the DRV8825_M_BT.ino. When I got the motor working, it seemed that it was only going half way around when I gave it the number of steps to do one revolution. I checked the micro-stepping section of the code and found it didn't match the pins for the stepper controller. Should have worked anyway since they should have all been 0s, but putting them to match the pins got it going correctly.
Also, I noticed the 9.1v zener was running quite hot. I replaced the 15 ohm resister with a 30 ohm and it's much better. Since I'm only running the Arduino and the Blue Tooth, it should be plenty of current.
I'm also starting to work on your SQM. Have most of the parts and starting to work on mounting them in the case. Looks like it's going to take a while for the IR/UV filter to get here but I can test it with one of the 1.25 filters I use with my camera.
I noticed in another post that you were talking about not adding any more options. I have one that I think would be useful. The computer control is great when I am close to focus but it would be nice to manually get it there. Since we shouldn't disconnect the motor, I thought perhaps a joystick might work. Just use one axis of it. When the joystick is centered, it doesn't do anything and of course, as you move one way or the other you have a variable speed. I wouldn't at thie point know how to write the code. I could figure out how to read the value from the joystick but to have it control your stepping routines, I'll have to look and study since I'm not a programmer.
I'm looking at this joystick. It's a thumb one so pretty small. Just run a wire up to the focuser box.
http://www.amazon.com/KY-023-Joystick-Module-Official-Arduino/dp/B00QSXWSHG/ref=sr_1_cc_1?s=aps&ie=UTF8&qid=1458015989&sr=1-1-catcorr&keywords=analog+1+axis++joystick
Anyway,
Thanks again!
Ken
Hi Ken,
I mainly had in mind remote operation when I started this, and added the push buttons for manual control as well as the rotary encoder.
I am thick in the middle of the wifi option, I like the idea of a joystick and i'll have a look once I get done with the wifi project. Perhaps we can work on that together.
Cheers
Robert
PS I have since discovered as part of the wifi project that the BT code can be significantly improved, so I'll probably do that as well at some stage.
Hi Robert,
In times past I have always had a dislike for "digital" focusers. Ones that have an up/down and speed button. Too easy to overshoot and hard to find the sweet spot without playing with the speed button all the time.
I invented an analog one using two airplane servos. I ripped the guts out and just wired the motors together. When you turn one, the gearbox speeds it up and drives the motor which in this case is actually being a generator since it's a permenant magnet DC motor. The generated voltage then goes to the other servo which is a motor, geared down and then turns the focuser. That way I could turn the focuser without touching the telescope and it felt like I was using a focuser. Much better than all those buttons.
I think the joystick will work as well. The rotary encoder sounds good but with only 40 steps, I don't know that it would give the speed one needs. If it was driven by one of the servos as I did, it might. Otherwise your back to having to use a speed setting. So, I am curious to see if the joystick will feel sufficiently analog/human.
Having given it some thought and peeking at what others are doing a little bit (more of that to do), it seems that it should be almost trivial if I understand your code. Sounds like some folks do some buffering/averaging of the joystick values to smooth them out.
Here is Ken's brand of psuedocode:
Define the deadband for when the stick isn't being touched with a little margin.
Define the speed delay range.
Read the joystick.
If it's in the deadband, do nothing.
Else If it's above the deadband, Map (nice to see that command there!) the joystick value to the speed delay range.
Set TargetLocation to TargetLocation++
Else If it's below the deadband, Map the joystick value in reverse to the speed delay range.
Set TargetLocation to TargetLocation--
When the main loop runs, it should step accordingly with the appropriate delay for the desired speed.
The info on the Map command if you aren't familiar:
https://www.arduino.cc/en/Reference/Map
What is the pos variable?
Ken
What is the pos variable?
Not sure I follow
Please email me offline brown_rb at yahoo