The death of combinatorial logic.

Not wanting to spend $40 bucks a robot on UCN5804B controllers I thought I'd make a controller with FETs and discrete logic, using the
circuit from kitsrus.com. It was only as I started laying out the tracks for the AND gates to modify the circuit so that it could idle without running power through the power FETs that I thought "This is crazy, 6 ICs to do the job of 2. I can run these FETs straight from a PIC".
So I ditched the XOR gates, the AND gates and the NAND gates with Schmitt triggers and designed the circuit round a single PIC that I'll get running with software.
Now what do I do with all my chips?
____________________________________________________ "I like to be organised. A place for everything. And everything all over the place."
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
I'd be interested : ) also can you tell or show us newbies the modifications to the circuit you mentioned?
Tim Polmear wrote:

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Well, I'm not sure if it's okay to distribute the original PDF with the circuit in it, but it's K179 Unipolar Steppermotor driver and the site credit is kitsrus.com, so see if you can google it.
If I'm very much mistaken, the 4 power MOSFETS are fed directly from the outputs of 2 RS flip flops. The FFs are updated in turn once every clock cycle.
Each FF drives 2 MOSFETS, one connected to Q and the other connected to Q-bar - (how *do* you type Q-bar?) so that when one MOSFET is on, the other is off. But when the one is off, the other is on, so at all times there are 2 MOSFETS on (one for each FF) and you're draining power with the wheels locked up unless you use another FF with an output enable line (which I haven't seen), or add some extra logic to intercept the signals to the MOSFETS so you can turn them all off.
Now you could do that with a high current MOSFET attached in series with the Motor Power line, but somehow that doesn't seem right. My first inclination was to plop a set of 2 input AND gates between the FF outputs and the gate of the MOSFETS, tying one input of each AND gate together to create and ENABLE line. When this ENABLE line was low, the signal from the FF would be blocked. Again, probably the wrong thing to do (?) And since I was creating a composite circuit to drive 2 stepper motors from the same board, that meant 2 AND chips.
Then I thought of using a tri-state buffer cause I've got piles of 'em and who cares if I smoke them on the breadboard?
Then I looked at the pin count and thought "nup".
I dunno if my new design is any good but I'll test it out and see how it goes.
On Sun, 30 Jul 2006 15:39:54 GMT, "Jason S. Mantor"

____________________________________________________ "I like to be organised. A place for everything. And everything all over the place."
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Tim Polmear wrote:

They go great with dip.
Seriously, if you can program a PIC or an AVR, there's no reason to use discrete logic. You still need power drivers, though.
-- Gordon
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Sun, 30 Jul 2006 08:56:45 -0700, Gordon McComb

Do you mean the PIC can't drive a MOSFET, so I need an additional driver, like a bunch of bipolar transistors? Or do you mean I need a MOSFET? I was planning to run a set of IRF510s straight from the PIC, (that is from PIC to Gate). I haven't breadboarded the design yet so it still works, in theory ;) I don't know what the gate current would be at around 100Hz but surely not over 25mA!
____________________________________________________ "I like to be organised. A place for everything. And everything all over the place."
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Tim Polmear wrote:

When you said six chips I assumed you meant the standard method of using an XOR and a flip-flop package to clock the stepper. That's two chips, leaving four others which I assumed where you drivers and your AND gates. My point was that the drivers, the largest and probably most expensive part of the whole circuit, can't be avoided even with a PIC.
Whether or not you need some intermediate drivers for your output transistors depends on your design. Properly designed your PIC should be able to directly drive most MOSFETs. For smaller stepper designs, a simple ULN2003 package is enough -- with three transistors left over you can use for something else.
-- Gordon
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Mon, 31 Jul 2006 08:02:42 -0700, Gordon McComb

Thanks Gordon. I might see about some arrays of some description. 2 chips for the power stage vs 8 transistors hmm. I dunno though 5.6A is a lot of safety margin.
____________________________________________________ "I like to be organised. A place for everything. And everything all over the place."
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

I only recently started looking into microprocessor technology because of a new interest in robotics and was amazed to find how powerful and cheap the embedded processors are now. It was back in the day of the 6800 and Z80 that I was last paying any attention to the hardware. When I saw how small, and cheap, and simple they were now, I too had the same thought that there's little point in using digital logic gates in typical circuits anymore. You can buy a complete computer on a chip for less than 10 bucks and write software to replace hundreds of digital gates and components. And they are programmable so you can easily change the design without changing the hardware.
I had another similar experience about 10 years ago when I started to design custom hardware for doing DES hacking just for the fun of it. After working out the timing with TTL gates, I realized that the custom TTL hardware wouldn't be able to run any faster than a well optimized software implementation on a PC. The PC processors even back then were so well optimized and pipelined that they could outperform hard wired TTL gates. Yet another realization how times were changing.
--
Curt Welch http://CurtWelch.Com /
snipped-for-privacy@kcwc.com http://NewsReader.Com /
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Curt Welch wrote:

And if the MCU still won't cut it, say for speed reasons, you can use an CPLD/EPLD, which is what I'm currently teaching myself. See for example the EPM3064, available from Digikey for $2.10 in singles, PLCC44. It's just a pity that they don't package some of these with fewer pins - say a 20 pin TSSOP or even DIL. Yaay, state machines and counters at 200MHz for $2.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
sorry, is it a stepper motor you wanted to requence?
you only need 3 chips to sequence 2 motors (7474 x2 and 7486)
but I agree you can do a lot more with a microcontroller, which puts me in the same situation, literally hundreds of logic chips that are much bigger and limited than a microcontroller, its to the point where I can barely put togethor a 555 circuit without thinking about the stability I would get with a tiny13 and crystal, along with being able to do much more than simple timing. If you have the tools and can bang off the code fast, its no competition.
dan
Tim Polmear wrote:

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Yes, unipolar stepper motors for the drive units. Sure, 3 chips would do it. The design I was using used CMOS chips and the Schmitt trigger NANDS were used to clean up incoming signals. But surely you're still going to have a circuit that's running 2 MOSFETs at all times? Batteries don't last long under those conditions :(
wrote:

____________________________________________________ "I like to be organised. A place for everything. And everything all over the place."
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Tim Polmear wrote:

Designers still use hardwired logic, but not with 74xx TTL. Everybody uses FPGAs now.
                John Nagle
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
wrote:

Oh, I have to admit it. I haven't paid any attention to FPGAs and the like. The closest I ever came was learning a bit about PLAs in university, long ago now (how long? We used Mac Classics in the simulation lab).
____________________________________________________ "I like to be organised. A place for everything. And everything all over the place."
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

The chips have drivers that maybe can be used by wireing them in parallell?
Anyway MCU's or software in general have a general flaw in that deterministic or highspeed latency is not possible. However for many applications it simple doesn't matter.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Try telling that to any manager who is a hardware person...there are many products using combinational logic because that is what the boss wants.
TMT
snipped-for-privacy@spamnuke.ludd.luthdelete.se.invalid wrote:

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Hopefully the reality of customer jumping ship will enlighten him ;)
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
The customer never knows....and the price for the product is raised to cover the additional cost.
TMT
snipped-for-privacy@spamnuke.ludd.luthdelete.se.invalid wrote:

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.