View Full Version : Help! DIY 4 amp L297/6203 driver
Ross77
09-11-2009, 10:26 PM
Hi All
Im looking to build a new stepper driver for my mill project. The original board used an L297 driver and 2x L6203 H bridge output stage. I'm hoping to build something similar and have found a few circuits on the net.
I have also found some nice additions to the basic circuit like overload protection for the output chips (good idea since I fried them on the last board :smile:) and varable voltage for VREF to increase Half step torque.
The circuit i have used i heavilly based on one I got from an old thread on cnczone but I'm unsure what the Pic chip dose (i asume it detects the clock pulse and varies the VREF accordingly)
So Question 1. can anyone help with a replacement circuit for the PIC chip as I dont want to use PIC chips for this project.?
And Question 2. Can some check over my version to make sure it works or suggest an alternative?
Thanks in advance
tribbles
09-11-2009, 11:09 PM
Hi
I'm not sure about the PIC - R23 is adjusting Vref (driven by Q2/IC5A) into it's GP4 input (which for the '675 is analogue input 3).
But it also does take the CLOCK signal that goes into IC3 (L297).
I don't think it's doing anything to Vref, so it must have the capability of driving CLOCK instead. Otherwise, there's not a lot the PIC could do - all the other IO pins are grounded. Do you have the code for the PIC? That would give more of a clue as to what it's doing.
Any particular reason why in yours you aren't using optoisolators?
D11 on yours should be a triac instead (T1 on the original, middle-bottom).
C15 on yours is the reverse polarity (+ve is going to GND) - next to T1 on the original (C27).
I see you've omitted the power supply circuit (top-right) - are you going to power it from the CNTL port (JP3)? I can't see any other method of providing +5V...
Apart from that, it looks good - but I'll have another look later on.
Edited to add: I suppose the PIC could do things with Vref - although the only things it could do are:
- Power GP4 high
- Power GP4 low
- Pulse GP4
- Leave GP4 open
It might power down the stepper controller if the clock hasn't been used for a while. GP2 is also the INT(errupt) input on the PIC. In which case, I suppose a resettable monostable could do the same job.
irving2008
09-11-2009, 11:15 PM
Hi All
Im looking to build a new stepper driver for my mill project. The original board used an L297 driver and 2x L6203 H bridge output stage. I'm hoping to build something similar and have found a few circuits on the net.
I have also found some nice additions to the basic circuit like overload protection for the output chips (good idea since I fried them on the last board :smile:) and varable voltage for VREF to increase Half step torque.
The circuit i have used i heavilly based on one I got from an old thread on cnczone but I'm unsure what the Pic chip dose (i asume it detects the clock pulse and varies the VREF accordingly)
So Question 1. can anyone help with a replacement circuit for the PIC chip as I dont want to use PIC chips for this project.?
And Question 2. Can some check over my version to make sure it works or suggest an alternative?
Thanks in advance
At a guess i would surmise the PIC is detecting the clock to the L297 and after some timeout after the last clock pulse is pulling Vref down to reduce the current in the motor. A 555 set up as a monostable with say a 5sec delay and triggered from the clock line might do the trick...
must learn to type faster!
Ross77
09-11-2009, 11:35 PM
Thanks for the replies
Tribbles
Im not using the optos as i plan to make modular set up with a master board for the optos. Thank for spotting the mistakes, thought it was a funny looking diode :whistling:
The +5 is supplied from the input connector, Bottom left.
Irving
So is the Pic just earthing the 5v supply to the VREF making it 0v which means there is no holding current? I presume it would then revert back when a pulse is detected on the clock line?
irving2008
09-11-2009, 11:46 PM
Thanks for the replies...
Irving
So is the Pic just earthing the 5v supply to the VREF making it 0v which means there is no holding current? I presume it would then revert back when a pulse is detected on the clock line?
Well if that was the case it would be pointless IMHO. I had a quick scan round and can't find the original design writeup for this circuit. I am wondering if the PIC modulates the VREF rather than just shutting it off...
tribbles
09-11-2009, 11:50 PM
I'd missed that connector for some odd reason :smile:
I suspect that VREF does indeed go to 0V.
Q2 on the original can pull it low based on IC5A, and the PIC can pull down pin 3 of R23 (original).
I suspect that you may be able to get away without the PIC at all - it would mean that it would be powered up continually though (so you may need to get some meatier heatsinks).
tribbles
09-11-2009, 11:53 PM
Well if that was the case it would be pointless IMHO. I had a quick scan round and can't find the original design writeup for this circuit. I am wondering if the PIC modulates the VREF rather than just shutting it off...
It could do that - it would reduce the holding torque for the motors as a result. It would then provide the "full" VREF when it's being clocked. It might be a very short pulse...
Ross77
10-11-2009, 12:09 AM
Modulating the vref would make sense as no holding current isnt much use. Is that why a Pic is used rather than a 555?
I did find another cuircuit that uses logic gates to trigger 2 separates trim pots but the control signal came from an external source or the software. would it be possible to use a 555 chip to trigger this circuit?
This would make more sense and be easier to setup
tribbles
10-11-2009, 12:18 AM
Simply dropping VREF to 0 would probably drop the output current to 0, which is probably what Q2 is being used for (I'm not familiar with the L297 itself).
If INH1, INH2 and JP1 (pin2) are high, then VREF would be 0.
If the PIC's modulating VREF, then it would allow the holding current to be varied - it was probably felt by the designer to be more configurable than other circuitry (and I would be inclined to agree - you could do some cleverness like make the holding voltage [current] drop off over time the longer you don't use it, and then stabilise at a set value for the minimum hold you need). C23 would smooth the signal.
In your latest circuit, the whole left hand side appears to be doing the work of the PIC - and that's a fairly large circuit. Are you sure you don't want to use a PIC (why not?)
irving2008
10-11-2009, 08:37 AM
Simply dropping VREF to 0 would probably drop the output current to 0, which is probably what Q2 is being used for (I'm not familiar with the L297 itself).
If INH1, INH2 and JP1 (pin2) are high, then VREF would be 0.
If the PIC's modulating VREF, then it would allow the holding current to be varied - it was probably felt by the designer to be more configurable than other circuitry (and I would be inclined to agree - you could do some cleverness like make the holding voltage [current] drop off over time the longer you don't use it, and then stabilise at a set value for the minimum hold you need). C23 would smooth the signal.
In your latest circuit, the whole left hand side appears to be doing the work of the PIC - and that's a fairly large circuit. Are you sure you don't want to use a PIC (why not?)
The purpose of IC5,Q2 (IC4A, T1 in circuit 2) is to reduce Vref by 1/3 approx on 1/2 steps to even out torque and get a better 1/2 stepping. This is because, without those additions, the current on half steps (both coils on) is 1.4x current on a full step (one coil on) (sum of the vectors). In circuit 3 the left hand side is a charge pump that detects when the clock pulse train vanishes and switches Vref from Imax to Ihold after a short delay, however its complicated by additional circuitry to force Ihold when the driver powers up.
Whats lacking is the actual code for the PIC, only then can we determine what its doing... should be on the net somewhere...
tribbles
10-11-2009, 09:50 AM
I'd forgotten that 410R resistor off of Q2. That makes sense.
Ross77
10-11-2009, 07:06 PM
I didnt want to use a PIC at this stage because I havent used them before and didnt want to have to learn how now. Looks like I'm going to have too tho as I'm struggling to fit it on the 3" x 4" demo board in eagle
So is the Burger cuircuit no good then, Sorry for being thick :smile:
The orignal thead was Problems with stepper driver (L297 and L6203) - CNCzone.com-The Largest Machinist Community on the net! but as its 3-4 years old I didnt see much point in posting
And the link is to a polish site, which obviously I havent got a clue what it says http://forum-cnc.pl/index.php?topic=55.0
irving2008
10-11-2009, 07:11 PM
I didnt want to use a PIC at this stage because I havent used them before and didnt want to have to learn how now. Looks like I'm going to have too tho as I'm struggling to fit it on the 3" x 4" demo board in eagle
So is the Burger cuircuit no good then, Sorry for being thick :smile:
The orignal thead was Problems with stepper driver (L297 and L6203) - CNCzone.com-The Largest Machinist Community on the net! (http://www.cnczone.com/forums/showthread.php?t=44802) but as its 3-4 years old I didnt see much point in posting
And the link is to a polish site, which obviously I havent got a clue what it says http://forum-cnc.pl/index.php?topic=55.0
Yes I found that too... I couldn't find anything in English relating to the original design
irving2008
10-11-2009, 07:36 PM
Yes I found that too... I couldn't find anything in English relating to the original design
However a google translate on post #3 'version 2006.04.26' throws up:
"
-circuit protection -> T1
-reduction system DC ... after inactivity -> PIC
Power-split
"
So that confirms what the PIC does... but no info on the code... I wonder if this was ever built?
Ross77
10-11-2009, 08:30 PM
Dam I tried google translate and it came up with a load of rubbish.
Do you think it might not be worth pursuing? I saw the first few designs that didnt have the pic so I presumed it would work without it but the idea of reducing the hold current sounds like a good idea given the buzzing and noise that I got last time.
tribbles
10-11-2009, 08:56 PM
Unfortunately, without the code for the PIC, it'll be effectively useless - it would be possible to write something, but it would probably need a bit of tweaking to get it right.
I'd be tempted not to use it at all and see how you get on. The motors would get hotter because the power will be on all the time.
I like Eagle, but I got fed up of the small board size (which is their aim, I suppose), so I bought the professional edition in the end - which also gives multi-sheet schematic entry as well. I did manage to make a board wider than the maximum size, but I had to use vias for PTH pads, and be really careful about the positioning of the other components.
I'm just having a discussion with Farnell (who bought CadSoft) about getting the autorouting package for it as well (I only got Layout and Schematic, but now I want to get the complete package).
irving2008
10-11-2009, 11:18 PM
Shouldn't be too hard to create the same effect without the PIC. I see a monostable to define the timeout, and an astable with variable on/off ratio to provide a modulating switch. Could be done with the two halves of a 556 I reckon...
Then again, why not just pull Vref down rather than modulate it?
I will think on it...
tribbles
11-11-2009, 12:28 AM
I think you'd want to modulate it in order to adjust the holding torque.
But you're right - a 556 would provide the timeout and the reduction in torque. Although a 555 and a suitable transistor/resistor should pull VREF down to a suitable amount (much in the same way that Q2 does it).
Hell, you may even get away with a simple RC timer - assuming the clock's quiescent voltage is 0. That I'd need to think about (analogue electronics isn't my forté).
Ross77
11-11-2009, 08:22 PM
Thanks for the input, most appreciated.
The mono stable and astable idea sounds good but beyond my capabilites so I will have to wait for your input :beer:
I found a circuit that uses a 555 to pull vref down after 10s, its from a unipolar design that uses an L297 so i presumed it would be ok.
I'm not sure if I fully understand the timing delay, I presumed that the control circuit would activate the lower vref so soon as the clock stopped? but looking at this I think it only works after 10s of inactivity. so in most cases the current will be full power?
irving2008
11-11-2009, 10:19 PM
Thanks for the input, most appreciated.
The mono stable and astable idea sounds good but beyond my capabilites so I will have to wait for your input :beer:
I found a circuit that uses a 555 to pull vref down after 10s, its from a unipolar design that uses an L297 so i presumed it would be ok.
I'm not sure if I fully understand the timing delay, I presumed that the control circuit would activate the lower vref so soon as the clock stopped? but looking at this I think it only works after 10s of inactivity. so in most cases the current will be full power?
The delay could be made adjustable, but that circuit would do the trick. It needs a lot more parts than the PIC, that is the attraction of using the PIC...
I dont think a PIC program would be hard to create, using a 16F84 or equivalent...they are only a few pence now and programming them isn't hard (I can do it, so can at least 2 or 3 others)
Ross77
11-11-2009, 10:59 PM
Thanks Irving, Is that an offer to create the code? :clap:
I have a programmer that I bought many years ago, but never built, that supports that chip. So the final decision is wether to include the short cuircuit protection as it dose complicate the board a tad. Is it really worth the hassel? I first thought it was also an internal overload but after finding the application sheet it is only for output short circuit, maybe I'll just have to be carefull with the motor wiring :whistling:
irving2008
11-11-2009, 11:24 PM
Thanks Irving, Is that an offer to create the code? :clap:
I have a programmer that I bought many years ago, but never built, that supports that chip. So the final decision is wether to include the short cuircuit protection as it dose complicate the board a tad. Is it really worth the hassel? I first thought it was also an internal overload but after finding the application sheet it is only for output short circuit, maybe I'll just have to be carefull with the motor wiring :whistling:
I'll have a think on it...
Which bit of short circuit prtection?
tribbles
11-11-2009, 11:51 PM
I'd use the 12F675 (or possibly 12F629, which is the same as the 12F675, except doesn't have the A2D converters) - the 16F84 is significantly larger than needed (only 2 of the IO pins are required), and also needs an external oscillator.
10F20x doesn't have an INT input, so I'd discount them (although there's nothing stopping you from polling an IO pin instead of waiting for the interrupt signal).
I've got some spare 12F683s from a project I didn't need them for - they're similar to the '675, except have a PWM output capability (I was going to use them for a fan speed controller).
I'd be willing to program one up and send it on - but I'd feel a little uncomfortable doing the code without knowing exactly how it's meant to work (willing to discuss it though).
Ross77
12-11-2009, 12:33 AM
Wow thanks guys, thats a great help, now if i could just get someone to convert the schematic to a pcb and mill it for me.....:lmao:
Irving
The short circuit protection is for the the output chips, (see below)
Tribbles
Thanks for the very kind offer, Unfortunatly I have no idea where to start with the code. I can only guess that an output needs to modulate (or switch low) the vref line to set the hold current (possibly adjustable from a trim pot) and then an input needs to look for the clock pulse to reset full current when a signal is seen?
I would imagine that the timing's are going to be the hardest bit as it might loss the first step whilst switching back to full current?
Is there any reason why this couldnt be put on a separate board and just send the Vref lineto the driver board with the other signals?
Thanks again
irving2008
12-11-2009, 12:41 AM
Well lets think this through...
Whats the slowest meaningful step rate, 1 step/second? how long after the last step do we want to wait, 10 seconds?
So every time there is a clock pulse, reload an 'n' second counter. when the counter reaches 0 start a PWM output with a frequency of 100Hz say, and a mark/space ratio controlled from 2 dip switches giving 100 (off), 75, 50 and 25 settings
Use a couple more DIP switches to set the initial delay 'n', say 20, 10, 5, 2 seconds.
Pseudocode:
Interrupt routines:
If INT0 (external)
read delay value
reset main counter to delay value
set PWM output high (open collector)
reset INT0
return
If INT1 (main counter reached 0)
read PWM value
initialise PWN registers
start PWM running
reset INT1
return
Main program:
set PWM frequency
set PWM output high
configure counter clock divider
configure INT0 on external trailing edge
configure INT1 on counter timeout
read delay value
reset main counter to delay value
enable INT0
enable INT1
halt
obviously, depending on the chip used you may have to synthesise the PWM function with counters and a lookup table to determine the correct counts for each DIP setting.
Ross77
12-11-2009, 01:03 AM
I wont pretend to understand that, but it looks impressive, cheers
Any tips for laying out pcbs in Eagle or is it practice makes perfect? this could take a while.....:rolleyes:
graffian
12-11-2009, 05:00 AM
er the ones that always hits me, repeatedly, I am not learning. Everything looks much smaller when it's actually on a pcb, smaller than the screen that is. So those neat narrow little traces and tiny pads are even smaller than you thought. oh and make the holes in the pads very small as large ones make soldering not as neat and the drill won't center aswell. Well those are things I need to remember, but don't till I am looking at the laser print.
I seem to remember Mariss from Gecko offering to sell cplds programmed pretty much as in the geckodrives, for something like $5 a time?
It was mentioned in the looooong thread about the Alegro A3986 chip that everyone decided didn't work properly, this is on CNC zone. That must be worth a look.
tribbles
12-11-2009, 10:02 AM
Wow thanks guys, thats a great help, now if i could just get someone to convert the schematic to a pcb and mill it for me.....
I can do the conversion of the schematic - I've done a fair number of PCBs myself (using Eagle PCB). Just send me the schematic, an idea as to what size you want (and also any heatsinks - most of the stuff I do is low-current digital, although the fan control was high current).
However, milling it... I photo-etch them myself, since I have the capability.
http://www.tribbeck.com/electronics/pcbs/
If you're interested :smile:
If you want to do it yourself, then there are a few rules to follow - graffian's advice is sound, but Eagle does have a "DRC" (Design Rule Check) which makes sure you don't break common ones (such as tracks too small, crossing over, pads too small, objects too close together). If you run this every so often as you're designing it, then it'll help you get along.
The photo-etching I do performs better than Eagle's built-in rules, so I've modified my rules to allow me to etch to within very tight tolerances.
Tribbles
Thanks for the very kind offer, Unfortunatly I have no idea where to start with the code. I can only guess that an output needs to modulate (or switch low) the vref line to set the hold current (possibly adjustable from a trim pot) and then an input needs to look for the clock pulse to reset full current when a signal is seen?
I would imagine that the timing's are going to be the hardest bit as it might loss the first step whilst switching back to full current?
Is there any reason why this couldnt be put on a separate board and just send the Vref lineto the driver board with the other signals?
Thanks again
I actually meant discuss with Irving :smile:
Looking at his (later) reply with the rough idea of the code, that looks sane to me, and roughly how I'd go about it.
INT0 would be the interrupt from the INT pin; INT1 would be the Timer0/1 interrupt.
DIP switches for the timeout's a neat idea - especially if it'll be used by someone who doesn't have reprogramming capability.
I have a slight concerna about using the PWM - if the PWM controls the direction control (i.e. oscillates between output 0 and open-collector), then that would be fine. However, from memory, it'll only oscillate between 0 and 1, then you'd need to be careful of the PWM pulse width - you could end up going too high with the VREF signal. Still doable though.
There's nothing stopping you from putting it on a separate board.
irving2008
12-11-2009, 12:17 PM
....
I have a slight concerna about using the PWM - if the PWM controls the direction control (i.e. oscillates between output 0 and open-collector), then that would be fine. However, from memory, it'll only oscillate between 0 and 1, then you'd need to be careful of the PWM pulse width - you could end up going too high with the VREF signal. Still doable though.
There's nothing stopping you from putting it on a separate board.
Depends on the chip and whether an O/C output is available. If not, a single NPN small signal transistor and base resistor on the output would suffice.
Having said that, if you are using a transistor, why not put a trimmer on the output side and not use PWM at all... would simplify the code and you could adjust the holding current to your hearts content.
Ross77
12-11-2009, 08:53 PM
Thanks graffian, I think I was about to make that mistake. I'll have to look for that thread, will it still apply to the L297?
I can do the conversion of the schematic
I will definatly take you up on that offer, If you make the board bigger than 4"x3" will i be able to veiw and output it myself? Good info on the PCB fabrication but think it will be too costly for a one off, as i plan to mill future pcbs.
I actually meant discuss with Irving :smile:
You've got me sussed, I'll go and sit in the corner then.:heehee:
a single NPN small signal transistor and base resistor on the output would suffice.
Wouldnt this then be the same as using a 555?
graffian
12-11-2009, 09:20 PM
Thanks graffian, I think I was about to make that mistake. I'll have to look for that thread, will it still apply to the L297?
From what I remember, Mariss had just noticed the A3986 thread and it started with a comment he could programme a CPLD, pretty much as the gecko stepper drives minus mid band resonance, to do what the A3986 was meant to do. Then another post suggested he would be able to sell them for $5! I imagine you would drive bridge drivers[ir2184?] from the cpld?
tribbles
12-11-2009, 09:23 PM
I will definatly take you up on that offer, If you make the board bigger than 4"x3" will i be able to veiw and output it myself? Good info on the PCB fabrication but think it will be too costly for a one off, as i plan to mill future pcbs.
I'll try to fit into 100x80mm (this is the maximum size for the free version). However, I think you would be able to load the larger size in, but you probably won't be able to move the components that are outside the area around.
There are techniques to squeeze it into a smaller space, but I'll avoid them (basically, moving to surface mount components) unless you've got a particular desire to solder really small components :wink:
Send me a PM (let me know when you've done it - I think the last one didn't arrive), and I'll give you the details. I can have a rough idea as to whether it'll fit or not probably in an hour or so.
cncezee
13-11-2009, 11:18 PM
The point of the pic is an alternitive clock, the data sheet stats "that if more than L297 is connected then the clocks should be connected to syncronise the circuit", just to the right of the pic is a change over jumper one side grounds pin OSC on the L297 the other wires in the RC oscilliator components 22k and 3n3F. the pin of the pic which is wired to the (top) of v ref pot is a pullup and will have no effect in modulating Vref or anything else
Roger
irving2008
13-11-2009, 11:52 PM
The point of the pic is an alternitive clock, the data sheet stats "that if more than L297 is connected then the clocks should be connected to syncronise the circuit", just to the right of the pic is a change over jumper one side grounds pin OSC on the L297 the other wires in the RC oscilliator components 22k and 3n3F. the pin of the pic which is wired to the (top) of v ref pot is a pullup and will have no effect in modulating Vref or anything else
Roger
Roger,
Not sure if you are looking at the same diagram we are, but the PIC very definitely does connect to Vref - the 3.9k resistor and 1k pot are a potential divider to make the max value of Vref = 1v (blue wiring). The PIC clearly has the ability to ground the top of the pot which will drop Vref to about 20% approx (assuming the PIC output is 0.2v) of its set value.
The OSC circuit (red wiring) does indeed have a jumper on it, but thats to enable an external oscillator input for the reasons you suggest, and has no relationship to the PIC or Vref circuit.
Ross77
14-11-2009, 07:59 PM
Hi Roger, I think I know what you are refering to as I have seen cuircuits that use a Pic for the clock frequency, but this circuit definetly uses the Pic to change the Vref. :smile:
Ok so no luck finding the code for the pic, plently of references to its theoretical use but no specifics. There are plenty using the 555 timer circuits tho.
The closest I can find is the Rotary table drive that kwackers posted. apparently it was designed to drive an L297 setup and provide a holding current using PWM on the Vref pin. The only problem is I cant open the hex and wouldnt know what to look for any way. Maybe I will have to ask him direct for help :whistling:.
Ive also found conformation that this circuit was never built or tested so Im inclined to leave out the Short-circuit protection for the motor wires to keep it simple. may be I could look at it later and just use a known design to get the mill working?
Ross77
15-11-2009, 07:06 PM
Progress so far is three options.
1. Basic . as per data sheet but with half step boost and ne555 controling the idle current reduction
2.Ideal. as basic but with PIC controlling the idle current reduction and shunt reg to stop over voltage (not sure if I need to include the mosfet from the original as well?)
3. Complete. as above but with output short-circuit protection. (not sure about that now as it is quite different fron the data sheet! posted earlier)
Any thoughts, omissions or additions?
irving2008
15-11-2009, 07:43 PM
There is an error with the Vref circuitry with the 555... Vref should be connected to the slider of the pot...
Ross77
15-11-2009, 10:59 PM
Cheers thats the advantage of a fresh pair of eyes :smile: I thought I'd fixed most of the errors.
Any thoughts on using the short circuit protection and if i need the mosfet in the shunt regulator?
Kwackers
16-11-2009, 07:57 PM
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 ;-)
Ross77
16-11-2009, 08:50 PM
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 :rolleyes:
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
Kwackers
17-11-2009, 04:21 PM
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.
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;
As you can see, there's not a lot required...
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.
Ross77
17-11-2009, 07:19 PM
Can you program a pic at all?
No not at the moment. But tribbles has kindly offered to program one for me (and make the board :beer:) 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.
tribbles
17-11-2009, 08:00 PM
The code could be pretty much as kwacker has suggested (obviously not pseudo-code though). I'd use timer interrupts.
Using two of the PIC's pins to control Vref is a neat idea - and two trimmers should be fine.. You could use a third pin with a trimmer for configuring the timeout (should be very easy to do).
Ross77
17-11-2009, 08:43 PM
Exellent. This is moving along nicley now.
Good idea on the trim pot for time out, I like it...
So the only decision now is what pic to use and the pin out? It looks like im not going to use the short circuit protection so the the tripple 3 input AND gate is wasted in this circuit.
Are there enough pins on the pic to implment the 1/2 step boost, or will it make the code difficult?
Last question. dose this need a crystal or can it be linked to the sync pin on the L297 for external clock?
tribbles
17-11-2009, 09:06 PM
The PIC doesn't really need a clock (it depends on which one you use).
Since I've got them, you may as well use 12F683 - it doesn't need an external crystal or clock (it's got an 8MHz clock built-in). It's 8-pin: 2 power, 1 input and 5 I/O.
If you're referring to replacing the 7415, then I would keep it as it is - you'd need to monitor the lines, and there would be a delay. But then, if you're not clocking the circuit very fast, then it would probably be okay. But, as you mention, it does save on code complexity :smile:
For the PIC, you can use any of the output pins (pins 2, 3, 5, 6 and 7) for the VREF generation signals, but use one of the analogue pins (5, 6 and 7) with a trimmer (between VCC and GND) to set the delay.
Ross77
17-11-2009, 10:06 PM
For the PIC, you can use any of the output pins (pins 2, 3, 5, 6 and 7) for the VREF generation signals, but use one of the analogue pins (5, 6 and 7) with a trimmer (between VCC and GND) to set the delay.
Ok think I've got it sorted. I'm not sure if the trim pots are configured properly as it looks like they will interfer with each other :naughty:. Just reread Kwakers post and I think i should have used the pic to pull them high not low. :whistling:
I've also left the 3.9 res in as I presume it will limit the Vref to 3v mav as per the data sheet. If the pots are pulled high could this be achived with a common 3v supply?
Kwackers
17-11-2009, 11:05 PM
Ok think I've got it sorted. I'm not sure if the trim pots are configured properly as it looks like they will interfer with each other :naughty:. Just reread Kwakers post and I think i should have used the pic to pull them high not low. :whistling:
I've also left the 3.9 res in as I presume it will limit the Vref to 3v mav as per the data sheet. If the pots are pulled high could this be achived with a common 3v supply?
Just to clear any confusion - you the 3k9 res should be removed from the +5v line and connected to a port. The voltage at the other end will never exceed 1v.
Another resistor is connected the same (19k??) one end to the junction of the VR and the 3K9 the other to a second port.
Basically the PIC will pull either of the lines high - if it pulls the 3k9 one high you get whatever current you've set the VR for, if it pulls the 19k one high you get a quarter of that.
The pic avoids interference by essentially disconnecting the unused resistor (tri-stating the output).
I've also realised in my pseudo code there's no need to set the port pins high in the loop - this can be done outside - plus I don't show the pin being 'un-tri-stated' - which obviously it would need.
tribbles
17-11-2009, 11:33 PM
Just thinking about it - I don't think it's necessary to have two pins controlling VREF.
In the original circuit, there are three possible states:
GP 2is open circuit; VREF would range from 0 to ~1V (depending on R23)
GP2 is 0V; VREF would be 0
GP2 is 5V; VREF would be between 0 and 5V (again, depending on R23)
The last mode of operation isn't what I suspect is used, so I'll discount that.
However, GP2 can easily create a PWM signal by going from open-circuit to 0v, which at a 25% duty cycle would bring VREF from between ~0 and 0.25V. C23 is used to smooth the signal.
I'm beginning to have an idea about a (possibly) better way to do this.
GP2 is used for the CLOCK signal for the L297 - this is the PIC's interrupt pin, and would be easier to deal with there.
GP1 has a 10K trim resistor which is used to control the minimum hold voltage.
GP0 is connected DIRECTLY to VREF. This is used to monitor VREF.
GP5 is used to control VREF using the same circuit as the original does.
GP4 has a 10K trim to control the delay time for the circuit.
The advantages with this are:
1) The hold VREF can be easily adjusted, and measured with a volt meter
2) The PIC has voltage comparison circuits on GP0 and GP1, and this would be using them
3) Interrupts can easily be used for everything (VREF going below voltage, clock signal coming in, timeout occurring)
4) The PIC shouldn't need to be reprogrammed at all (once it's all working)
If there was a spare output pin, then the L297's RESET pin could be controlled (removing the need for R15, D12 and C16 on your circuit). If we didn't monitor the VREF signal (GP0), then this could be done instead - the trim for GP1 would actually control the minimum PWM duty cycle.
Kwackers
18-11-2009, 10:13 AM
Hi tribbles,
Yep, all that would work - I was just demonstrating that what was required could be done simply.
In the past I've used PWM to modify the VRef voltage - however I've always spotted some ripple with a single stage of RC filtering (I think my PWM was at about 5khz) so always added another. Don't think it matters that much as long as the voltage is approximately right though.
Usually I didn't bother with the VR, having options in the PIC to set the current (either with links setting the most common values, or via a menu on whatever display device I'm using).
Monitoring the VRef voltage I've never found to be necessary - although my initial attempt did exactly that. I have in the past though (when building buck/boost converters to drive LED's) made self starting regulators using the PWM on the PIC and used the analogue inputs to monitor the voltage and adjust the PWM. That's a very interesting experiment in feedback loops... :eek:)
Ross77
18-11-2009, 07:24 PM
Just to clear any confusion - you the 3k9 res should be removed from the +5v line and connected to a port. The voltage at the other end will never exceed 1v.
Another resistor is connected the same (19k??) one end to the junction of the VR and the 3K9 the other to a second port.
See first attachment, is this what you meant? if not Im afraid I dont know what you mean, sorry :redface:
The advantages with this are:
1) The hold VREF can be easily adjusted, and measured with a volt meter
2) The PIC has voltage comparison circuits on GP0 and GP1, and this would be using them
3) Interrupts can easily be used for everything (VREF going below voltage, clock signal coming in, timeout occurring)
4) The PIC shouldn't need to be reprogrammed at all (once it's all working)
Sounds good, especially not needing to be reprogramed , see 2nd attachment. hope Ive at least got 1 right :smile:
If monitoring the vref isnt necessary then the reset option would be best. I see the data sheet says the reset must be initially be set low and then set high but this is the only circuit I have seen that dose this, all the others just tie it to +5v.
The only question is what can we make GP3 do? Flashy lights, make the tea? :smile:
Usually I didn't bother with the VR, having options in the PIC to set the current (either with links setting the most common values, or via a menu on whatever display device I'm using).
Nice idea but I think I'll save that for the next incarnation...
tribbles
18-11-2009, 07:44 PM
Okay - just one slight change - pull the reset low with a 10k resistor. That will ensure that the L297 is in a reset condition before the PIC starts up.
GP3 can only be used for a digital input, so there's not a lot you can do with it, I'm afraid!
Kwackers
18-11-2009, 08:35 PM
Nope.
Connect one pin of the pic to a 3k9, the other to a 19k.
Now connect the other end of the resistors to the top of the VR, the bottom of the VR connects to 0v and the wiper to VRef.
That's it!
Ross77
18-11-2009, 09:37 PM
Okay - just one slight change - pull the reset low with a 10k resistor. That will ensure that the L297 is in a reset condition before the PIC starts up.
GP3 can only be used for a digital input, so there's not a lot you can do with it, I'm afraid!
Like so?
Connect one pin of the pic to a 3k9, the other to a 19k.
Now connect the other end of the resistors to the top of the VR, the bottom of the VR connects to 0v and the wiper to VRef.
That's it!
Thanks, think i under stood that better.
Ok so Kwackers option is easy to do and gives me adjustable vref with a fixed idle current at 25% (which could be changed by swapping out the 19 K resistor?) and Tribbles options uses a few more trim pots but means I can easily adjust Vref max, vref hold and the delay time. Correct?
For the trimmers am I looking at quality multiturn (£1 each) or will the cheap low wattage single turn (10p) be ok? would need 9 for 3 axis.
Thanks again. looks like its nearly there :dance:
tribbles
18-11-2009, 09:51 PM
Like so?
Yes (from my side :smile:).
Ok so Kwackers option is easy to do and gives me adjustable vref with a fixed idle current at 25% (which could be changed by swapping out the 19 K resistor?) and Tribbles options uses a few more trim pots but means I can easily adjust Vref max, vref hold and the delay time. Correct?
Yes - you could even put an open-ended trim instead of the 19K to make that variable.
For the trimmers am I looking at quality multiturn (£1 each) or will the cheap low wattage single turn (10p) be ok? would need 9 for 3 axis.
I don't see a problem with cheap.
If you were to put all 3 on the same board, you could use a single PIC to control them all - then there'd only be one pair of trimmers for the duration/hold...
Ross77
18-11-2009, 10:28 PM
Yes (from my side :smile:).
Hurray at last :heehee:
If you were to put all 3 on the same board, you could use a single PIC to control them all - then there'd only be one pair of trimmers for the duration/hold...
I thought we'd ruled out an all in one board? also wouldnt this also mean the control is global? I was hoping to be able to set up each motor separatly.
So just need to check the type and size of a few components and we should be good to go.
Are there any parts to look out for? I now the polar caps just have to be 50v and the sense resistors 2 watt. Can the caps be any type or is polyester or tantilum required?
tribbles
18-11-2009, 11:16 PM
I was being facetious about the all-on-one-board :smile:
The settings would be global, but it could control all three axes independently (I've done that on my parallel port interface - although the PIC is more of an override for the PC [I've got the capability of having an external keyboard to move the machine around if I'm not anywhere near the PC]).
Digital:
For the non-electrolytic caps (C17, C19), there isn't really too much to worry about (so almost anything). I normally use polyester ones, such as Farnell part 116-6036 (100nF), 116-6039 (220nF).
Eagle PCB 5.6 has these in the "rcl" library -> C-EU -> C-EU050-030X075 (or C-EU050-035X075 for 220nF).
Don't forget you'll need a cap for the supply to IC4 (and also the supply itself).
You haven't got any electrolytic caps on the digital supply side - I'd put one in, around 47µF. I'd normally choose an Aluminium 5mm radial over Tantalum (they can explode quite nastily if you're not careful - mainly if you solder it the wrong way around, but they are known to short internally over time). Farnell part 969-3572.
Eagle PCB 5.6 is rcl -> CPOL_EU -> CPOL_EUE2-5
(Hope you follow the nomenclature)
Resistors (R14, R19, R11, R10, R9) for the digital can be 0.25W quite happily. The smallest size for them to be mounted parallel to the board is rcl -> R-EU_ -> R-EU_0207/7
For the power side:
Non-electrolytics, I'd also use polyester, the 63V ones I mentioned above should be fine, but for the smaller values (15/22nF), then 121-5517 and 121-5518 respectively (they use the 030X075 package).
Electrolytics (only C13 and C11), then you could use Tantalum for them (Tants are good for small space and high capacitance). However, I'd stick with Aluminium. Farnell 969-3793, CPOL-EUE3.5-8.
The 2W resistors I take it are for R1/2/3 and R5/6/7. Not sure if you meant it for R4 and R8 as well, but I'd use them too.
I'm not sure if you could replace R1 and R2 with a single 0.25 ohm resistor (may need to be 4W). Anyway, Farnell only seem to have 0.5ohm 2W resistors in SMT form (they do have a 0.51 resistor, but it's in the US, and you'd need to pay £15.95 for delivery [!]). I'm guessing R-EU_0613/15 package for that one (based on the datasheet for the US item). You could use 4x1ohm resistors (Farnell 156-5440, same package as below).
The 1K resistor (Farnell 156-5434 seems the cheapest in stock), looks like it's R-EU_0411/12.
10R resistor - Farnell 156-5420 (same package as above).
I think you can guess where I get most of my components from :smile:
Note that the STTA8 diode does not appear to be available from Farnell, but they do offer the STTH8 instead (same current, but slightly lower Vf [I don't think that'll affect it much - they're only to prevent the back-EMF from the motors from damaging the drivers]).
Also note that I'm using an oldish catalogue for the capacitors (the 2W resistors I did use their website though).
Furthermore note that digital and audio analogue is really my realm, so feel free for people to correct my choices.
Have you decided what type of connectors to use? I really like Farnell 963-2735 style connectors for the motors (I'd used them before I saw them on the drivers I got from Zapp). There are bigger ones for more current if you need it.
Ross77
18-11-2009, 11:55 PM
Perfect, glad you chose Farnell.
I was hoping to save you the job but it looks like that idea failed. Shall I continue setting the components or will it be easier for you to choose sizes and orientation whilst laying out the pcb?
I've have a look at some similar designs and they use the larger 100v 7.5mm caps for the output bootstrapping etc. seen reasonable or over kill?
I already have the STTA8's that i can steal from the old board. :whistling: That pin spacing will still be ok if i need to replace them the traditional round diodes.
Thanks again
irving2008
19-11-2009, 12:17 AM
I like Phoenix connectors, Farnell part 304-1359 (http://uk.farnell.com/phoenix-contact/1725656/terminal-block-pcb-2-54mm-2way/dp/3041359). They are cheap and robust (41p for a 2 way, 83p for a 4way)
tribbles
19-11-2009, 12:17 AM
You can go larger with the caps. I'd generally not mess around with the caps with what you give me, but the resistors are easier to change the orientation, and pin spacing. I may need to be a bit inventive in order to get it onto two layers *
Send the schematic to me when you're done, and I'll have a play with the layout and then send it back for you to have a look (or even on here, if anyone wants to see).
* Edited: I meant one layer with wire jumpers (which would be shown as a two-layer board).
tribbles
19-11-2009, 12:21 AM
I like Phoenix connectors, Farnell part 304-1359 (http://uk.farnell.com/phoenix-contact/1725656/terminal-block-pcb-2-54mm-2way/dp/3041359). They are cheap and robust (41p for a 2 way, 83p for a 4way)
Yes, I used them for a bit (and even have some spare in both 3.81 and 5.08mm spacing [albeit 6 and 8-way]), however, I prefer the other ones because you can easily unplug them for replacement or testing.
I initially used the Phoenix ones on a steering control circuit for a crop sprayer, but the boards kept on getting water on them, causing problems (the board has now been moved), and the guy who was fitting them was getting a bit annoyed at having to unscrew them, replace the board, and remember which way around the cables needed to go.
Phoenix do make the same style as the one I indicated, but they're more expensive (the two do seem to mate though).
Ross77
19-11-2009, 01:00 AM
Ok I'll see what the smallest 100v caps are. The only bit I'm stuck with is the high power resistors. The Original dosnt show a rating and the similar Burger design shows the bootstraps as 2 watt and the sense res as 5 watt! dose this seem right?
The other problem is that although the original board used this configuration the motors are only 2 amp per phase so I will need to lower these values to set a temporary 2 amp max current. This shouldnt affect the pcb layout tho. maybe just use a large res mounted vertically?
irving2008
19-11-2009, 08:37 AM
Ok I'll see what the smallest 100v caps are. The only bit I'm stuck with is the high power resistors. The Original dosnt show a rating and the similar Burger design shows the bootstraps as 2 watt and the sense res as 5 watt! dose this seem right?
The other problem is that although the original board used this configuration the motors are only 2 amp per phase so I will need to lower these values to set a temporary 2 amp max current. This shouldnt affect the pcb layout tho. maybe just use a large res mounted vertically?
Vref = 0.5v, phase current = 4A therefore sense resistor is 0.5/4 = 0.125ohm and dissipates 0.5 * 4 W = 2W so need to be 5W rated.
Why would you need to reduce them for 2A, just turn down Vref to 0.25V. I would recommend a 10 turn pot for the Vref trimmer, makes it so much easier to set.
What have you planned for heatsinking the 6203s?
From the datasheet, at 4A you are going to dissipate between 10 and 15W. Max junction temp is 150, max case temp 90 so for an ambient of 25degC you'll need better than (90-25)/15 = 4degC/W heatsink per 6203 - I'd go for ~3degC/W. thats going to need a finned heatsink around 60mm x 100mm each chip...
Ross77
19-11-2009, 08:38 PM
Vref = 0.5v, phase current = 4A therefore sense resistor is 0.5/4 = 0.125ohm and dissipates 0.5 * 4 W = 2W so need to be 5W rated.
If it only = 2W then why do the res need to be 5W? I thought vref was up to 1v as well? if so then 1/4 = 0.25 hence the two 0.5r, but this would mean max current is 4W? probably got it wrong again :whistling:
Theres not much available in 2 or 5W resistors in that range as they cant be wirewound.......Why is it possible to get a 2W smd res 30p? dosnt make sense.
For the heat sinks I was going to reuse the originals, their about 50mm square and 140mm long with fan at each end. The 6203's mount on both sides with the fins top and bottom.
Does the shunt regulator have to be on each board or could I just put one on the PSU distribution board?
irving2008
20-11-2009, 01:26 AM
If it only = 2W then why do the res need to be 5W? I thought vref was up to 1v as well? if so then 1/4 = 0.25 hence the two 0.5r, but this would mean max current is 4W? probably got it wrong again :whistling:
Theres not much available in 2 or 5W resistors in that range as they cant be wirewound.......Why is it possible to get a 2W smd res 30p? dosnt make sense.
For the heat sinks I was going to reuse the originals, their about 50mm square and 140mm long with fan at each end. The 6203's mount on both sides with the fins top and bottom.
Does the shunt regulator have to be on each board or could I just put one on the PSU distribution board?You are right, Vref for the L297 is 1v - I was confusing it with the TBA6560 chip on the other thread... so the sense resistor should be 1v/4A = 0.25ohm non-wirewound, rated at 1v x 4A = 4W you would derate by 25% - 50% so really you need something rated at 5W - 8W
Look at the datasheet for this 0.5ohm SMD resistor (http://www.farnell.com/datasheets/31992.pdf)from Farnell (you'd need 2 in parallel to give 0.25ohm/4W). At its rated dissipation it needs, and I quote "2 Watts with total solder pad and trace size of 300 mm2" - I doubt you'll be close to that amount of copper, and even if you were the temp rise is 90degC above ambient... thats 105degC+ - ouch!
A better product is this nickel chrome metal resistor (http://www.alldatasheet.com/datasheet-pdf/pdf/250438/VISAY/WSR5.html) from Vishay, also from Farnell (http://uk.farnell.com/vishay-dale/wsr5r2500fea/resistor-metal-strip-0-25-ohm-1/dp/1107490). This is rated at 5W and seemingly doesnt need a heatsink, but will hit 120degC at rated load so some airflow would help.
tribbles
20-11-2009, 06:22 PM
And this is why I like low-current digital electronics :smile:
Ross77
21-11-2009, 01:00 AM
You are right, Vref for the L297 is 1v - I was confusing it with the TBA6560 chip on the other thread... so the sense resistor should be 1v/4A = 0.25ohm non-wirewound, rated at 1v x 4A = 4W you would derate by 25% - 50% so really you need something rated at 5W - 8W
Phew I thought I was going mad. thanks for the smd links but I think I'll stay away from them at the mo. i just couldnt understand how such a small part was so powerful and cheap.....
Looks like digi-key are the best for this project. in fact they are cheaper on a lot of things, I just need to spend £50 for free delivery. Any body need parts? I can get 2watt res for 13p each, if I use 3No. 750 ohm in parralel = 250 ohm at 6 watt correct?
irving2008
21-11-2009, 11:39 AM
Phew I thought I was going mad. thanks for the smd links but I think I'll stay away from them at the mo. i just couldnt understand how such a small part was so powerful and cheap.....
Looks like digi-key are the best for this project. in fact they are cheaper on a lot of things, I just need to spend £50 for free delivery. Any body need parts? I can get 2watt res for 13p each, if I use 3No. 750 ohm in parralel = 250 ohm at 6 watt correct?
That is correct...
tribbles
21-11-2009, 04:07 PM
Any body need parts?
Let me know how short you are off your £50 - I may have some bits that I can order from Digikey.
irving2008
21-11-2009, 08:22 PM
Ditto, i need to order a few small bits, not urgent but if you need a couple of quid extra let me know... stuff i need can be posted to me with a 2nd class stamp...
Ross77
21-11-2009, 11:52 PM
Let me know how short you are off your £50 - I may have some bits that I can order from Digikey.
Ditto, i need to order a few small bits, not urgent but if you need a couple of quid extra let me know... stuff i need can be posted to me with a 2nd class stamp...
Sure pm me with what you want. it would be good to help a little, after all the help you guys have given me. Dosnt matter if I go over, just said £50 min. :smile:
just about there with with the design. I've had a crack at laying out the pcb but I dont think it will fit on the 100x80 board in eagle, I'm sure you will prove me wrong.....
Ross77
24-11-2009, 10:59 PM
Ok so heres the final draft..........
The only thing I cant work out out is what the diodes (D9,D10) for the shunt reg need to be? Any over obvious problems?
Once its all confirmed and if anyone is interested I can post the eagle files.
irving2008
24-11-2009, 11:47 PM
Ok so heres the final draft..........
The only thing I cant work out out is what the diodes (D9,D10) for the shunt reg need to be? Any over obvious problems?
Once its all confirmed and if anyone is interested I can post the eagle files.
they are zener diodes. You need a total voltage of Vclamp - 1.4. By using 2 diodes you can get a bit more fine tuning of the voltage, for example a 30v and a 7.5would give a clamp of 30 + 7.5 + 1.4 = 38.9 which would be good for a 36v supply on 40V drivers...
tribbles
25-11-2009, 12:07 AM
Before you make any modifications, I've tweaked the schematic a bit to make the board a bit more sensible in layout.
Basically, I've renamed the components so that those beginning with "D" are the Digital part, those "A" are the bottom driver, "B" are the top driver (yeah, probably should've done them the other way around), and "P" is the power (top-right).
So when the board is laid out, it's easy to make sure that C13 (which is now BC3) is the smoothing capacitor to IC2 (now BIC1), rather than IC3 (AIC1).
Of course, that doesn't really matter if they're swapped, but I like it for symmetry :smile:
The other things are that R4 and R8 have been rotated through 180deg - you can see that the lines go through the middle of the resistors.
I'm not sure of your choice for PH1 and PH2 - 0.1" jumpers would be pushing it for the power consumption. I'd use the connectors that Irving and myself suggested. Also, the power connector may be a little too small as well (it looks the same kind of size as a 0.1" jumper).
I'll send you back the modifications I've made (there's also a custom library part which is a 100x80mm board that I designed; if you have problems with loading it, then let me know - I'll send you the library, although when it's done, I'll replace it with ordinary lines).
irving2008
25-11-2009, 12:20 AM
Ummm, wheres the RC network associated with the (OSC)illator? Obviusly if you have multiple boards you should minimise noise by connecting (SYNC) together and you have brought that out to a pin for that purpose... but one of the boards has to be the master oscillator... unless you are doing that externally somehow...
tribbles
25-11-2009, 12:28 AM
Good point - I hadn't spotted that in the datasheet.
It looks like all of the OSC pins can all be connected to ground - as long as you inject a signal into the SYNC pins.
That could be done from the parallel port, and could even part of the charge-pump circuit (if there's no signal, then don't clock the devices). Although I don't know how the L297 would cope in such a condition.
Although you could just use the ENABLE pin for that...
Ross77
25-11-2009, 05:03 PM
they are zener diodes. You need a total voltage of Vclamp - 1.4. By using 2 diodes you can get a bit more fine tuning of the voltage, for example a 30v and a 7.5would give a clamp of 30 + 7.5 + 1.4 = 38.9 which would be good for a 36v supply on 40V drivers...
Thanks. My supply is 41.5V unloaded so will this still work? or wil i need to up it to a 30+10? Im not to good with diodes, can you recomend a suitable part?
I've tweaked the schematic a bit to make the board a bit more sensible in layout.
That makes sense, I'll do that in the future. I think the resistors where 180deg out because i swapped the pins (vertical mount) in the pcb editor to make the lay out easier. i'll have to look out for that as I didnt think it also changed the schematic.....:redface:
Hands up about the connectors as well, I completelly forgot, definetly use the ones you suggested. as long as Digikey sell them, or something with the same pin spacing.
Well spotted on the missing clock/osc. I'm working on that now. There will be a master board that the 3 controllers connect to for signal, clock and power.
I found a driver for unipolar motors that used the l297 and the designer came up with a separate clock that was adjustable to help reduce the frying noise (see attached, not finnished tho.) I believe the noise is a result of the chopper cuircuit and clock freq. so by changing the freq you can make it less audible.
Thanks again.for the continuing support, I realise this is going on a bit now :beer:
tribbles
25-11-2009, 06:19 PM
For the resistors inputs to the 'HC14s that are pulled high, I'd use a resistor pack for that - makes the track laying a lot easier.
You've also got 3 enable inputs - any particular reason for having them individually enabled? I'd be tempted to have a single enable pin (which means you could have fewer 'HC14s - although unfortunately, you'd still need 3).
You could also not pair them up - the DIR would be the other way around (and CLOCK would be inverted), but the DIR can be corrected at the other end (i.e. how you wire the motors) - and the CLOCK probably wouldn't hurt. In fact, EMC2 allows you to invert the DIR should you need to (and I'd imagine Mach3 would too).
Ross77
30-11-2009, 11:34 PM
Jason has done an excellent job of the PCB, it even fits on a 100x80mm board, just need to to sort out the ground planes and star earthing then it finnished. :beer::beer::beer:
Heres the latest version of the BOB, think I've got a bit carried away and may have to bring it back to basic's. maybe put the 4th axis and Aux1 on a separate board as well. I'm a bit worried that ive mixed up the values on the optos and inverters so wont get the correct voltages :whistling:
mcooll
19-01-2010, 12:20 PM
waiting report from someone that built the driver by the diagram
Ross77
19-01-2010, 08:51 PM
No not yet I'm affraid. I've got all the parts be no time at the mo. I hope to start in a few weeks. The circuit above has been simplified a bit but I will post all files once I know it works.
Ross
paul.hunaban
28-03-2010, 10:33 AM
Ross, this is an extremely interesting thread I’m currently looking to do the same, have you made any progress ? do you have any more files for all to ponder over ?
Ross77
28-03-2010, 12:51 PM
Hi Paul. progress has ground to a halt at the mo due to lack of time and the fact that I didnt want to be testing drivers and setting up a new machine at the same time so I bought some. (probably cheaper than building them:heehee:)
I will definatly be working on them at a latter date as I have a few more machines in the pipeline and it would be a same to waste Tribbles and Irving's time as they have been a great help (umm.... ok designed it for me:smile:) . in the the mean time I'd be more than happy to pass all the info over if you want to continue, but remember it is untested and the code for the pic has to written for the idle time current reduction to work.
Good luck
paul.hunaban
28-03-2010, 01:21 PM
Ross, Many thanks I'll have a look
By the way what drivers did you go for? I trust they must be at least 4amps.
Regards Paul
Ross77
28-03-2010, 01:32 PM
They are the PM 542 from Zapp. 4.2amp, optically isolated inputs and microstepping for £35
ionut22
01-10-2010, 03:55 AM
Hello, i am new on this forum and i also build this interface and driver.
I put the schematic that i use. It is inspired by http://www.cnc-dag50.it/content/view/23/42/.
I prefer to work witout PIC because i think that L297 have all to work well.
About breakout board i do with the same Ic hcpl2630 but i don't undestand why you use after 2630 another Ic.
I put also my schematic and pcb made in DIP Trace(it is free version).
I want to make an image and reconfigure my cnc driver.
Thak you
kukatkoo
22-02-2014, 01:07 PM
Hi! What code is in this pic 12F683?
I make dps from Ross77, good and nice job :). Now I need only binary file or c++/asm code for it. Anybody help me with it?
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.