Search results

  1. C

    Absolute encoder programming

    AllyCat, inglewoodpete thank you for your advices Well, now I've got integers varies between 0 and 360°, I did nothing special just switching the program mode while uploading the program and switching it back to run mode, I also put it in the motor shaft for regulating its rotation. You can find...
  2. C

    Absolute encoder programming

    AllyCat, thank you for your suggetion (I'm wondering what do you mean by easier hardware). Now, using the same program, when I turn the picaxe board back on after being off, and spinning the encoder, I get some values for a few seconds but then it displays zeros as shown below : I did try...
  3. C

    Absolute encoder programming

    Hemi345, thank you for your response. Changing the baud rate and using the program down below : #picaxe 28X2 #terminal 9600 ; Serial rates for UART init: symbol AMT22_NOP = 0x00; SPI commands symbol AMT22_RESET = 0x60 symbol AMT22_ZERO = 0x70 #define NEWLINE...
  4. C

    Absolute encoder programming

    inglewoodpete, AllyCat, thank you for your answers. So, I tried this code to send instructions MOSI and receive data MISO, however the terminal doesn't show anything. You can find the code down below #picaxe 28X2 #terminal 115200 ; Serial rates for UART ; * AMT22 Pin Connections ; * Vdd (5V)...
  5. C

    Absolute encoder programming

    inglewoodpete thank you for your suggestion. Reading Using I2C with PICAXE, I need to consider 3 i2c details : *Slave address *Address size *Bus speed However, I couldn't find Slave address in the sensor's datasheet. I only found the checksum formula, should I use it as a slave address? Also...
  6. C

    Absolute encoder programming

    Technoman, Aries, and PieM, thank you all for your help. Well, I'm not really used to picaxe programming, so I need some enlightenment for how to create a new function in Picaxe Software. Down below you'll find a function that I need to make in picaxe software : uint8_t spiWriteRead(uint8_t...
  7. C

    Absolute encoder programming

    Hello everyone, Currently, I'm trying to program PICAXE-28X2 BASE SHIELD to detect an angular position of the motor using an absolute encoder, you can find below my program that I used. #picaxe 28X2 #terminal 115200 ;symbol Miso = pinC.5; define input switch symbol Sclk = C.0; define output pin...
  8. C

    Controlling stepper motor

    After contacting the Technical Support of MicroE, they informed me that I shouldn't change the Vcc data jumper from 3.3V to 5V as shown in the images down below. So I should have kept the default position of the jumper. And finally, now the stepper motor is spinning using the last shared code...
  9. C

    Controlling stepper motor

    I tried that, it didn't work
  10. C

    Controlling stepper motor

    I used this code to try your suggestion #picaxe 28X2 main: let b0 = 0 ; set b0 value high B.2; ENABLE the driver high B.0; Direction of the spinning FOR b0 = 0 TO 500 high B.5 ; switch on output B.5/ST pause 1 ; wait 0.5 seconds low B.5 ; switch off output B.5 pause 1 ...
  11. C

    Controlling stepper motor

    I tried using PWM signal as shown in the code below init: PWMOUT B.5, 199, 399 ; start pwm high B.2; ENABLE the driver high B.0; Direction of the spinning main: pwmduty B.5, 199 ; set pwm duty pause 500 ; pause 0.5 s pwmduty B.5,50 ; set pwm duty pause...
  12. C

    Controlling stepper motor

    I'm not connecting it to any pin, I think it's an output from the driver, and I don't need it in my program
  13. C

    Controlling stepper motor

    Now I tried to change the motor to another stepper motor 17HS4401 and still doesn't work
  14. C

    Controlling stepper motor

    Yes I swapped them, but nothing has changed
  15. C

    Controlling stepper motor

    Case 1 : I set the RESET pin to low in the program Case 2 I diconnected it from the picaxe board, Case 3 I connected it to GND But nothing works And in all cases the torque potentiometer is in mid way
  16. C

    Controlling stepper motor

    Thank you AllyCat for your reply I did the measurement and I found : DC volage between two coils A&B =0V DC voltage in coil A=0V DC voltage in coil B=0V AC volage between two coils A&B = 51mV but it varies, no actual constant value AC voltage in one coil A =1.2mV AC voltage in one coil B =1.2mV...
  17. C

    Controlling stepper motor

    Yes, I actually have 2 ohms between each.
  18. C

    Controlling stepper motor

    I found out also that the INT/Angle pin takes 5V for two seconds when the ST pin is at 0V and 0V for two seconds when ST pin is at 5V
  19. C

    Controlling stepper motor

    Yes I did supply it with 24V DC. And now I verified the driver click board, and I found that the Vcc 5V pin of the driver wasn't welded correctly. So now even though the driver is on, the motor doesn't work, not with 1/32 step configuration, nor for full step.
  20. C

    Controlling stepper motor

    So I did the measurment of each thread after uploading the program into the board. I found that Enable pin is receiving 5V, ST/Clk pin is receiving also 5V for two seconds and then switched to 0V for two seconds, DIR pin is 0V, RESET/RST pin is 0.1V INT/Angle/MO is 0.03V You can find below the...
Top