Thread: Help! DIY 4 amp L297/6203 driver
Hybrid View
-
16-11-2009 #1
I've only had a quick look at this thread and the circuit, but imo the pic is simply controlling VRef. It's possible it is modulating it to provide variable VRef - but I think this unlikely since there's not a lot of point with the voltage divider if that's the case.
What I've done in the past to control a 297 is run the output of the PWM through a two stage RC filter to set the current, but doing this means there is no need for anything else around the VRef pin.
I think if I were working on that circuit I'd consider replacing the 297 with the PIC (albeit a slightly fatter pic). I'd use one of the comparators along with the PWM brought out as above (other side fed via the the current sensing resistor as per normal). Think I'd probably do most of the work in the interrupt probably using change on port ints to detect comparator and clock change. Should be possible to include microstepping etc - along with the current control stuff.
Failing that, why try and match exactly the circuit? Do as others above have suggested and simply use a 555 as a charge pump to keep the motor in high power mode.
All you really have is two supplies to your VRef pin - one permanently at 5v the other switching 0 to 5v. Run them both through a resistor (possibly the 555 output through a diode to make it easier to figure) and to the potential divider. If the resistor values are matched then roughly speaking when both are on the current will be double that when only one is on. Obviously you can chose resister values that give you the ratio's you're after.
Hope that makes sense.
[edit] I see above there's a circuit using the 555 ;-)
-
16-11-2009 #2
AAhhgg, more options. Thanks for your input tho. I like the idea of replacing the L297 with a pic as this is apparently the main cause of the buzzing. but way beyond my capabilities at the mo.
Ive been looking at the follow up thread to the A3986 debate (big can of worms) and it seems that PWM is better than the chopper control of the L297. However there was also a comment on a similar theme that suggested that the L6203 isnt the best choice for the h bridge either
Looks like I'm going round in circles.
Steve
I believe the pic is lowering vref only when the step signal stops. In normal use the trim pot is setting the Vref.I agree that the 555 option is the easiest but the pic option uses less components so helping with a smaller board and slightly reduced costs.
Thanks again
-
17-11-2009 #3
Can you program a pic at all?
What you actually want it to do is pretty trivial.
However I'd change the circuit slightly. In my experience you don't generally want the holding current to fall too much - to about 25% is about right.
So:
The current voltage across the VR is about 1v. Get another resistor which will give you approximately 0.25v and wire that up to the top of the VR. You now have two resistors which if either is connected to the supply will either give you the desired current or 1/4 or it.
Next take the two resistors and wire them to two of the output pins of the PIC (obviously the existing 3k9 will need disconnecting from the supply).
What we've got now is the ability of the PIC to pull either resistor high (+5v) and thus select the current as either 1x or 0.25x.
Some psuedo code for your pic.
Code:start: loop: if (clock == valid) counter = 5Seconds; if (counter <> 0) { Line1x = high; Line0.25x = tri-state; } else { Line0.25x = high; Line1x = tri-state; } if (counter > 0) counter = counter - 1; goto loop;
If you've got interrupt on port change - that would be best for the clock (although it'd be unlikely in sampling it over 5 seconds that you'd miss an event).
counter can be done using a timer or in software - whatever your comfy with.
-
17-11-2009 #4Can you program a pic at all?
) but wasnt 100% sure on the best way to go with the code so thanks vmuch.
Would it be ok to use 2 trim pots instead of resistors, so i can adjust for diferent motors/ applications? and is it feasable to to use a 1 sec or less timing?
Thanks again, I'll have a go at another schematic to see if I've got the the right idea.
Thread Information
Users Browsing this Thread
There are currently 20 users browsing this thread. (0 members and 20 guests)
Similar Threads
-
Stepper Motor Driver - cheap similar to ArcEuro 4.2A Bi-Polar Stepper Motor Driver
By craynerd in forum Motor Drivers & ControllersReplies: 1Last Post: 16-03-2014, 07:29 PM -
Dc servo driver
By Treemonkey in forum Motor Drivers & ControllersReplies: 11Last Post: 11-02-2013, 08:16 PM -
Driver suggestions
By Shinobiwan in forum Motor Drivers & ControllersReplies: 0Last Post: 04-03-2012, 03:54 PM -
Driver wiring help...
By mike in forum Motor Drivers & ControllersReplies: 12Last Post: 21-09-2010, 09:29 AM -
Driver box
By John S in forum General ElectronicsReplies: 1Last Post: 21-06-2009, 12:46 PM
Bookmarks