McRoth
Member
That's what I have in mind, but without the switch. My problem is modding the code to accept an outside signal instead of a button push. I've been wanting to learn more coding, so maybe this will be my chance, lol.
That looks like the same box I used for my rotary table. I found mine on eBay. This was my first project installing electronics into a box. I was surprised that I got all components to fit. Very pleased with the result. I'm thinking of doing a larger rotary table, thus a larger stepper, thus a larger stepper driver. This driver will not fit the box.
Unfortunately that box was too small for my driver board and even the LCD I got was a bit too wide to fit it. I ended up ordering this one: https://www.amazon.com/dp/B005T58ZTO?ref=ppx_yo2_dt_b_product_details&th=1 . It should arrive today, hopefully it works well.That looks like the same box I used for my rotary table. I found mine on eBay. This was my first project installing electronics into a box. I was surprised that I got all components to fit. Very pleased with the result. I'm thinking of doing a larger rotary table, thus a larger stepper, thus a larger stepper driver. This driver will not fit the box.
These low cost 'Buck' converters (I suspect you're using a buck converter vs. a transformer stepdown converter), can fail with the output switch full on, and that puts the full input into the output, (minus maybe a diode drop). These are very cheap power supplies, and have no protection against overvoltage. Unless you can find an overvoltage protection circuit, you just live with random failures that can result in blowing up low voltage micro processors. I believe the Uno has a 5 volt input, with a 3.3volt power supply on board, that too is a buck converter.Any idea why it would fry a power supply when plugging it into the arduino? I set the output of the converter to 5.05VDC and as soon as you touch the plugs together they spark and fry both! Should I have had a higher voltage, was it trying to pull too many watts at this voltage? I have a 48VDC power supply going into my stepper controller & found a step down converter that would take 50VDC. I have another uno and a 48VDC to usb output coming tomorrow that I'm just going to plug into the USB port on the uno instead of the barrel connector, hoping it works better.
Depending on how the code is set up, the same boolean (true/false) changed by a push button could also be flipped by any sensor writing to the same variable. The MAP function is handy, as you can map any voltage range (potentiometer, proximity sensor, hall effect, etc) and have the software switch trigger when in a desired analog range.That's what I have in mind, but without the switch. My problem is modding the code to accept an outside signal instead of a button push. I've been wanting to learn more coding, so maybe this will be my chance, lol.
Here's the box I'm using.Thanks for the replies! I'm quite sure I had the polarity correct, I'm thinking it was pulling too much power at 5 volts, should've put it at 7 or 8 I'm thinking. They were cheap Amazon buck converters, so I'm not too worried about them. The step down to USB output is working good.
Zeb, thanks for the tip about the code. That does make sense to me.
Here are some progress pics. I have the stepper mounted and luckily I picked a powerful enough one, it turns great! I had the amps on the lowest setting at first and could hear it skipping steps accelerating and decelerating so I put it all the way up and it's good now.
YOUR LINK IS NO LONGER PROPER AND GETS A "OPPS" ERRORThe approach I took on this thread
http://www.homemodelenginemachinist.com/showthread.php?t=25091&page=3
was to accumulate the fractional error and add a step when it was > 1.0 add another step.
Chuck Fellowes followed another approach. For the start of each division, he tracked how far around the circle he was and calculated how far around the circle he would be after the division, take the difference and move that number of steps.
Ultimately the result is identical. The adjustment algorithm depends a bit on the complete methodology you use to do your divisions.
As far as the data structure goes, using int or long will make no difference unless the number of steps moved exceeds the resolution of the data type. When I did this, I wanted to avoid the use of floats and inevitable rounding errors so I measured angles in the number of seconds of a degree using an unsigned long as there are 1,296,000 seconds in a circle. I wrote routines to input and display this value for angles in degrees, minutes and seconds but internally worked with seconds. Then when actually moving the rotary axis, I implemented a trapezoidal acceleration/deceleration algorithm to maximise torque on startup and overshoot at the end of the move. (You can't do instantaneous accelleration to maximum speed due to the laws of physics).
So what on the surface looks like a simple application becomes amazingly complex, particularly if you use interrupt driven step generation.
Libraries are simply programs someone smarter than me has written that our program can reference making everyone’s life a lot easier and you need the 2 attached below. Download the zip files and make sure you know where they are saved.
To install the libraries open the Arduino IDE program and click on “Sketch”, “Include Library” and “Add .ZIP Library”. Navigate to where you saved LiquidCrystal_I2C-master.zip, select it and click “Open”. Do this again and select the Keypad.zip file. You need to close the Arduino IDE and open it again for the libraries to be recognised.
Enter your email address to join: