Delorean project

Alec_t

Joined Sep 17, 2013
11,890
(i'm wondering how i can do that myself, and maybe even simulate my whole designed circuit in one go!?).
Download LTspice (it's free from Linear Technology). A steep learning curve, but well worth it. The standard download includes example circuits. Plenty of online tutorials, too. And there is a Yahoo LTspice user group for free advice and free downloads of many spice models.
 

Thread Starter

Rissy

Joined Nov 23, 2015
106
Thanks for that Alec. I'll take a look tonight after work.

On an update note: I've ordered a bunch of components to try and build Mike's last circuit example. I'm hoping to be prototyping within the week. If this one isn't going to do the job, then i'll order more components and try to build the 555 timer version next.

I'll keep those who are interested in the loop with my progress. :)
 

Alec_t

Joined Sep 17, 2013
11,890
Can I ask if there is a 4011 NAND in there I currently can't find, or is there a way of getting one from another library? (and how to add if this is the case)
The CD4000 library is one of many available from the Yahoo LTspice user group. Any .lib, .mod or .sub file can be copied to the LTspice ..../lib/sub folder. Corresponding .asy files can be copied to the ..../lib/sym folder.
 

MikeML

Joined Oct 2, 2009
5,444
how do you place voltage markers on your circuit like Mike did on his screenshots?
Do you mean "how do I name a node in the circuit"? (So you can refer to a trace in the plot by name)?

Click on the little box with the Letter A inside it.
 

Thread Starter

Rissy

Joined Nov 23, 2015
106
Hi Mike,

I mean that somehow, you managed to label "vin" etc on your circuit, and then managed to associate these names with the trace on the simulation. How'd you do that?

I've managed to source CD4000 library devices and added them. It seems you have to add each NAND individually though, not as a whole chip (collection of four at once). Is this correct?
 

Thread Starter

Rissy

Joined Nov 23, 2015
106
I have another question. I have a BC847A NPN transistor after a series of 8 configured NAND's (making up the logic I want within two CD4011B chips) and a 1K resistor.
When the result of the logic from the NAND's is 1, then you get roughly 3.6V out before the resistor, and about 750mV after the resistor.
When the logic from the NAND's is 0, then you get 9.52nV before the resistor and 28.5nV after the resistor.
This means that you're always getting this minimum value of 28.5nV into the BC847A NPN transistor (which i'm trying to use to switch about 14 volts through an LED. Even with such a small voltage, it seems that this is enough to hold the transistor open, allowing the LED to remain lit, even though I want it off by this point...!?

Any ideas how to fix this?
 

Thread Starter

Rissy

Joined Nov 23, 2015
106
...Actually, i think i'm having a blonde moment. DOH!

It's with reference to ground of course, so that's an indication that the transistor is closed, which is good. The LED would be off in this state. Forget my blonde question lol!

Can you not make this simulator flash lights and LED's on the screen according to their on or off states?
 

MikeML

Joined Oct 2, 2009
5,444
Hi Mike,

I mean that somehow, you managed to label "vin" etc on your circuit, and then managed to associate these names with the trace on the simulation. How'd you do that?
Click on the little box with the Letter A inside it. Type a legal node name in the dialog box, then
click on any wire to associate that node name with that node. After a sim run, you can plot any node, but only the named ones are very useful.

foo.gif


I've managed to source CD4000 library devices and added them. It seems you have to add each NAND individually though, not as a whole chip (collection of four at once). Is this correct?
Yes
 
Last edited:

MikeML

Joined Oct 2, 2009
5,444
....Can you not make this simulator flash lights and LED's on the screen according to their on or off states?
No,

To see the current in the LED, run the sim, then drag the cursor over the LED symbol. Note that the cursor changes to an ammeter, instead of a voltage probe. Left click, and the current through the component is added to the plot, usually with its own Y axis.


149.gif
 

Attachments

Alec_t

Joined Sep 17, 2013
11,890
It seems you have to add each NAND individually though, not as a whole chip (collection of four at once). Is this correct?
Correct.
Note:
The standard CD4000 library models assume Vdd is 5V. If you want to run simulations with other Vdd values you need the CD4000_v.lib library and you have to place a voltage source with its + rail labelled Vdd on the schematic.
 

Thread Starter

Rissy

Joined Nov 23, 2015
106
Correct.
Note:
The standard CD4000 library models assume Vdd is 5V. If you want to run simulations with other Vdd values you need the CD4000_v.lib library and you have to place a voltage source with its + rail labelled Vdd on the schematic.
oh right.

I wasn't aware of this. does this program not identify to you if your simulation runs the risk of destroying a component or anything like that then?

I've been running the CD4011 NAND gates on my simulation, with a direct 14V supply, and no ill-effect has resulted on the simulation. In real like, the chip can handle this, as long as the inputs are within +/-0.5V of the VDD supply voltage, so i'de never considered that I was doing anything wrong. (although i did note that the outputs from the NAND's seem to be a regulated 5V, which isn't a problem, as it's enough to trigger my transistor switch.
 

Thread Starter

Rissy

Joined Nov 23, 2015
106
No,

To see the current in the LED, run the sim, then drag the cursor over the LED symbol. Note that the cursor changes to an ammeter, instead of a voltage probe. Left click, and the current through the component is added to the plot, usually with its own Y axis.
View attachment 95341
Thanks for this Mike, I'd already discovered that, although i'll admit i've not made much use of it so far. You answered my question though. NO is the answer of whether you can get bulbs/lamps/LED's to actually light up on the simulation.
 

Alec_t

Joined Sep 17, 2013
11,890
does this program not identify to you if your simulation runs the risk of destroying a component or anything like that then?
No. It's quite happy to pass gigaAmps through components and gigaVolts across them :). It's up to you to monitor currents and volts and compare with datasheet limit values.
 

Thread Starter

Rissy

Joined Nov 23, 2015
106
I have a question then.

Using a CD4011BE (TI) chipset, if one input to a gate is an output from another gate (i.e. a regulated 5V), and the other input is from another place on the vehicle (running at 14V or so), is this gonna blow up my chip?

My understanding is that as long as the input is within 0.5V of the VDD, then you're ok, but how does it handle (or not handle) unbalanced inputs!?

Link to the Datasheet: http://www.ti.com/lit/ds/symlink/cd4023b.pdf
 
Last edited:

Thread Starter

Rissy

Joined Nov 23, 2015
106
if it can't handle that, then that begs another question. How can it cope with one input active and the other inactive?

i.e. one at 14V and the other at 0V?

It has to be able to cope with inputs switching on and off....
 

Alec_t

Joined Sep 17, 2013
11,890
1) The maximum recommended operating voltage for CD4000 series devices is 15V. Automotive environments are harsh and generate large voltage spikes (50V or so would be no surprise), so it's best to use a well-regulated and interference-suppressed supply (Vdd) of less than the maximum, e.g. 9V.
2) The gate input voltage should never go more than about 0.3V above Vdd or the IC will be damaged or behave erratically. If you have a 14V signal it would need to be attenuated to something less than Vdd.
2) The switching threshold of the gates is about half of Vdd.
 

Thread Starter

Rissy

Joined Nov 23, 2015
106
I've now put in a bunch of potential divider's to bring all the 14V down close to (within 0.5V) of 5V.

At 12V (ignition off), i'm expecting 4.57V.
At 14V (roughly with ignition on), i'm expecting 5.33V

So this means that ALL inputs, as well as VDD will be fed by the same value of voltage from outside of the chip, and this will be within the 5V expected outputs from the NAND gates themselves.

Is this acceptable? This should help reduce any spikes?

Or will I have to think about including something like this in front of all my potential dividers too?

http://www.ebay.co.uk/itm/10-x-STMi...Regulator-1-5A-12-V-3Pin-TO-220-/321923486764
 
Last edited:
Top