2
2
20strannik082020-02-15 19:00:52
Raspberry Pi
20strannik08, 2020-02-15 19:00:52

How to enable hardware PWM for stepper on Raspberry Pi Zero?

The stepper motor (Nema17) is connected to the Raspberry pi Zero via the a4988 driver. I need to apply a certain number of pulses to the pin with a more or less accurate frequency. Programmatically, the raspberry generates pulses unstably. As I understand it, we need a hardware PWM or a semi-hardware one through some DMA, etc. Can you tell me any working solutions for the Raspberry Pi Zero? Preferably with examples and preferably for Python 2.7? Or some library thread working for zero raspberries ...

I need to control the number of pulses, their frequency, depth and pause between them, in general, everything that is necessary for manipulating the stepper.

PS The system costs Raspbian latest version.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2020-02-15
@NeiroNx

Why force the top level controller to do the work of the bottom level?
You have a plant manager, and you force him to lay tiles and swear that he does not lay them evenly.
https://sourceforge.net/p/raspberry-gpio-python/wi...
BCM2835 has a hardware PWM, but it's not clear if it was implemented in the library.
I would still charge atmega / stm32 for this or some kind of smart smart i2c stepper controller

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question