Go Down

Topic: Approve/Amend Circuit for Shift Register (Read 4778 times) previous topic - next topic

Nishant_Sood

Jan 29, 2012, 02:06 pm Last Edit: Jan 30, 2012, 08:14 am by NI$HANT Reason: 1
The circuit uses a CD4021BCN Shift Register, Im trying to get info from register that which switch on the bike was clicked ,as my bike has a 12v 9amp's battery i have used 7805 voltage regulators instead of voltage dividers here , please take a look on this circuit:



I have connected all unused pins to GND leaving pin 11 which i'm not sure whether i should connect to gnd to pull them down or not.
"Real Men can Accomplish  Anything"

- skype : nishants5  
ਫ਼ਤੇਹ ਕਰੁਂ!
www.winacro.com

MarkT

Can't read the pinouts from that image - biggerer please?
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

ajofscott

Just use a ULN2803 and use pullups from the arduino +5. The ULN2803 will accept up to 20VDC as an input.

MarkT

Are the incoming signals logic (ie fast-switching, either high or low) or some analog varying voltage?

If the latter you need schmidtt-trigger inputs to tame them.

If you are running your logic circuit at 5V I recommend the 74HCXXX series, much easier to source these days than old-fashioned 4000 series.
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

ajofscott

Mark he's using 7805 regulators as logic translators, hence my suggestion to use the darlington array as a level translator.

MarkT

Either isn't really up to logic speeds and might require schmidt-trigger inputs to follow.   resistor dividers into a schmidt-trigger would be cheaper/simpler?
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

ajofscott

the ULN2803 is same cost as a trigger, and has a equal or greater odds of being in his parts box already and has usability for driving relays/lamps ect.

Nishant_Sood

#7
Jan 30, 2012, 08:05 am Last Edit: Jan 30, 2012, 02:41 pm by NI$HANT Reason: 1
Thanks Guys for replying here is the imageshack link http://img703.imageshack.us/img703/5736/shiftregisterschem2.jpg for the image and i would like to stick to this shift register only as i have to get a ULN2803 will apply in another application of mine that will be similar but then i'll use the ULN2803, please simply tell what to add or deduct from this circuit as per the following description?

The inputs would not be that fast switchable as they would be from bikes indicators and from neutral and ignition on/off switch so they will just receive that 12volt DC(9 Ah Battery) from the battery when the switch is at the desired position so NO measurement of voltage in analog etc just need to note that whether the current is on the pins so as to trigger desired action which will be to show some image on the LCD.
"Real Men can Accomplish  Anything"

- skype : nishants5  
ਫ਼ਤੇਹ ਕਰੁਂ!
www.winacro.com

MarkT

I think the simplest solution is resistor divider per input signal, say 18k from input to shift-register pin, 10k from shift register pin to ground.

That should reduce anything in 12--14V range down to a logic HIGH level at 5V.  Also the 18k resistor provides reasonable protection against over voltage spikes etc.

Ideally the shift register parallel inputs would be schmidt-trigger, but clearly you aren't expecting a high rate of transitions so we can ignore the niceties of switching transients in practice...

Remember its easy to reduce a voltage with a resitive divider circuit, harder to level shift to higher voltages.
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

Nishant_Sood

Thanks Mark T as per your resistance divider circuit i have made the circuit please check it , also note as im using the parallel input to serial output i have simply linked the pin 11 to ground
"Real Men can Accomplish  Anything"

- skype : nishants5  
ਫ਼ਤੇਹ ਕਰੁਂ!
www.winacro.com

CrossRoads

Why do you have power for the device going thru an LED?

Input Voltage (VIN) (i.e. signals) are supposed to be in the range from  ?0.5V to VDD +0.5V

http://www.synthdiy.com/files/2006/CD4021BC.pdf top of page 3

With the LED, you're power source is now limited.
You'll damage the  input pins to the chip that way.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Nishant_Sood

Thanks for the comment Robert Sir,I installed that LED in there to indicate the power is in there nothing else, ok as you say i will remove the LED from there and what about the other linkages ,Are you fine with the rest of the circuit?
"Real Men can Accomplish  Anything"

- skype : nishants5  
ਫ਼ਤੇਹ ਕਰੁਂ!
www.winacro.com

CrossRoads

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

MarkT

Supply pins need the right voltage and need to be decoupled (never omit this for logic chips).  0.1uF near the chip should do it.

Haven't checked the full pin out, but I think you should test this circuit out.  First double-check all the connections go to the right pins (you should always double-check a circuit when wiring it up, its too frustrating and costly to blow chips up because you rushed and made a silly error - (I've blown one up in the last year and still am annoyed at myself!!)
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

Nishant_Sood

#14
Jan 31, 2012, 05:29 pm Last Edit: Jan 31, 2012, 05:42 pm by NI$HANT Reason: 1
OK so finally 0.1 uf capacitor on +5v power rails DONe! and yes i fired an ATmega168 when i was trying to load Bootloader onto it using a parallel programmer .

so the ultimate final circuitry becomes:
"Real Men can Accomplish  Anything"

- skype : nishants5  
ਫ਼ਤੇਹ ਕਰੁਂ!
www.winacro.com

Go Up