I just dont get it why they didnt mention to put transistors between it in the playground
Sadly it is not a very good example, you will note there is no resistors in although the text now tells you to do this after some badgering from a few members. The lack of resistors and overwriting of the outputs probably meant the display looked ok. There is a train of thought that goes, it is only a demonstration and people will not run it for long so overload dosn't matter.
However I think that it is important to get it right as people, like you, go on and use the circuit as a basis to expand into their own design. If you start off with the right idea you don't have to relearn old stuff.
Thanks everybody and thank you Mike for clarifying that out!
Based on your input and based on this schematic, I have created a new schematic for myself including the multiplex and transistors. The transistors used in this schematic is a '2N3904'. Could I also use this for my setup??
Also I would love to hear if I made a(nohter) mistake in my schematics!
The big block labaled transistors represents 6 more of the NPNs above?
You are missing the resistors between the arduino and the base pins as shown in the example you cite.
Need them to limit current out of arduino pin.
Yeah, that block should have represented 6 more of the NPNs like above. To be honest the new program I was using is frustrating as hell to work with so I just made it one block
Also thank you a thousand times for the ULN2803A tip! This will definitely save me time and wires! I'm now off to the store to buy the 4051 and the ULN
No, Ground is the pin that all emitters are connected to.
COM is the pin that would to go motor V+ if you had motors, or relay coils, etc.
You should be good as drawn.
My only reservations are all the sensors going into the 4051. These have to have an output that is less than 5V. If the output ever goes above this then it will fry something. Given that it is a 12V system there is a danger that this voltage will be present on the sensors.
Do not use a voltage regulator to cut down a signal from a sensor into an arduino, it is totally the wrong thing to do.
You need to use either a potential divider, transistor or opto isolator.
Take the sensor output put it through a 10K resistor into the base of a transistor. The connect the emitter to ground and the collector to the input. Finally in the software enable the internal pull up resistor.
You might also want to consider fitting decoupling capacitors (0.1uF) across Vcc and Gnd on each of the chips to prevent noise affecting operation of the signals. These should be fitted as near the chips as possible.
jack
The transistor will get the pull up it needs through the multiplexer.
If it were me I would also put a 4K7 resistor from the collector of the transistor to 5V but this is not essential. It is just it would make the transistor behave correctly even if it weren't switched through to the arduino.
I will also put the 4K7 resistor between it. Also I was reading that only the digital pins has pull-up resistors? So its wise not to connect it on pin #19 but on #13 and below?
No all the I/O pins on the processor have internal pull up resistors, even the analogue ones.
You can also put external pull up resistors on analogue inputs.
You can free up almost all the I/O you are using to drive the LED matrix with a MAX7219 or MAX7221 for each display.
Also, keep in mind that you are not expressly using 12V here. Most charging systems actually sit around 14.5V to 15.5V. Motorcycles use a stator and rectifier which doesn't work in exactly the same as the alternator in your car to generate power. You will have voltage fluctuations at lower RPMs with charging (15.5V) occurring after 5000RPM.
Check your manual or measure voltage at different RPMs for exact values.