Thread: Help! DIY 4 amp L297/6203 driver
Threaded View
-
17-11-2009 #10
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.
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