Gene, Read the first page of the data sheet. It says near the end of the first page...
*The speed of the motor can be controlled in all possible conditions by the > PWM up to kHz. In all cases, a low level state on the PWM pin will turn off > both the LSA and LSB switches. When PWM rises to a high level, LSA or LSB > turn on again depending on the input pin state.* What they are saying is that PWM acts like a master switch and when low it opens-circuits the entire h-bridge. When PWM is high then whatever switches are turned on by INA and INB are as you'd expect. (Yes, they dropped the number of khz, a typo in the data sheet.) I've got a pile of these chips and this is exactly how they work PWM controls the current in the motor and is effective speed control. At about 10% PWM the motor starts to overcome its internal friction and starts to move at 100% the motor turns as if connected directly to a battery. An experiment you can try is to drive the VNH3 chip and some random motor you have using the same Arduino sketch linked fromPolulu's web site. The sample ramps up and down the motor speed and reverse the direction and just keeps doing that. Actually there is no reason to wire it up. Just read the Code. Or just trust that my pseudo-code below accurately describes the Arduino sketch # Ramp up the motor speed for j in range 0,,,400 { output (PWM-pin, j) delay(10 milliseconds) } The above is pretty much out of Polu's example code and make a motor spin slow then fast. If you have never used one of these h-bridge driver chips then get to know it outside of LCNC. Try rubberbanding a pencil to the motor shaft and try and make it move like a windshield wiper blade using first principles, not connected to LCNC. Just count encoder ticks and change directions. A few GPIO pins on a Raspberry Pi or an Arduino and some wire is enough DOn't workyabout the switching speed to reverse the motor. ANy real motor will have momentum and this will be the limiting factor On Sun, Oct 18, 2020 at 9:54 AM Gene Heskett <ghesk...@shentel.net> wrote: > On Thursday 15 October 2020 12:55:16 Chris Albertson wrote: > > > Gene just Google the part number "VNH3SP30". Polulu has them. It is > > in fact my "go to" driver. These were developed for automotive use > > for things like driver seat adjustment motors. > > > > Polulu's version of this has reverse voltage protection but they > > seriously de-rate the chip. Just read the datasheet that is linked > > from their site. > > > I have the STM docs printout on that chip under my left elbow. 2 things I > note from that. > > 1. direction changes are slow. No consequences when driven by the human > hand running a joystick on the side of the seat, but important for > computer control. > > 2. No evidence from the waveforms shown that the pwm is used for anything > but a logic clock. At no point in the waveforms shown starting on page > 13, is there any evidence of the pwm actually modulating the outA or > outB voltage in time with the input pwm. This is designed as an on/off > control only, and low standby current consumption in the very low > microamps was the prime specification driver. The boards I have ordered, > unless they are doing something that STM does not know or show, are not > capable of pwm driven analog control. > > So while I may hook it up, I can't see it as working as a servo because > its un-modulated by the pwm input. Which is why I also have a pair of > 150 watt rated class-D audio amps ordered. For a similar price. They are > rated only for 27 volts. Higher voltage and wattages priced accordingly. > I'll turn that 24 volts down as low as it can go, and smoke test it. I > also have some A-D 48 volters that will turn down to 42.5 that might be > usable with the 400 watt versions. Over current foldbacks on those not > tested, but they sure run a 3 phase, 2 or 3NM rated stepper very nicely > on the Sheldon lathe. Both sweet and silent compared to regular > steppers. > > > Here is the way I used these... > > I buy a slightly different version of the chip that comes on an > > "Arduio Sheild" ebay link > > <https://www.ebay.com/i/401089386943?chn=ps&norover=1&mkevt=1&mkrid=71 > >1-117182-37290-0&mkcid=2&itemid=401089386943&targetid=934793863816&devi > >ce=c&mktype=pla&googleloc=9031026&poi=&campaignid=10877149888&mkgroupid > >=107912403075&rlsatarget=aud-622524042918:pla-934793863816&abcId=930040 > >0&merchantid=101638797&gclid=CjwKCAjw5p_8BRBUEiwAPpJO6-QTPa9wyIxLjU-wVv > >6qq8PaY8DUPaxrZw7TRhXg8XKzfNEiapIrIhoCidAQAvD_BwE> Then I buy a Nucleo > > board from STM www.digikey.com/...NUCLEO-F401RE > > <https://www.digikey.com/en/products/detail/stmicroelectronics/NUCLEO- > >F401RE/4695525?WT.mc_id=frommaker.io> These mate together with a bunch > > of 0.1" header pins. > > > > With some software in the STM32 I now have a USB connected dual motor > > driver that can handle up to about 20 amps peak and 12 A continuously > > The control PID loops run on the STM32 and I only have to send speed > > or position commands over the USB cable. It would be about as easy to > > assemble an Ethernet or SPI connected motor controller from these same > > parts. The stack-up is a little bulky but it is so easy to do and > > cheap I can put up with the excess cubic volume. > > > > On Thu, Oct 15, 2020 at 9:12 AM Gene Heskett <ghesk...@shentel.net> > wrote: > > > On Thursday 15 October 2020 08:32:07 Roland Jollivet wrote: > > > > Maybe this is good for you, if available locally; > > > > > > > > https://www.olimex.com/Products/Robot-CNC-Parts/MotorDrivers/BB-VN > > > >H3SP 30/open-source-hardware > > > > > > I give up, none of the 3 USA distributors are carrying that item. > > > > > > > On Wed, 14 Oct 2020 at 22:42, Gene Heskett <ghesk...@shentel.net> > > > > > > wrote: > > > > > After it finally was delivered, testing looks good but now I > > > > > need a controller, smaller and lower voltage than one of Jons > > > > > pwm-servo's. > > > > > > > > > > This motor supposedly turns 220 rpms no load with 24 volts > > > > > applied. > > > > > > > > > > It has an encoder on the rear which is making a 5.4khz > > > > > quadrature signal when its running free, out of 4 wires, no > > > > > index which is fine as I'll put a switch on the BS-1 for a > > > > > home/index anyway. > > > > > > > > > > This motor draws 4 amps at max rated 100 watt input. > > > > > No clue what the LRA amps is but it does jump pretty good > > > > > getting started so I'd expect startup in-rush to be at least 10 > > > > > amps. > > > > > > > > > > I'd like to control its position like a common rotary servo > > > > > axis, so what do we have in our linuxcnc toolbox that looks like > > > > > a bi-dir pwn controlled twin H bridge to run a 24volt brushed > > > > > PMDC motor with a 10 amp in-rush as if it were a servo? > > > > > > > > > > Thanks all. > > > > > > > > > > Cheers, Gene Heskett > > > > > -- > > > > > "There are four boxes to be used in defense of liberty: > > > > > soap, ballot, jury, and ammo. Please use in that order." > > > > > -Ed Howdershelt (Author) > > > > > If we desire respect for the law, we must first make the law > > > > > respectable. - Louis D. Brandeis > > > > > Genes Web page <http://geneslinuxbox.net:6309/gene> > > > > > > > > > > > > > > > _______________________________________________ > > > > > Emc-users mailing list > > > > > Emc-users@lists.sourceforge.net > > > > > https://lists.sourceforge.net/lists/listinfo/emc-users > > > > > > > > _______________________________________________ > > > > Emc-users mailing list > > > > Emc-users@lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/emc-users > > > > > > Cheers, Gene Heskett > > > -- > > > "There are four boxes to be used in defense of liberty: > > > soap, ballot, jury, and ammo. Please use in that order." > > > -Ed Howdershelt (Author) > > > If we desire respect for the law, we must first make the law > > > respectable. - Louis D. Brandeis > > > Genes Web page <http://geneslinuxbox.net:6309/gene> > > > > > > > > > _______________________________________________ > > > Emc-users mailing list > > > Emc-users@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/emc-users > > > Cheers, Gene Heskett > -- > "There are four boxes to be used in defense of liberty: > soap, ballot, jury, and ammo. Please use in that order." > -Ed Howdershelt (Author) > If we desire respect for the law, we must first make the law respectable. > - Louis D. Brandeis > Genes Web page <http://geneslinuxbox.net:6309/gene> > > > _______________________________________________ > Emc-users mailing list > Emc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-users > -- Chris Albertson Redondo Beach, California _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users