How much current from a shift register?

AllanBertelsen

Senior Member
I need help to read a datasheet.
I am building a light seeking robot inspired by a resent tread in this forum.
I want 08M to run L293B (H-bridge). For that purpose I need 4 digital outputs. I need to read LDR's via 1 ADC input. I need to read two or more contacts. Here I can us 1 ADC input as I will use resistors to identify the contacts.
4 outputs and 2 inputs is more than 08M can handle by it self.
I got a TC4094BP (8 stage shift and store busregister). This will give me 8 output using 3 PICAXE outputs.
Using 3 outputs on 08M leaves only one ADC-input where I needed two.
Now the question is. Can I use the outputs from TC4094BP as power supply for the LDR's and the resistor/button matrix and then read both – one at the time – with the remaining ADC-pin?
I have been reading the datasheet for TC4094BP. I don’t know how to see how much current I can use from the outputs. Can anyone help me?

EDIT:
This is a part of my setup:
<code><pre><font size=2 face='Courier'>

.______.
| |Out1-------LDR-----.----LDR--- grnd
| 4094 | |
| | |
| |0ut2---btn matrix--+---------- ADC pin
| |
|______|

</font></pre></code>
When Out1 is high and Out2 is low I will read the LDR's.
When Out2 is high and Out1 is low I will read the Resistor/button matrix.
I know there should be a couple of diodes in the diagram to.


Edited by - AllanBertelsen on 04/06/2006 22:02:00
 

Dippy

Moderator
The MC and CD versions look fairly similar, check out:
http://www.onsemi.com/pub/Collateral/MC14094B-D.PDF
Won't be identical obv but good ballpark as i couldn't find a 'TC' version.
 

AllanBertelsen

Senior Member
It can be faound here:
http://www.ortodoxism.ro/datasheets/toshiba/115.pdf
<A href='http://www.ortodoxism.ro/datasheets/toshiba/115.pdf' Target=_Blank>External Web Link</a>
 

AllanBertelsen

Senior Member
Thank you Dippy, you are always so kind. I see that DC input Current is 10 mA. Is that the information I need? Or is it Leakage Current and what is Quiescent supply current?
 

Dippy

Moderator
Mmmm.... ( a grin).
On that Data Sheet look at page 4.
You have Output High Current Ioh and Output Low Current Iol in mA (about a third of the way down the page) at several different example supply voltages Vdd.

The 10mA value is the abs max val. Then at the bottom of page 4 you have the quiescent value - which is the current that the chip itself uses excluding all your loads and operation - your 'baseline' current so to speak.
 

AllanBertelsen

Senior Member
I have been comparing a number of datasheets and found that IOH equals Output Drive Current Source and IOL equals Output Drive Current Sink. For TC4094BP the value for IOL=1.2mA and IOH=-1.0mA. According to L293B datasheet my TC4094BP would be able to drive the L293B. But what about the LDR's. I made a circuit on my breadboard with a 08M. Two LDR's in series for +V to 0V. I connected the ADC-pin to a point between the two LDR's. I put a meter between 5V and the first LDR. I measured 12 mA. But is this the correct way to make this measurement? And if this is the case, can a single added transistor make the power supply for the LDR's?

-IOH Value edited

Edited by - AllanBertelsen on 05/06/2006 10:23:43
 

AllanBertelsen

Senior Member
Sorry Dippy. I did not see your reply before I posted my last reply. Thank you for the explanations. I'm beginning to learn this art of reading datasheets to. There is still the LDR measurement question to be answered.

Edited by - AllanBertelsen on 05/06/2006 10:18:02
 

AllanBertelsen

Senior Member
Can this be done?
<A href='http://www.ab-it.dk/images/robot.gif' Target=_Blank>External Web Link</a>
I got som dalington I could use for transistors.
Can ADC Pin read the two potential divider one at a time by letting only one of the outputs be high?
 

Dippy

Moderator
I've only had a quick look as I have caught flu, but I reckon you'll get some funny results. I can see that you're trying to do lots with a few pins.

BUT are you SURE you want to use this method? I applaud your attempting it, but wouldn't an 18X be a lot simpler. You could end up with all sorts of output confusions whilst clocking this SR chip especially while you're shifting data in.

Are you trying to:-
A) Measure the LDR values separately or as a 'bridge'?
B) Measure the push-buttons using the old res+ADC trick?


I think you will need a bit of a rethink if that is the case. For a start there's a permanent route via an LDR to ADC. You'll have to redesign your switching. You don't have to use Darlingtons, in fact I wouldn't. A BC182 or similar with a slightly lower base Res would be fine. BUT you will have to think about your switching a bit more first.

Just one little note concerning LDRs. If this device is going to be used in low light the LDR res might get too high for reliable ADC readings. Be aware.

After all that, it'll be quicker to breadboard it. I'm off to get sympathy from the Wife now, cough, splutter...
 

hippy

Technical Support
Staff member
How about a simple 1-of-N decoder and some diode blocking, which will allow multiple LDR's or buttons to be read ...<code><pre><font size=2 face='Courier'>.-------. _
| | _|_|_
| Q7 |----|&gt;|----O O----.
| | ___ |
| Q6 |----|&gt;|----|___|----{
| | |
= = =
| | ___ |
| Q0 |----|&gt;|----|___|----^---.----&gt; ADC
| | .|.
`-------' | |
|_|
|
--^----- 0V </font></pre></code>

Edited by - hippy on 05/06/2006 22:56:11
 

AllanBertelsen

Senior Member
Thanks Dippy &#8211; you got my sympathy to. Get yourself a hot toddy. And thanks to Hippy to.
What motivated me for seeking a solution as this was that I purchased five 08M. I got the 4094 from a dead video machine. The idea for the LDR's in series was that readings below 127 would tell that most light is received by LDR 1 and opposite if readings are above 127.
But I can see what Dippy says. I got the switching all wrong. The switching should isolate the two potential dividers from each other. As I believe that the output from 4094 would not provide enough current for the potential dividers, I looked at page 5, section 3 of the PICAXE manual to get a recipe for more current. But I have very little experience in these matters. The transistor solution does not provide a 5V terminal for what I want. It's a 0V terminal. Would a PNP transistor do a difference to the NPN transistor?
 

AllanBertelsen

Senior Member
Hi again
I think I found an answer for the last question. Gosh it takes a lot of time to find answers when you are new to these matters.
<A href='http://www.rason.org/Projects/transwit/transwit.htm' Target=_Blank>External Web Link</a> seems to provide the answers.
Just to close this tread.
 
Top