Author Topic: Cant figure out CD4538  (Read 1060 times)

0 Members and 1 Guest are viewing this topic.

Offline 3dBiTopic starter

  • Contributor
  • Posts: 13
  • Country: lv
Cant figure out CD4538
« on: March 01, 2022, 09:57:39 pm »
Cant figure out CD4538. Problem is in highlighted section, it should give single pulse on start up and that it. Rest of the circuit works fine - when "tacho" goes high, it turns on relay for 2.2 seconds. Cant get first impulse on power on to work. What did I do wrong here?...  :-//

1427758-0
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5878
  • Country: de
Re: Cant figure out CD4538
« Reply #1 on: March 01, 2022, 10:33:07 pm »
Why do you think it would give a pulse when powering up? Nothing in the datasheet suggests that. On the contrary:
"On power up the IC is reset." (from data sheet).
« Last Edit: March 01, 2022, 10:36:56 pm by Benta »
 

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 1210
  • Country: pl
Re: Cant figure out CD4538
« Reply #2 on: March 02, 2022, 12:09:46 am »
If I understand your intention correctly, you expect that ¬CD and A go high on power up, A triggers the pulse which is not inhibited by ¬CD. However, that means that three separate events occur nearly simultaneously:
  • Powering on
  • ¬CD going high
  • A going high
In your circuit they happen in an unpredictable order, which means you have a race condition.

Note (added after sending this post): I missed that CD4538 triggers on edge, not level, which may make predicted outcome differ from what I’ve written below. However, the general message the post conveys still holds.

From 6 possible orderings:(1) 1 is guaranteed to produce a pulse, 2 are guaranteed to never do that, and 3 have behavior not defined by the datasheet:
Code: [Select]
P C A   ✓
P A C   ✗
C P A   ?
C A P   ?
A P C   ✗
A C P   ?
(P: power; C: ¬CD)
The chip must be first powered, then ¬CD must go high, then A may trigger the pulse. If A comes before ¬CD, it will be inhibited or produce some short glitch. If power does not come first, the datasheet is not telling anything about the behavior.

All six possibilities in diagrams:
Code: [Select]
    |   ______________
PWR |__/
    |     ____________ . . .   ok, powered on, ¬CD not inhibiting trigger
¬CD |____/
    |        _________
  A |_______/
 
    |   ______________
PWR |__/
    |        _________ . . .   ¬CD still inhibiting while A triggers
¬CD |_______/
    |     ____________
  A |____/
 
    |     ____________
PWR |____/
    |   ______________ . . .   unspecified
¬CD |__/
    |       __________
  A |______/
 
    |     ____________
PWR |____/
    |        _________ . . .   unspecified, but likely ¬CD will inhibit A
¬CD |_______/                  or only a tiny pulse will appear
    |   ______________
  A |__/
 
    |            _____
PWR |___________/
    |        _________ . . .   unspecified
¬CD |_______/
    |   ______________
  A |__/

    |            _____
PWR |___________/
    |   ______________ . . .   unspecified
¬CD |__/     
    |      ___________
  A |_____/

There is also one more thing to consider. Since you are using two parts of a single chip and one is fed to the other, it’s possible that IC1A generates a pulse, but a race condition occurs at IC1B. For similar reasons: it may be not fully powered yet or it’s own ¬CD may still be not high.


(1) More if the chip would not be able to handle simulteanous changes in signals. But, given its nature, it’s a reasonable assumption that it can deal with them just fine.
« Last Edit: March 03, 2022, 11:48:40 am by golden_labels »
People imagine AI as T1000. What we got so far is glorified T9.
 

Offline 3dBiTopic starter

  • Contributor
  • Posts: 13
  • Country: lv
Re: Cant figure out CD4538
« Reply #3 on: March 02, 2022, 03:32:50 pm »
Well, I presumed when eventually first sections CD, A and B are high, then it should trigger. My LTSpice simulation of circuit also worked good. If I tie externally TACHO to +12V and do power up, trigger on startup is successful.

What can I do to fix this?
« Last Edit: March 02, 2022, 03:34:51 pm by 3dBi »
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5878
  • Country: de
Re: Cant figure out CD4538
« Reply #4 on: March 02, 2022, 05:54:44 pm »
Why is this initial pulse even necessary?
If it's a tacho you have a steady pulse train coming in. I don't understand the requirement.
 

Offline 3dBiTopic starter

  • Contributor
  • Posts: 13
  • Country: lv
Re: Cant figure out CD4538
« Reply #5 on: March 02, 2022, 09:34:46 pm »
Idea is for controlling added custom low pressure fuel lift pump for custom tuned 1.9tdi diesel engines, with bigger turbos, injectors etc on old cars like Audi 80 A4 A6, VW's etc... To help get fuel to main pump, that does high pressure stuff. Not needed on stock car. First pulse is when you turn ignition key on, to pump any air out from fuel lines and get lines filled with fuel. Pump stays on for max ~2.2 seconds on single pulse. It's not a hard requirement, but it is a nice to have. Especially when you run out of gas, tank empty. You dont have to burn starter for main pump to get fuel from refilled tank, just cycle ignition key a few times. Some much more modern Volvo's should have this thing, because it is impossible to bleed air with high pressure pump alone. If you run out of gas - get towed to service, even with refilled tank. Stupid AF. When starter kicks in and engine is running tachometer pulses comes in - pump is fully on non stop, CD4538 being re-triggered all the time. Turning it off with engine is no issue, because pump and controller power is lost with key turn to off position.
« Last Edit: March 02, 2022, 09:36:33 pm by 3dBi »
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5878
  • Country: de
Re: Cant figure out CD4538
« Reply #6 on: March 02, 2022, 10:03:56 pm »
I think you need to rethink this application. The connection between tacho and fuel pump is... well.

 

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 1210
  • Country: pl
Re: Cant figure out CD4538
« Reply #7 on: March 03, 2022, 12:02:54 pm »
3dBi: I made a slight mistake in the post above. The A input triggers on edge, not level, so some specific outputs may be different. But the general message still holds: a race condition is present.

If you insist on using CD4538, you may try adding a resistor and a capacitor on the A line, so the signal is delayed a bit:
Code: [Select]
           Rd
V_ign o--/\/\/---o-------A[CD4538]
                 |
                 o--/\/\/-.
                 |   Rb   |
             Cd ---       |
                ---       |
                 |        |
                 V        V
Rd/Cd introduce a slight delay. Rb is a bleed resistor (1MΩ or so), so the capacitor is discharged after ignition is off. A bit of experimentation needed to tell, what values work. Will not work at all, at least not reliably, if CD4538 can’t deal with slow edges. The datasheet tells nothing about that. A Schmitt trigger may be required to address that issue.

You may also take advantage of low standby current of CD4538: in two dozen nanoamp range. So it may be permanently powered on, with ¬CD kept high. But that has two issues. First: it’s a typical value, not the maximum one. The maximum is in 1000× of that. Which is still not that much if you use your car regluarly, but also not something to completely ignore. For production you would need to test each device and discard those, which draw too much energy. For single implementation it’s of less concern, since most chips will be near the typical range, but you may get unlucky. The second issue is: voltage regulator will take some current too. So unless you already have that available and always on, this solution is a no-go.

But I would support Benta’s idea to choose a different solution.

Also, since this is automotive, remember that all lines — inputs, power supply and outputs — may see a lot of noise, including high voltage spikes. The design should take that into account.
« Last Edit: March 04, 2022, 12:04:25 am by golden_labels »
People imagine AI as T1000. What we got so far is glorified T9.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf