Hi I am arelative newbie to source projects but have successfully built previously the AstrEQ system for my telescope which is a new intrest of mine.
I am building two arduinoascomfocusers one based on the Aduino Uno with Adafruit l293d Shield and using a 28BY-J48 stepper motor modified/converted to bipolar.
I am building the full version, lcd,temp probe, and push button control, I curenntly have it working witk the v2.62 L293D firmware using the windows application option.
The LCD displays and the stepper motor drives either by inputing a goto setting or moving one of the preset values including the jogging feature within the software, but the jogging with the buttons does not work, I am using windows 10.
The testbutton.ino file does not work it either, I have checked and metered through the circuit to the buttons via varios resistors and this appears the check out showing the correct resistance. I havent fully bottomed out if the half step option is working properly with the stepper motor yes as While is does say he it has changed when you get the steps with the windows proram the display on lcd does not seem to show any chang and I havent noticed and change in how the stepper moves
I do not have the tem probe onto the board as I read somewhere that it would only return a value of of zero and not affect the running of the device.
Being non electrical/electronic I am hoping someone can throw some light on the problem and point me in the right direction as how to check out further the board or advise if there is a problem using an Adafruit shield
The other build I am in the process is a Nano version with the 293D mini shield, this is built and needs testing.
Thanks in anticipation
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
While is does say he it has changed when you get the steps with the windows proram
the display on lcd does not seem to show any chang and I havent noticed and change
in how the stepper moves
Place a cable tie or sticker on the stepper motor. Set the steps to FULL. If it is a NEMA17 200 step stepper motor, it will go 200 steps per revolution (you might have a different one - you need to determine number of steps per full revolution). Then set position so it is 200 more steps and then click GOTO Position, the sticker/cable-tie should show 1 complete revolution, then change mode to half-step and repeat. This time stepper should only go 1/2 revolution.
If no temperature probe should return 20.
Last edit: brownrb 2018-01-15
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Also be sure to set the correct steps in the firmware file
#define stepsPerRevolution 200 // NEMA17 motor Full steps
// you need to change the above line to reflect your stepper motor, examples below
// const int stepsPerRevolution = 2048; // 24BBYJ-48 motor, if half stepping multiply by 2
// const int stepsPerRevolution = 1036; // NEMA17-PG5 motor, if half stepping multiply by 2
// const int stepsPerRevolution = 200; // NEMA17 motor, if half stepping multiply by 2
// const int stepsPerRevolution = 5370; // NEMA17-PG25 motor, if half stepping multiply by 2
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Robert thanks for your quick response, i have checked out your response and this is the result.
Line 51 is set correctly PUSHBUTTONS 1
Line 51 does not define INOUTLED 1
it is
// Backlash is not applied when using HOME POSITION switch
Checked through the program you have on sourceForge for V262 of UNO with L293D driver and the only define I can find relating to LED's is
bledIN A1
gledOUT A2
I have step/Rev for a 28BY-J48 stepper converted to bipolar set to 2048
Regarding the push buttons you recommend I am already using the but one was duff so I have changed it
I have taken off the LCD and another couple of bits to try out the Nano Mini 293 version I am building while I was waiting for some guidance and have bumped a problem with that build trying to get stepper motor to run I think it may be down to
define IN1 3 // Stepper Motor stuff, control pins for L293D Mini driver board
define IN2 4
define IN3 5
define IN4 6
Not sure what this relates to as the pins to the nano are D3,4,5 and 6
and I an not sure if I have seen soewhere that BY28 stepper sequence is 1,3,2,4
and I dont't know if convertinf the motor from unipolar to bipolar affects any of this,
or maybe I have a duff l293 mini driver
Hoping you can advise
Regards
Charles Clark
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Focuserv263_L293D not version 262
Download the 263 zip file for the firmware. Having the leds working helps to troubleshoot.
define IN1 3 // Stepper Motor stuff, control pins for L293D Mini driver board
define IN2 4
define IN3 5
define IN4 6
relates to the connections between the driver board and the nano, not the stepper sequence.
I have never tried the BY28 in bipolar mode and never tried it with a L293DMini driver board.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Robert,
I have upgraded my Uno build focuser with th lines in you suggested, everything works great with the windows application movement, leds, buzzer, jogging ang goto etc. jogging sometimes stops on if you give it a quick press but seems fine if you hold the mouse down a bit longer. Manual pushbuttons however still do not work, I am using the type of button you recommend and they definetely close when pushed but the led's do no light and the motor does not move. I have tried the TestPB program and they do not work in here either. Would you be able to give me some idea of what else to test and how. I have attached a copy of the ino file I am using.
On the nano build L293 Mini progran the converted BY28 bipolar still does not work so the board is going back to the supplier, I have tried it with another BY28 Unipolar to his settings and it still does not work. I have attached a copy of the photo from his web site showing connections, I would be grayeful if you could have a look at it an let me know your thoughts, I have tried connecting the stepper to the green connectors, and then tried the header pins with the unipolar, neither works.
Yet Stepper is OK on the UNO build,
Sods law the LEds light up with manual pushbutton on this version but the motor does not move.
run the attached program
Then open up serial monitor in Arduino IDE
Press a button
Does the screen messages change
Press the other button
Does the screen messages change
Press both buttons
Does the screen messages change
If you have a multimeter you can check the voltage on pin A0 (analog pin 0) of the Arduino chip.
This voltage should change when a button is pressed.
What is the value of resistor R10? It should be 1M. Try removing R10 and see if that makes a difference (it might be the wrong value).
jogging sometimes stops on if you give it a quick press but seems fine if you hold the mouse down a bit longer
Yes, this is an issue with windows and the slider control.
Manual pushbuttons however still do not work
See above post
On the nano build L293 Mini progran the converted BY28 bipolar still does not work
Yes, it will not work at all. The stepper code within L293DMini is not suited to drive a BY type motor, only a NEMA type motor. The sequence changes and driving is completely different. You will need to use a NEMA motor.
The only versions that support driving a BY type motor are the UNO with motor sheild build, and the ULN2003 builds.
Regards
Robert
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Robert thanks for getting back to me,
On the UNO
Continuity check between AO and ground with the following is
No buttons pressed 0.992 M Ohms
Button 1 Pressed 1.18 k Ohms
Button 2 Pressed 2.376 k Ohms
Both buttons pressed 1.18 kOhm
Voltage at A0 is
No Buttons pressed 4.83v
Button 1 Pressed 0.307v
Button 2 Pressed 0.159v
Both Pressed 0.307v
Running test program the following Occurs
No buttons pressed Raw switched value 975 this scrolls up the screen and varies from 975 to 973
Button2 pressed Raw switched value 70 to 69 this scrolls up the screen and changes back to 975 when released
Button1 pressed Raw switched value 41 to 43 this scrolls up the screen and changes back to 975 when released
Both buttons pressed Raw switched value 41 to 40 this scrolls up the screen and changes back to 975 when released
Nano Problem
I wrongly assumed all steppers were the same, A little bit knowledge is a dangerous thing. I will have to look for a Nema motor with a stepper drive. Hope fully a Nema 14 to keep the cost down which may need belt and pullies to Keep in CFZ,
Quick question is theNano board I have built for the 293 Mini compatible with a DRV8825 driver, I was also going to look at including Bluetooth with this one, but I don't want to open up another can of worms
Regards
Charles Clark
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No buttons pressed Raw switched value 975 this scrolls up the screen and varies from 975 to 973
Button2 pressed Raw switched value 70 to 69 this scrolls up the screen and changes back to 975 when released
Button1 pressed Raw switched value 41 to 43 this scrolls up the screen and changes back to 975 when released
Both buttons pressed Raw switched value 41 to 40 this scrolls up the screen and changes back to 975 when released
What you should have is
SW1 681
SW2 338
SW1+SW2 509
Your values indicate that R1/R2/R3 are NOT the correct values of 1.2K
R4 is not 1M as No buttons should be close to 1023 - if lower it indicates R4 is wrong value.
See this in the PDF
APPENDIX C DERIVING VALUE RANGES FOR THE TOGGLE SWITCHES ON A0
Last edit: brownrb 2018-01-20
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Robert sorryto be a pain I have checked the resistors and they are 0.989Mohms and
1.183k ohms however I used 0.5 watt resistors not 0.25 watt I will take them off
the board an replace them with 0.25watt ones. Is the 1M ohm resistor 0.25 watt as well or is 0.5 watt ok
Thanks
Regards
Charles Clark
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Charles
yes.
The values you are reading indicates there is an issue.
Button 1 pressed and both buttons pressed - you are getting the same value - this cannot be so unless the wiring is Wrong or the resistor values is wrong.
If you have measured the vresistor alues and they are fine the the wiring is definately wrong.
Cheers
Robert
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Robert, just a quick line to thank you for a great project and your help in ironing out the problem with manual pushbuttons.
I have changed the 1.2k resistors plus the 1M ohm resistor to 0.25 watt instead of the 0.5 ones I had fitted, on removing theses part of the stripboard on R7 lifted off the board so it must have been cracked. A bit of repair work and everything works fine. So thanks for a great project, and your patience in helping me out.
On the Nano build I have decided to start again and abandon the L293 mini board and buils a DRV8825 version which will be more future proof.
I have decided to use a nema 14 stepper with belt drive on my Skywatcher 200p refractor.
once again many thanks.
Regards
Charles Clark
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi I am arelative newbie to source projects but have successfully built previously the AstrEQ system for my telescope which is a new intrest of mine.
I am building two arduinoascomfocusers one based on the Aduino Uno with Adafruit l293d Shield and using a 28BY-J48 stepper motor modified/converted to bipolar.
I am building the full version, lcd,temp probe, and push button control, I curenntly have it working witk the v2.62 L293D firmware using the windows application option.
The LCD displays and the stepper motor drives either by inputing a goto setting or moving one of the preset values including the jogging feature within the software, but the jogging with the buttons does not work, I am using windows 10.
The testbutton.ino file does not work it either, I have checked and metered through the circuit to the buttons via varios resistors and this appears the check out showing the correct resistance. I havent fully bottomed out if the half step option is working properly with the stepper motor yes as While is does say he it has changed when you get the steps with the windows proram the display on lcd does not seem to show any chang and I havent noticed and change in how the stepper moves
I do not have the tem probe onto the board as I read somewhere that it would only return a value of of zero and not affect the running of the device.
Being non electrical/electronic I am hoping someone can throw some light on the problem and point me in the right direction as how to check out further the board or advise if there is a problem using an Adafruit shield
The other build I am in the process is a Nano version with the 293D mini shield, this is built and needs testing.
Thanks in anticipation
Ok, so please use Focuserv263_L293D
In the INO file, make sure that the line 39 is changed to that below
#define PUSHBUTTONS 1
Make sure the define for the LEDS is also like below (line 51)
#define INOUTLEDS 1
then reprogram the controller.
When a push-button is pressed, one of the LED should light up. When the other push button is pressed, the other LED should light up.
But you need to use GOOD quality switches like these.
https://www.ebay.com/itm/6Pcs-Mini-12mm-Waterproof-Momentary-ON-OFF-Push-Button-Round-Switch/201538126654
These switches are NOT GOOD. These small ones do not work very well.
https://www.ebay.com/itm/Mini-Momentary-Push-Button-Switch-for-Model-Railway-Hobby-7mm-Pack-of-10-Red/172709382653
Place a cable tie or sticker on the stepper motor. Set the steps to FULL. If it is a NEMA17 200 step stepper motor, it will go 200 steps per revolution (you might have a different one - you need to determine number of steps per full revolution). Then set position so it is 200 more steps and then click GOTO Position, the sticker/cable-tie should show 1 complete revolution, then change mode to half-step and repeat. This time stepper should only go 1/2 revolution.
If no temperature probe should return 20.
Last edit: brownrb 2018-01-15
Also be sure to set the correct steps in the firmware file
#define stepsPerRevolution 200 // NEMA17 motor Full steps
// you need to change the above line to reflect your stepper motor, examples below
// const int stepsPerRevolution = 2048; // 24BBYJ-48 motor, if half stepping multiply by 2
// const int stepsPerRevolution = 1036; // NEMA17-PG5 motor, if half stepping multiply by 2
// const int stepsPerRevolution = 200; // NEMA17 motor, if half stepping multiply by 2
// const int stepsPerRevolution = 5370; // NEMA17-PG25 motor, if half stepping multiply by 2
Hi Robert thanks for your quick response, i have checked out your response and this is the result.
Line 51 is set correctly PUSHBUTTONS 1
Line 51 does not define INOUTLED 1
it is
// Backlash is not applied when using HOME POSITION switch
Checked through the program you have on sourceForge for V262 of UNO with L293D driver and the only define I can find relating to LED's is
bledIN A1
gledOUT A2
I have step/Rev for a 28BY-J48 stepper converted to bipolar set to 2048
Regarding the push buttons you recommend I am already using the but one was duff so I have changed it
I have taken off the LCD and another couple of bits to try out the Nano Mini 293 version I am building while I was waiting for some guidance and have bumped a problem with that build trying to get stepper motor to run I think it may be down to
define IN1 3 // Stepper Motor stuff, control pins for L293D Mini driver board
define IN2 4
define IN3 5
define IN4 6
Not sure what this relates to as the pins to the nano are D3,4,5 and 6
and I an not sure if I have seen soewhere that BY28 stepper sequence is 1,3,2,4
and I dont't know if convertinf the motor from unipolar to bipolar affects any of this,
or maybe I have a duff l293 mini driver
Hoping you can advise
Regards
Charles Clark
Focuserv263_L293D not version 262
Download the 263 zip file for the firmware. Having the leds working helps to troubleshoot.
define IN1 3 // Stepper Motor stuff, control pins for L293D Mini driver board
define IN2 4
define IN3 5
define IN4 6
relates to the connections between the driver board and the nano, not the stepper sequence.
I have never tried the BY28 in bipolar mode and never tried it with a L293DMini driver board.
Hi Robert,
I have upgraded my Uno build focuser with th lines in you suggested, everything works great with the windows application movement, leds, buzzer, jogging ang goto etc. jogging sometimes stops on if you give it a quick press but seems fine if you hold the mouse down a bit longer. Manual pushbuttons however still do not work, I am using the type of button you recommend and they definetely close when pushed but the led's do no light and the motor does not move. I have tried the TestPB program and they do not work in here either. Would you be able to give me some idea of what else to test and how. I have attached a copy of the ino file I am using.
On the nano build L293 Mini progran the converted BY28 bipolar still does not work so the board is going back to the supplier, I have tried it with another BY28 Unipolar to his settings and it still does not work. I have attached a copy of the photo from his web site showing connections, I would be grayeful if you could have a look at it an let me know your thoughts, I have tried connecting the stepper to the green connectors, and then tried the header pins with the unipolar, neither works.
Yet Stepper is OK on the UNO build,
Sods law the LEds light up with manual pushbutton on this version but the motor does not move.
Regards
Charles Clark
run the attached program
Then open up serial monitor in Arduino IDE
Press a button
Does the screen messages change
Press the other button
Does the screen messages change
Press both buttons
Does the screen messages change
If you have a multimeter you can check the voltage on pin A0 (analog pin 0) of the Arduino chip.
This voltage should change when a button is pressed.
What is the value of resistor R10? It should be 1M. Try removing R10 and see if that makes a difference (it might be the wrong value).
The only versions that support driving a BY type motor are the UNO with motor sheild build, and the ULN2003 builds.
Regards
Robert
Hi Robert thanks for getting back to me,
On the UNO
Continuity check between AO and ground with the following is
No buttons pressed 0.992 M Ohms
Button 1 Pressed 1.18 k Ohms
Button 2 Pressed 2.376 k Ohms
Both buttons pressed 1.18 kOhm
Voltage at A0 is
No Buttons pressed 4.83v
Button 1 Pressed 0.307v
Button 2 Pressed 0.159v
Both Pressed 0.307v
Running test program the following Occurs
No buttons pressed Raw switched value 975 this scrolls up the screen and varies from 975 to 973
Button2 pressed Raw switched value 70 to 69 this scrolls up the screen and changes back to 975 when released
Button1 pressed Raw switched value 41 to 43 this scrolls up the screen and changes back to 975 when released
Both buttons pressed Raw switched value 41 to 40 this scrolls up the screen and changes back to 975 when released
Nano Problem
I wrongly assumed all steppers were the same, A little bit knowledge is a dangerous thing. I will have to look for a Nema motor with a stepper drive. Hope fully a Nema 14 to keep the cost down which may need belt and pullies to Keep in CFZ,
Quick question is theNano board I have built for the 293 Mini compatible with a DRV8825 driver, I was also going to look at including Bluetooth with this one, but I don't want to open up another can of worms
Regards
Charles Clark
No buttons pressed Raw switched value 975 this scrolls up the screen and varies from 975 to 973
Button2 pressed Raw switched value 70 to 69 this scrolls up the screen and changes back to 975 when released
Button1 pressed Raw switched value 41 to 43 this scrolls up the screen and changes back to 975 when released
Both buttons pressed Raw switched value 41 to 40 this scrolls up the screen and changes back to 975 when released
What you should have is
SW1 681
SW2 338
SW1+SW2 509
Your values indicate that R1/R2/R3 are NOT the correct values of 1.2K
R4 is not 1M as No buttons should be close to 1023 - if lower it indicates R4 is wrong value.
See this in the PDF
APPENDIX C DERIVING VALUE RANGES FOR THE TOGGLE SWITCHES ON A0
Last edit: brownrb 2018-01-20
Hi Robert sorryto be a pain I have checked the resistors and they are 0.989Mohms and
1.183k ohms however I used 0.5 watt resistors not 0.25 watt I will take them off
the board an replace them with 0.25watt ones. Is the 1M ohm resistor 0.25 watt as well or is 0.5 watt ok
Thanks
Regards
Charles Clark
Hi Charles
yes.
The values you are reading indicates there is an issue.
Button 1 pressed and both buttons pressed - you are getting the same value - this cannot be so unless the wiring is Wrong or the resistor values is wrong.
If you have measured the vresistor alues and they are fine the the wiring is definately wrong.
Cheers
Robert
Hi Robert, just a quick line to thank you for a great project and your help in ironing out the problem with manual pushbuttons.
I have changed the 1.2k resistors plus the 1M ohm resistor to 0.25 watt instead of the 0.5 ones I had fitted, on removing theses part of the stripboard on R7 lifted off the board so it must have been cracked. A bit of repair work and everything works fine. So thanks for a great project, and your patience in helping me out.
On the Nano build I have decided to start again and abandon the L293 mini board and buils a DRV8825 version which will be more future proof.
I have decided to use a nema 14 stepper with belt drive on my Skywatcher 200p refractor.
once again many thanks.
Regards
Charles Clark