The Netduino forums have been replaced by new forums at community.wildernesslabs.co.
This site has been preserved for archival purposes only
and the ability to make new accounts or posts has been turned off.
I have been designing for a little while now a few circuits which I commonly use the 74HC595 to control. Right now these are:
LCD Screen
7 Segment Display
7 Individual LED Driver
This list is changing and growing as time passes.
I have been designing my circuit using ExpressSch and the PCB with ExpressPCB. ExpressPCB offers 'cheap' PCB manufacturing with 3 PCBs measuring 3.8" by 2.5" for $60 with shipping.
Below is my circuit diagram and the PCB diagram. Each of the boards will be separated manually and can be daisy chained together.
Some consideration (just 'cos you are going to pay $60)...
-- Schematic
for the leds, you have correctly used one resistor per led, but for the 7-seg display, you didn't. I'd use one resistor per segment as well, otherwise you'll notice a different brightness upon the number of segments activated.
why did you supply two 595's with 3.3V instead of 5V? There's no reason at all. By using +5V, you'll (1) obtain more brightness for the leds/display, (2) overload lesser the Netduino regulator, and (3) the 595 is *not* "+5V tolerant". I mean that you're driving the data-input of the 2nd 595 (being +3.3V powered) with the +5V output of the 1st 595. Simply use +5V for the whole circuit and forget the +3.3 at all.
the LCD backlight is switched by the NPN transistor without any resistor. Either you'll burn the transistor, or -worse- the LCD backlight. If none of them would happen, you'll have of sure an overheat of the transistor, and an huge current flowing through. I'd provide a resistor (let's say 10-20 Ohms 0.5 Watt) in series to the backlight.
Always backlight. In my LCD library, I didn't wasted a 595 pin for the backlight. Instead, I chose to drive the transistor (through a resistor) using a PWM output. That yields the ability to adjust the brightness of the backlight by simply tuning the PWM duty-cycle.
Both the leds and the 7-seg display are reversed. For the led strip, if you mean to drive them using a positive logic (logic high means led light), it's correct to wire them to the ground, but the "diode-arrow" should also be oriented toward ground. For the 7-seg display, you've used a common-anode display (supposedly), which have to be wired to +V. If so, the diode-arrow should be oriented toward the 595 outputs. Also notice that the logic will be negative (i.e. logic low means segment light).
I didn't check, but bear in mind that there's a segment standard map, which uses A=bit 0, B=bit 1, etc. If you're already considered it, forget this point.
For the leds strip, isn't worthwhile to leave free the bit 7, instead of the bit 0?
-- PCB.
Are there two LCDs? In the schematic there's only one...
LCD layout. If you place the two LCD sockets in such a way, the user is obliged to wire them, and that's tedious. Instead, it's pretty comfortable to sold a male strip to the LCD board, and use a female strip for the driver board (have a look here). However, that require a bit of space because the size of the LCD itself. Note that there are LCD having the pads either bottom or top, or even both.
Hope it helps. That's only to save your investment: if you want, forget everything!
Cheers
Biggest fault of Netduino? It runs by electricity.
Mario, I am going to try to answer all your points one by one.
1)
The brightness changes very slightly with different for the seven seg display but not very noticeably. I did this to keep the overall size of the pcb down.
2)
If 5V is used for the LEDs, they will use 15 mA each or 106mA for the 595 which is above the 70 mA its allow to drive. Is this correct?
3)
I have LCDs hooked up like this and this is the tutorial I have followed. My link They seem to work fine.
5) The seven seg is wired like this tutorial: http://netmftoolbox....itshift7Segment
The seven segment is wired this way b/c thats how the library was written. I will probably reverse the LED driver though as reverse logic isn't as intuitive.
6) Same as point 5
7) I might reverse this, but Ill write a simple function so this could be corrected behind the scenes.
Now to PCB stuff.
1) I am putting multiple b/c they are going to be cut out at home once they are printed. I wanted to see how many I could fit into the space.
2) GREAT IDEA. Ill definitively implement this so the user can change the LCD plugged in.
Thanks for all the advice.
any reason for using the 595 instead of say, MAX7219?, maybe it is camera issues, but have seen lot of flickering with shiftregisters when creating 8x8x8 cubes, but that might be other things of course..
Havent tested the differences myself yet, but have ordered a bunch of 595 and the max, to see how they work out.
Where did you purchase for that price? I can get the 595s for that at dipmicro.
My projects use LEDs for showing the status of various things like power and activity.
Mario, I am going to try to answer all your points one by one.
1)
The brightness changes very slightly with different for the seven seg display but not very noticeably. I did this to keep the overall size of the pcb down.
2)
If 5V is used for the LEDs, they will use 15 mA each or 106mA for the 595 which is above the 70 mA its allow to drive. Is this correct?
3)
I have LCDs hooked up like this and this is the tutorial I have followed. My link They seem to work fine.
4)
Do you have a link to your library?
1) okay.
2) isn't a problem of brightness, but of voltage compability: you must match the correct voltage. All the HC595 should be supplied using +5V only, and the resistors raised so that the max current won't be overflown. Note that is just a problem regarding the value of the resistors, nothing else.
3) A LCD backlight requires about 150mA for shining. It's a led matrix/array, which has to be correctly powered. In which way could you limit the current whereas is too much? In the schematic of Szymon, the transistor must "eat" everything is over the necessary, causing (1) overheat and (2) power wasting. A simple resistor is enough: it is *NOT* the best solution, but it's damn simple.
The seven segment is wired this way b/c thats how the library was written. I will probably reverse the LED driver though as reverse logic isn't as intuitive.
6) Same as point 5
7) I might reverse this, but Ill write a simple function so this could be corrected behind the scenes.
5) and 6) Stefan is a very valuable guy, but sometime is...running too fast, without actually watching at standard solutions, or commonly used patterns.
Take this chip, which is very common in the past: http://socrates.berk...iles/DM9368.pdf
It's a HEX-to-7 seg display decoder. The wiring of the display must follow the correct pattern, otherwise the result will be nonsense.
The MAX7219 is also a good idea. Please, consider the http://www.austriamicrosystems.com/ chips as well: they offer several interesting chips, yielding management of led-matrix, RGB-leds, etc.
Cheers
Biggest fault of Netduino? It runs by electricity.
When you get the MAX7219 and use it could you share the code / circuit with me?
It's actualy this series that lead me into that chip: http://fabienroyer.w...ith-a-netduino/
Fabien and Bertrand have started from driving each led by itself, via 595, and at last the max chip for driving the leds
Those are pretty darn cheap on eBay though shipping from china so it will take FOREVER to get here.
Yes, free shipping from China to Norway helps, and it usually takes about two, max three weeks.
It's actualy this series that lead me into that chip: http://fabienroyer.w...ith-a-netduino/
Fabien and Bertrand have started from driving each led by itself, via 595, and at last the max chip for driving the leds
Yes, free shipping from China to Norway helps, and it usually takes about two, max three weeks.
2) isn't a problem of brightness, but of voltage compability: you must match the correct voltage. All the HC595 should be supplied using +5V only, and the resistors raised so that the max current won't be overflown. Note that is just a problem regarding the value of the resistors, nothing else.
3) A LCD backlight requires about 150mA for shining. It's a led matrix/array, which has to be correctly powered. In which way could you limit the current whereas is too much? In the schematic of Szymon, the transistor must "eat" everything is over the necessary, causing (1) overheat and (2) power wasting. A simple resistor is enough: it is *NOT* the best solution, but it's damn simple.
5) and 6) Stefan is a very valuable guy, but sometime is...running too fast, without actually watching at standard solutions, or commonly used patterns.
Take this chip, which is very common in the past: http://socrates.berk...iles/DM9368.pdf
It's a HEX-to-7 seg display decoder. The wiring of the display must follow the correct pattern, otherwise the result will be nonsense.
The MAX7219 is also a good idea. Please, consider the http://www.austriamicrosystems.com/ chips as well: they offer several interesting chips, yielding management of led-matrix, RGB-leds, etc.
Cheers
Good points once again. Where would the resistor go per point 3