Int numCoils = 0 // store the number of coils on the springįloat pitch = 0. Int sw = 100 // switch delay time 500mSecĬonst int speedSet = A0 // pot input to set the speed of the Spindle MotorĬonst int speedSense = 2 // Spindle Motor speed sensor pin (interrupt)Ĭonst int Sw1 = 3 // SET lngth 1.0 (Length of Spring)Ĭonst int Sw4 = 6 //SET wd(wire diameter)Ĭonst int Sw6 = 8 // SET numCoils(number of coils.EXCLUDING 2 Starter turns each end)Ĭonst int motorPin = 10 // analogWrite pin for motor mosfet.this is Spindle Drive Motorįloat lngth = 0.0 // store length of the spring Int minSpeed = 4 // set minimum motor speed Int newVal = 0 // variable to hold pot value divided by 4 to get correct range for PWM Int potVal = 0 // variable to store the Spindle Motor speed pot value Note that I am aware there is some cleaning up to do. Watch the main spindle which is a dc motor/ gearbox drive with an encoder to give (say) 600 pulses per revolution, compare this to a pre-set pitch and advance a stepper drive on the 1.0mm pitch wire feed screw. Once setup, there is not a lot going on ( latter not yet written). It controls multiple I2C devices with the. So I thought perhaps the i2c and keypad (or indeed existing buttons) arrangement might be a better alternative to this allbeit having to re-write that which works so far. Learn how to expand the I2C bus ports (ESP32, ESP8266 NodeMCU, Arduino) using TCA9458A 1-to-8 I2C Multiplexer. I've seen many instances of using add-on devices through the i2c bus and thought well, why not for the switches. The way I have started to write the program, it seems there will be many button inputs to set the winder parameters and I can already see myself running out of inputs on the Uno at least. So the project is the beginnings of the design for a winder to wind both compression and, once I get over that hurdle, eventually for extension also.Ĭurrently do it by hand which is fine but hands don't always work like they used to and anyhow I would like to expand my learning with Arduino as well. I build miniature 4 stroke engines and obtaining correct size/number of valve springs always seems difficult in Aus at least.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |