Counter output is pulled low when connected to NOR input - Page 1
Forum section: electronics / beginners

author: Eggord
author_rank: Newbie
timestamp: March 08, 2021, 12:04:33 pm
content: Dear All,i experience a strange problem with my small circuit.The idea is to increase a signal step-wise based on a external trigger (Both from a DAQ PCIe Card) till it is equal to the input signal. Kind of a inverse damping or up-swinging. The output goes to a motor driver. I need to do it because the signal is a bit too big at the beginning for the motor. But if i "slowly" increase the motor driving signal it can handle it.So i created a trigger driven voltage divider. I use a counter to change the voltage divider based on how many trigger pulses arrived. One counter output disable the counter itself then in a kind of feedback(NOR gate plus analog switch).The problem is that it doesn't disable the counter. When i measure the Q6 of the counter is constant pulled low when connected to the gate while all lower Qs(Q1 toQ5) are working. When cut the connection to the gate Q5 is working again.Their is no shortcut to ground the gate. I have no idea why this happens.I hope someone can help me. Maybe the overall circuit isn't good designed?Thanks!

author: jmelson
author_rank: Super Contributor
timestamp: March 08, 2021, 04:36:13 pm
content: 74HCT02 is not an XOR gate, it is a NOR gate. But, pins 1 and 2 are inputs, so it should not prevent the counter outputs from working.Jon

author: Benta
author_rank: Super Contributor
timestamp: March 08, 2021, 06:02:05 pm
content: Even for a simple circuit, I've seldom seen a messier schematic layout. It's totally unclear what the circuit is supposed to do, and what the second MAX323 does.

author: Renate
author_rank: Super Contributor
timestamp: March 08, 2021, 07:09:14 pm
content: Sorry, this is all a bit crazy.The big counter has no reset so it just goes 'round & 'round.Maybe you should consider controlling the motor current some other way?

author: Eggord
author_rank: Newbie
timestamp: March 09, 2021, 11:14:54 am
content: Hi,@jmelson: Thanks for pointing this out. It is a NOR. I corrected it. Yes indeed this shouldn't happen because thiese are two inputs. I thought maybe the chip is broken but replacing it didn't help. For me this makes absolutely no sense...@Benta: ok the schematic is not the best(i also forgot a connection)...I attached a second one. I hope this is clearer but i'm not sure how i can make it nicer. I don't know hat i can change except of changing some wires with global labels. If you still think it is messy could redraw the circuit and show me what i could have done better? I would really like to improve but just the comment that it is messy doesn't help me. I also added a hand drawing which should makes it easier understand the schematic.@Renate: True thanks for pointing it out. I added a new drawings. I hope they makes things clearer.If you think the hole idea is crazy and know a better way to achieve what i want please let me know

author: Renate
author_rank: Super Contributor
timestamp: March 09, 2021, 12:26:41 pm
content: So IC3 & IC4 are a latch.You shouldn't go mixing totem-pole regular logic with CMOS switches for no reason.If you want a latch, make one out of two NOR (or NAND gates).https://upload.wikimedia.org/wikipedia/commons/a/a8/SR-NOR-latch.pngAlso, you don't indicate where any output of this latch is going.There is no provision in this circuit for when the motor stops and when it wants to start again.What kind of motor or motor driver takes a single phase pulse where the amplitude matters?Why don't you just set the current limit on the driver?Whatever is generating the pulses in the first place has a better overview of what it's doing and any such ramping up would be better done there.If this idea really wanted to be pursued a small µC would do the job better. ATTiny85 = 8 pin DIP.It could figure out that a lack of pulses meant the motor was stopped and prepare itself for another ramp up.It could better allow the ramp-up time to be more finely adjusted than just binary powers.

author: Eggord
author_rank: Newbie
timestamp: March 09, 2021, 06:48:05 pm
content: Oh yes. It is basically a latch. Thanks for pointing out! I should have seen this...I guess it is just because i first had the switch and added the NOR gate later..regarding output of the latch: I think it is there: CounterDisableTrig (global label)True there is no automatic provision. That's is why i added the manual button.I actually think i never mentioned how the signal looks like. It is not pulse (just the triggers are pulses). It is a voice coil motor (https://www.machinedesign.com/mechanical-motion-systems/article/21836669/what-is-a-voice-coil-actuator)Yes theoretically the DAQ board would be the first place but for couple of reasons it isn't that easy as it soundsSO i thought a small circuit can solve itI like the idea of the ATTiny85. I will will think about this. This would actually makes thinks even more flexible. But it would just replace the counter, gate and second switch, right? The voltage divider still has to be done with the switch?I would like to avoid that the signal will always be "processed" by the µC (just because, for what ever reason, if the chips fails and sends strange signals to the motor it can actually ruin a lot of work and cost a lot of money)