Delay in powering LCD (using 5V Relay?)

MearCat

Member
I have a 28X1 chip which drives a serial LCD (via Andersons #118 chip) but I want to wait a short while (around 10 secs) after bootup until the LCD actually has power applied to it.

The LCD power source is the same 5V as the PICAXE and I was thinking of using a 5V mini relay which is switched by an output pin on the PICAXE to turn on the LCD (draws ~100mA when on). So a few questions :

- Do I still need a transistor and diode etc (as per "Standard Circuits 3" section of PICAXE Manual 3 pdf) even though the PICAXE & LCD use 5V. Note : The LCD will never be turned off once it is powered on (until the entire cicruit is powered down)
- Is there a better way to do this than a relay (delay power-up of the LCD)?

Alan in Oz
 

moxhamj

New Member
A relay draws power all the time and this might be a concern if it is battery powered, but probably not if mains powered.
Yes, the transistor and diode are needed.
Is there another way? Yes, you could use high side switching. Use a BC549 to 'suck power' out of the base of a BC557 on the high side. Hmm - 100mA. Maybe use a BC328 instead. If you want more info on the two transistor 'high side switching' circuit pls sing out (I have to go to work now but could draw it up a bit later). It is a little tricky with the way the emitter works as it is sort of opposite to a BC549. But a simple circuit with just two resistors and two transistors.
 

westaust55

Moderator
Alan,

curious why do you need to 10 second delay?

I would think that the LCD screen should stay blank during that period unless you send data to the LCD and it not as if you will save a lot of energy in a 10 second period.
 

MearCat

Member
Alan,

curious why do you need to 10 second delay?

I would think that the LCD screen should stay blank during that period unless you send data to the LCD and it not as if you will save a lot of energy in a 10 second period.
The kit is installed in my car and powered by the accessories circuit. When the key is turned from Acc to ON, once in say, 20 times, the #118 serial LCD driver chip gets confused (I'm thinking it doesn't reboot properly once the car key goes from Acc to ON and back to Acc) and displays random text and win't process the serout command from the PICAXE. So I was hoping to delay the startup of LCD to prevent this. I know, I know - I should figure out what causing the random text or sort that out, but for now I need a workaround.
 

eclectic

Moderator
The kit is installed in my car and powered by the accessories circuit. When the key is turned from Acc to ON, once in say, 20 times, the #118 serial LCD driver chip gets confused (I'm thinking it doesn't reboot properly once the car key goes from Acc to ON and back to Acc) and displays random text and win't process the serout command from the PICAXE. So I was hoping to delay the startup of LCD to prevent this. I know, I know - I should figure out what causing the random text or sort that out, but for now I need a workaround.
Is the occasional reset anything to do with the
long initialisation time?

See
http://www.picaxeforum.co.uk/showthread.php?t=9809&highlight=#118+anderson


e
 

Dippy

Moderator
I'd be tempted to put a hardware startup delay for the whole PICAXE+LCD circuit if this is a problem.
There are a number of ways to do this.
A simple RC into a MOSFET might not be good enough as it wouldn't produce a consistent delay with rapid multiple on/offs of power. But then again it might be.

But well worth breadboarding a one or two tranny circuit to try it. A better job could be done with chips. Or even a hardware/software approach.
Quite a few options, so I'll leave it to the committee.

Alternatively, design a better power supply section as it could simply be a transient problem.

Maybe post your power supply schematic as a simple solution may be possible.

What level of electronic experience/knowledge do you have?
 
Last edited:

MartinM57

Moderator
..and now we find it's an in-car project ;)

@MC - you need a rock solid power supply sub-circuit in your overall design to deal with all sorts of car nasties. Search the forum for massive debates about it.

There is no reason to go off on a tangent of relays, transistor-powering circuits etc - they're just band-aids for (probable) shortcomings in your power supply.

It would be quite interesting to put a 'scope on the input voltage point of your board and watch what happens during cranking as well - it's surprising ... what you think of as a constant 12v from the battery is nothing like it. You can even see each starter motor rotation as a variation in the voltage (caused by the variable current taken by the motor as it turns).

As D says, post your PS schematic as a starter (pun intended)...
 

hippy

Ex-Staff (retired)
With you may find that switching the LCD power won't solve the issues you are having if the problems lies elsewhere, such as PICAXE being adversely affected which is more likely in automotive use. You really need to determine what the root problem is before trying to fix anything. You will also need to make sure that your system is robust enough to withstand issues which haven't shown themselves yet.

The usual caveats for using PICAXE in any automotive applications apply.
 

moxhamj

New Member
Re high side switching circuit, I was going to draw this up in Eagle but it has decided all the library files don't exist (again!). So to describe: BC547. 2k2 into the base. Emitter to ground. Collector to another 2k2 resistor and then the other side of that resistor to the base of a BC328. Emitter of the BC328 to the 5V supply. Collector of the BC328 to the LCD supply.

The confusing thing (for me at least) is that NPN transistors like the BC547 have the emitter going to ground. For me, that says the emitter emits something, ie current comes out of it to ground. But PNP transistors have current going into the emitter.

So I just remember it that NPNs connect the emitter to ground, and PNPs connect the emitter to the power supply. The little arrow on the emitter symbol of the transistor is the right way for indicating which way the current flows.

As for automobile use and things not starting up, well I think there are disclaimers about that in the picaxe manual. I think the disclaimers are there for a reason too. I've posted many times about my 08M engine cooling system running reliably now for 3 years, and that would cook the engine if it failed. Bog standard 7805 reg and not in a shielded box. On the other hand, I've build a number of picaxe circuits and whenever there is more than a few metres of cable going into the box, either for the power supply or to some pins, flouro lights nearby and/or pumps turning on nearby will reset the picaxe. Even when battery powered. So - I think all the comments about the picaxe not being suitable for mission critical systems (which probably includes cars) still stand. FWIW I've also had problems with other micros and flouros as well, and for these applications I've gone back to good old-school CMOS and TTL circuits. 4017, 4013, 4040 and 555 etc. (I wonder how many here can say what they do without looking it up *grin* ?)

LCD displays themselves can be fickle too, especially with RF nearby. I've even resorted to reset circuits based around 555s and CMOS counter chips just in order to reset everything from time to time.
 

nbw

Senior Member
The other option is if you must run it in your car, run it off AA batteries (joke). Seriously, echoing what dozens of others have found in the past - you do have to go to extra lengths to ensure your power supply in a car is clean.
 

MearCat

Member
Here Dr_Acula... Like this?



And for those interested, here is the power supply circuit :

 
Last edited:

moxhamj

New Member
Yes, that looks right. 328 and 547 have the same pinout CBE looking at the writing. Of course you can use a wide range of transistors as long as the currents are ok. Eg a 557 instead of 328 if the current is <100mA. I think the 328 is good up to about 800mA.
 

MearCat

Member
I have plenty of BC327 & BC337 transistors at home so I'll probably just use those. Basically same transistors just a higher current rating :)
 
Top