585,886 active members*
6,214 visitors online*
Register for free
Login
IndustryArena Forum > CNC Electronics > CNC Machine Related Electronics > What chip(s) do I need for binary to pulse stream conversion ?
Page 1 of 2 12
Results 1 to 20 of 34
  1. #1
    Join Date
    Jun 2005
    Posts
    1425

    What chip(s) do I need for binary to pulse stream conversion ?

    As an alternative method of hitting my head against a brick wall, I'm trying to build from individual logic chips a circuit to use a keypad input, memory card store, then clock controlled output circuit to control a stepper motor.
    Don't want to explain why just yet, as the results will be hilarious if it works, but the joke will fall flat if it doesn't !

    The part that's holding my design of the circuit at the moment is how do I convert a binary number(currently only 4 bits, but might expand to 8) to a steady pulse stream, where the number of pulses will equal the value of the binary number, multiplied by a constant.
    For example -
    input 0101, output = 5 x 28 = 140 pulses
    input 1011, output = 11x 28 = 308 pulses
    where the constant = 28 in this example. (Once set up, the multiplier doesn't need to be changed.)

    I thought it might need something like a DAC, but possibly not, possibly several chips to do it, but I'm having difficulty knowing what to call the process in order to search for the simplest answer.

    John
    It's like doing jigsaw puzzles in the dark.
    Enjoy today's problems, for tomorrow's may be worse.

  2. #2
    Join Date
    Dec 2012
    Posts
    569
    Quote Originally Posted by greybeard View Post
    As an alternative method of hitting my head against a brick wall, I'm trying to build from individual logic chips a circuit to use a keypad input, memory card store, then clock controlled output circuit to control a stepper motor.
    Don't want to explain why just yet, as the results will be hilarious if it works, but the joke will fall flat if it doesn't !

    The part that's holding my design of the circuit at the moment is how do I convert a binary number(currently only 4 bits, but might expand to 8) to a steady pulse stream, where the number of pulses will equal the value of the binary number, multiplied by a constant.
    For example -
    input 0101, output = 5 x 28 = 140 pulses
    input 1011, output = 11x 28 = 308 pulses
    where the constant = 28 in this example. (Once set up, the multiplier doesn't need to be changed.)

    I thought it might need something like a DAC, but possibly not, possibly several chips to do it, but I'm having difficulty knowing what to call the process in order to search for the simplest answer.

    John
    sounds like fun! if you arent opposed to simulation before-you-build, try to get your hands on an old copy of circuitmaker. you could draw up as crazy circuit as you want in discrete logic chips and simulate it all in real time to learn and get it right, before you start soldeirng anything! or if there is another more modern simulator perhaps..circuitmaker was discontinued more than 10 years ago but its still a very nice tool for this sort of thing.

    you wouldnt use a DAC for your pulse generator, a DAC would be to generate an analog signal which represents the digital number on its input.

    theres many ways to skin the various logic cats, but one way to make your pulse generator would be to use a counter IC to count pulses from an oscillator of some kind (555, crystal osc, etc...). have another ic compare the output of the counter to some number which represents the "setting", i.e. 5 x 28. then when the counter equals the setting, have that ic inhibit an output buffer on the clock line to stop the pulse train. to start over, pulse the counter clear or reset line.

    remember the cardinal rules of discrete logic playtime:

    -put buffers caps across each chips power lines
    -make sure your power supply is the correct voltage, stable, and buffered
    -dont leave any logic inputs floating

  3. #3
    Join Date
    Jun 2005
    Posts
    1425
    Hi acannell,
    Thanks for the idea of circuitmaker - not one I've come across before, and sounds like something right up my street.
    I was brought up on descrete components, so integrated circuits were an amazing advance !
    However, basic logic circuits are still hiding somewhere in the old grey cells, so I'm tripping out on memory lane with this one.

    Thanks,
    John
    It's like doing jigsaw puzzles in the dark.
    Enjoy today's problems, for tomorrow's may be worse.

  4. #4
    Join Date
    Dec 2012
    Posts
    569
    Quote Originally Posted by greybeard View Post
    Hi acannell,
    Thanks for the idea of circuitmaker - not one I've come across before, and sounds like something right up my street.
    I was brought up on descrete components, so integrated circuits were an amazing advance !
    However, basic logic circuits are still hiding somewhere in the old grey cells, so I'm tripping out on memory lane with this one.

    Thanks,
    John
    the little circuit i described wont run right off the bat, you'll need to do something to handle counter roll over. or maybe instead you could inhibit the clock output going to the counter instead ...etc..etc.those are the fun parts you get to figure out heheh

  5. #5
    Join Date
    Jun 2005
    Posts
    1425
    If I get it to work, you'll be the first to share the joke. Promise.
    John
    It's like doing jigsaw puzzles in the dark.
    Enjoy today's problems, for tomorrow's may be worse.

  6. #6
    Join Date
    Dec 2003
    Posts
    24221
    Any reason you did not go with a Micro? These modules would do all the above:
    Nigel's PIC Tutorial Page
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  7. #7
    Join Date
    Jun 2005
    Posts
    1425
    Hi Al,
    It could well be that in the long run I might go with some micro or other.
    However, at the moment, with my past knowledge waiting to be used, and a load of ics in the junk box, the challenge of working from scratch is fun enough.
    Learning to start from unknown territory is a step too far, at the moment.
    Regards
    John
    It's like doing jigsaw puzzles in the dark.
    Enjoy today's problems, for tomorrow's may be worse.

  8. #8
    Join Date
    Dec 2003
    Posts
    24221
    Fair enough!
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  9. #9
    Join Date
    Mar 2006
    Posts
    202
    As Al says, a microcontroller would handle this task effortlessly. Now getting up to speed with a microcontroller might not be quite so effortless... but the results of that effort are well worth it. ;-)

    Looks to me like a few 74LS191 chips could fit the bill nicely, along with suitable banks of dip switches to set the input parameters, a clock source and a few other gates to control the result. Use the counters to gate the clock so once the counters all reach zero, the clock signal is no longer output.

  10. #10
    Join Date
    Dec 2012
    Posts
    569
    Quote Originally Posted by greybeard View Post
    Hi Al,
    It could well be that in the long run I might go with some micro or other.
    However, at the moment, with my past knowledge waiting to be used, and a load of ics in the junk box, the challenge of working from scratch is fun enough.
    Learning to start from unknown territory is a step too far, at the moment.
    Regards
    John
    can you tell us a little more about your project? are you making a discrete stepper motor controller?

    actually a completely discrete circuit to do this sort of thing would be a whole bunch of fun in the simulator, you could really make it crazy and huge lol

    also a very dangerous way to waste tremendous amounts of time, hopefully i can steer clear of this lol

  11. #11
    Join Date
    Jun 2005
    Posts
    1425
    Quote Originally Posted by acannell View Post
    can you tell us a little more about your project? are you making a discrete stepper motor controller?
    I guess that is a fair description, where the 'discrete' also means portable, and to some extent autonomous. I'll go so far as to add that there will be several of them, and synchronized, but that's as far as I want to go at the moment.

    John
    ps thanks vegipete for your additional thoughts.
    It's like doing jigsaw puzzles in the dark.
    Enjoy today's problems, for tomorrow's may be worse.

  12. #12
    greybeard,

    It seems what you want is to produce a frequency proportional to a binary value; that's not real hard to do with 74HC logic and it's much easier to do with a $1 CPLD. Before I go into a long, boring description (along with logic diagrams and Verilog code), let me know if this is what you are needing.

    Mariss

  13. #13
    greybeard,

    It seems what you want is to produce a frequency proportional to a binary value; that's not real hard to do with 74HC logic and it's much easier to do with a $1 CPLD or PIC. Before I go into a long, boring description (along with logic diagrams and Verilog or .asm code), let me know if this is what you are needing.

    Mariss

  14. #14
    greybeard,

    It seems what you want is to produce a frequency proportional to a binary value; that's not real hard to do with 74HC logic and it's much easier to do with a $1 CPLD or PIC. If 74HC is your poison of choice, you can do it with 2 HC283s and an HC273 to get an 8-bit resolution frequency (255 evenly spaced frequencies). Before I go into a long, boring description (along with logic diagrams and Verilog or .asm code), let me know if this is what you are needing.

    Mariss

  15. #15
    Join Date
    Jun 2005
    Posts
    1425
    Hi Mariss,
    I had to giggle a wiki for CPLD, not having come across them, and got this -

    CPLDs were an evolutionary step from even smaller devices that preceded them, PLAs (first shipped by Signetics), and PALs. These in turn were preceded by standard logic products, that offered no programmability and were used to build logic functions by physically wiring several standard logic chips together (usually with wiring on a printed circuit board, but sometimes, especially for prototyping, using wire wrap wiring).

    So it seems I'm several generations behind, which is why, I suppose, I find it a little problematic making the mental leap from ics to microcontrollers.

    While my ic knowledge is there, and given a quiet mind I could drag it back to the surface, I am open to learning more, time not being on my side.

    I've been avoiding the jump to a readymade board like arduino/rpi/bbb as my puritanical work ethic doesn't want more 'bells and whistles' than I need, and putting together a minimalist circuit of ics fits my approach to life generally.

    You're not quite there with to produce a frequency proportional to a binary value, but rather a pulse train of constant frequency, with the total number of pulses equal to some predetermined constant, like 50, times a binary value, the binary being a 4-bit variable.

    I'm still wary of giving out too much detail yet as I can find no reference to what I want to do, and I'd love to be the first

    John
    It's like doing jigsaw puzzles in the dark.
    Enjoy today's problems, for tomorrow's may be worse.

  16. #16
    Join Date
    Nov 2008
    Posts
    110
    You will need 2 counters with configurable length - you can build them from binary counter (74HCT590) and binary comparator (74HCT688, or 2 pieces 74HCT85). Connect "A" side of comparator to counter, "B" side will be controlled from outside, "A>B" output in unit 1 (prescaler) will reset counter, in unit 2 counter reset will be controlled from outside. First "configurable counter" will be used as prescaler - configure "B" side to "constant-1" (jumpers). Output of this unit will be counted in second counter - his "B" side will be set to the requested value (probably held in 8 bit partallel register (which one - depens on how you get your "count" - 74HCT595 for serial input). Build impuls generator with desired frequency (for example use 74HCT14 and some capacitors and resistors). AND (or NAND - 74HCT00) output from comparator in second counter and output from pulse generator - connect this signal to input of first counter (prescaller) and to output of whole device. Every time new "count" arrives - reset both counters.
    Or simply buy arduino (MSP430 launchpad or whatever) and program the whole unholly mess into on chip

  17. #17
    Join Date
    Jun 2005
    Posts
    1425
    Thanks grg12.
    I'll need pencil and paper to follow that, but looks good after my second reading.

    John
    It's like doing jigsaw puzzles in the dark.
    Enjoy today's problems, for tomorrow's may be worse.

  18. #18
    Join Date
    Mar 2006
    Posts
    202
    Can I ask some specific questions? (Well, of course I can, whether you can answer is a different story. ;-)

    Where does the predetermined constant come from and what is its range? Would an 8 bit DIP switch work? (values 0 to 255)

    Where does the 4 bit variable come from? (Keeping in mind that you suggested 8 bits could be desirable.) Maybe the operator turns a knob?

    How fast should the k x n pulses be? Adjustable or fixed?
    What sort of duty cycle? Adjustable or fixed?

    What input signal to get things started?

    What happens at the end of the pulses? Nothing until a new input signal? Pause and repeat for ever?

    Depending on where the configuration comes from, something as simple as an 8 pin microcontroller could handle this job.

  19. #19
    Think of a CPLD (or FPGA) as a collection of gates and D-Flops that you can interconnect in any way you want to while MCUs are sequential machines that execute a list of instructions. A problem with 7400 series logic is it's fast becoming obsolete; at one time there was over 500 different logic devices. Now the series has shrunken to less than a dozen unique functions, primarily inverters, buffers and D-Flops. The reason is CPLDs and FPGAs have replaced discrete logic devices.

    Mariss

  20. #20
    Join Date
    Dec 2012
    Posts
    569
    discrete logic devices are far supreior in this applicaiton, you all are crazy. first of all, you can get radiation hardened logic IC's by spending a few hours digging through your nearby out of business electronics surplus store, where you will happily pay a 500% markup for anything you buy versus digikey, and with the added bonus that the pins will be bent and it will probably be an obsolete version from the mid 80's. and why would you want to use an 8 pin mcu when you can use the heat from a few dozen TTL chips to warm your hands on a cold winters night?

    clearly obsolecense and keeping up with the joneses are primary factors to consider here, you may want to call your applications engineer at TI and have them come over to your garage and make sure you use parts with the proper production status so that your team of buyers wont have any issues in the near future. yes, its a prototype you are putting together in your spare time, but you cant be too careful.

Page 1 of 2 12

Similar Threads

  1. step pulse and pulse direction
    By peregrinus in forum Mach Software (ArtSoft software)
    Replies: 0
    Last Post: 03-21-2011, 02:04 PM
  2. Step pulse/Dir pulse question
    By neurofen in forum Mach Software (ArtSoft software)
    Replies: 7
    Last Post: 02-23-2011, 06:02 PM
  3. Need Binary DNC
    By K&T EB in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 3
    Last Post: 01-23-2010, 05:10 AM
  4. why pulse the servo drive? (why not ASCII/binary it?)
    By JasonCampbell in forum Servo Motors / Drives
    Replies: 8
    Last Post: 09-27-2007, 05:49 AM
  5. Unfit Pulse Of Pulse Coder Alarm
    By Crashmaster in forum DNC Problems and Solutions
    Replies: 2
    Last Post: 04-23-2007, 03:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •