Maker Pro
Maker Pro

Small Circuit needed for New Product Design - Help!

I just paged through the LCD driver section of PIC you found. What they go through the multiplex is mind boggling. You have to make sure that each pixel never sees more of 1 polarity than other and they go to great lengths to make this happen. Interesting reading.

A periodic wake-up would also work, but I really like the idea that the PIC will keep the LCD bits flipping even when it is sleeping. A 28-pin SSOP is still pretty small.

Bob
 
As far as I can tell, the smallest PIC that has an LCD driver built-in is a 28-pin one anyway.

Thanks for that link :)

Edit: I see what you're getting at. With a non-multiplexed display, you don't need any special LCD driver in the microcontroller. You just have to get the code to flip the outputs between 60 and 180 times per second. Given that the code barely needs to do anything else, that wouldn't be a problem. So you could probably use a generic 24-pin or 20-pin device with that particular LCD.

I would like to get a decision from the OP on LCD vs. LED first though.

And on that subject, there's another difference I forgot to mention - the required supply voltage. For an LCD a 3V supply could be appropriate, but for an LED display, the supply voltage may need to be significantly higher. It depends on the segment forward voltage.

Kris, I haven't had time to digest the latest responses. In regard to the LCD vs LED - at least for the prototype I've decided to go with LCD. LEDs require too much power.
 

KrisBlueNZ

Sadly passed away in 2015
Right, fair enough. It looks like the LCD you found will work nicely from 3V and can be driven from any micro with enough I/O - 15 outputs for that display, or 17 if you want to drive the decimal points too. Add between 1 and 3 pins for the pushbuttons, and you could use any PIC or similar small microcontroller with 20, 24 or 28 pins. I suggest you leave a few pins spare for future expansion.

You asked about the other small components. With that LCD, you won't need many! One or two decoupling capacitors, and possibly a few resistors if you don't have one pin per pushbutton. You could probably power it from a 3V lithium coin cell e.g. CR2032.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
What kind of module? Like a text display?

No, one of the "graphics" ones. There are a number of small screens with built in controllers, some designed for phones. I've used one as the display for a little 2.4GHz scanner.

However I missed the link for the LCD display the OP posted (in my defense, I was on public transport at the time, jostling for position to get off the train).

The display he has found seems to ne quite a reasonable price.
 
Kris,

Since you recommended the PIC16LF1902 would you mind verifying this is the exact part#: http://www.digikey.com/product-search/en?vendor=0&keywords=PIC16LF1902 you'll notice quite a few PIC1902s. I'd like to order "PIC16LF1902 - I/SS-ND ($1.30). I'm also ordering: http://www.digikey.co.uk/product-detail/en/VI-201-DP-RC-S/153-1003-ND/2375 (LCD mentioned in prior post). I'm thinking I can purchase the decoupling capacitors, resistors and matrix board at radio shack. I'm sure this wont be my last post but thanks to everyone who have helped to this point. Once I have all the parts in-hand what resource would you recommend to review to actually start connecting the LCD pins to the PIC etc? I mean after 20+ post I'm s..t..a..r..ting to get a slight grip on what I'm doing but no where near a comfortable level. Also, being so cheap should I buy more than one PIC or LCD in case I connect the wrong pin. Not sure how delicate these things are.
 

KrisBlueNZ

Sadly passed away in 2015
I didn't actually recommend the PIC16LF1902; I just said that it's the smallest member of the PIC family that has an LCD driver. With the LCD you've chosen, you don't need any special hardware to drive it. The 1902 is an "enhanced mid-range" device, and it includes lots of stuff you don't need - a 10-bit ADC, voltage reference, UART, LCD driver and more.

The logic you need is very simple and more suited to a baseline device, and personally, I would use a PIC16F527, a 20-pin baseline device. With 15 pins used for the display, and one for the pushbuttons (you can use a single ADC input to acquire three pushbuttons), there are two pins available for expansion - one input-only and one input/output.

The PIC16LF1902-I/SS is the SSOP (shrink small outline package) version, which is smaller than the SOIC and with twice the pin density, so a bit more difficult to hand-solder.

Yes, I would get several PICs, and build at least two prototypes.
 
For surface mount parts, the matrix board is not going to do it. You either need to use the PDIP version (which is much larger) or have a PCB made.

I recommended that part because the LCD driver will operate while the micro is in sleep mode, which really simplifies the programming and gives you max battery life. The only time the micro would have to actually run would be when a button is pressed, and then only for a few 10s of instruction times while you update the count and the display.

If you use a chip without an LCD driver, you would have to wake up something like 100 times per second to flip the LCD bits with software. This would be more difficult to program (which is a consideration if you are not an expert programmer), and would reduce battery life noticeably. Also, the LCD driver has controls for contrast and for power saving that might prove useful.

In any case, I would get a PDIP and build the whole thing on a solderless breadboard first.

Bob
 

KrisBlueNZ

Sadly passed away in 2015
On second thoughts, a larger device might be better for power saving. I don't have a problem with the device waking up around 100 times per second to update two output ports, but if it needs to poll the pushbuttons using the ADC each time, that will add a significant amount of load current. It would be much better to have a separate pin for each pushbutton, and that would use up all the pins of a 20-pin device. There are no 24-pin baseline PICs. The 1902 is overkill I think, but at least you would have lots of options for future expansion.

I agree it's a good idea to prototype the circuit on a breadboard using a PDIP version of the micro.
 
I didn't actually recommend the PIC16LF1902; I just said that it's the smallest member of the PIC family that has an LCD driver. With the LCD you've chosen, you don't need any special hardware to drive it. The 1902 is an "enhanced mid-range" device, and it includes lots of stuff you don't need - a 10-bit ADC, voltage reference, UART, LCD driver and more.

The logic you need is very simple and more suited to a baseline device, and personally, I would use a PIC16F527, a 20-pin baseline device. With 15 pins used for the display, and one for the pushbuttons (you can use a single ADC input to acquire three pushbuttons), there are two pins available for expansion - one input-only and one input/output.

The PIC16LF1902-I/SS is the SSOP (shrink small outline package) version, which is smaller than the SOIC and with twice the pin density, so a bit more difficult to hand-solder.

Yes, I would get several PICs, and build at least two prototypes.

You are correct Kris, you did not "recommend" that PIC. To correct myself you merely suggested it be a fit to the criteria I laid out. I'll definitely take your advice Bob and build the circuit on a breadboard first :) Wow, I had no idea this thread would make it to #31. Suppose that further validates my badge of ignorance in this area ;-)
 
Right, fair enough. It looks like the LCD you found will work nicely from 3V and can be driven from any micro with enough I/O - 15 outputs for that display, or 17 if you want to drive the decimal points too. Add between 1 and 3 pins for the pushbuttons, and you could use any PIC or similar small micro-controller with 20, 24 or 28 pins. I suggest you leave a few pins spare for future expansion.

You asked about the other small components. With that LCD, you won't need many! One or two decoupling capacitors, and possibly a few resistors if you don't have one pin per push button. You could probably power it from a 3V lithium coin cell e.g. CR2032.
While I've decided to go ahead and build one prototype using the PIC16F527 I'm going to build a 2nd on the 28 pin 1902 platform. Is my assumption that the decoupling capacitors would only be necessary on the PIC16F527 because the tact switches would be sharing 1 pin? but not necessary on the 1902 because each switch would have its own pin.

Actually in thinking about this more...I probably would still need the decoupling capacitors on the 1902 to ensure zero power interruptions since each switch allows power to be drawn from the same power source?
 
Last edited:

KrisBlueNZ

Sadly passed away in 2015
You need decoupling capacitors no matter what. They connect across the power supply rail and are needed for reliable operation of the micro.

Normally, a 0.1 µF MLCC (multi-layer ceramic capacitor) right next to the micro, and a small electrolytic (e.g. 10 µF) across the battery, would be recommended, but if you use a button cell for power, you need to minimise leakage current, so use good quality film caps.

The 527 has just enough I/O for 15 LCD drive signals and three pushbutton inputs, but it doesn't have a feature called "weak pullups" so you'll need pullup resistors on all of the pushbutton inputs. So your component list would be:

1x 3V battery
1x PIC16F527
1x VI-201 LCD display
1x 0.1 µF decoupling capacitor (MLCC or film, see above)
1x second decoupling capacitor (10 µF electrolytic or 1 µF film, see above)
3x tact button
3x pullup resistor (around 1M)

The PIC16LF1902 version would have the same parts list except for the different micro, and the pullup resistors wouldn't be needed, because the 1902 has internal weak pullup capability. The 1902's LCD driving circuitry doesn't appear to need any external components.

I don't think I've missed anything have I Bob?
 
Kris: Yes, that looks right.

D Hancock:

When you say you are going to build 2 prototypes, what are you thinking? Do you mean that you will try each and determine which is better for the production model? The tradeoffs between the two are ease of programming, battery life, physical size and cost. If you build both as prototypes, the ease of programming issue is moot, so the only thing in favor of the 1902 is battery life.

The PIC16F1507 cost only a little more and has weak pullups which eliminates the need for the resistors.

Bob
 
Kris,

thank you for confirming each each part number needed in my circuit. I would like noted the fact that I've spent time researching everything presented by each of you. I'm trying to learn some of this stuff vs. simply getting an answer. At the same time it's frustrating. For example, in all my research of what Kris has said...I never heard the term pullup resister. My point is just to let you all know how much I appreciate the details..and know that I'm trying to learn from the effort each of you have made in replying.

Bob,

Why build two prototypes? At first my thinking was to build one "basic" prototype with no frills. The 2nd would then be a more powerful micro-c so I could start working on the next version and expand the capabilities. My end product target goal is much more complex than the requirements currently needed to secure buy-in from my resource. As I move forward I'm thinking I'll probably now just buy at least two of the 1902's (one as a back-up) and determine the next level up from there. I would really like to see my (next version) product with the capabilities of Bluetooth and possibly a touch screen. Regardless I have to get the first design prototype proven and completed before I jump into that pool.

I understand the 1902 is "over-kill" for what I need. Next I'll be determining if that over-kill is sufficient for version 2.0 Also, I understand that I'll need a programmer (device) and IDE. I'd like to make sure that each of those items are usable (if possible) when I do move to designing version 2.0 By that time I should be able to show the full product details on the forum :)
 
Touch screens are not like the LCD you are using. The 1902 does nothing to help drive a touch screen. Touch screens are graphic and require more memory than any of the microcontrollers we have discussed. So I would not get a 1902 if that is where you are headed. A 16-bit PIC is probably more appropriate.

Bob
 
Touch screens are not like the LCD you are using. The 1902 does nothing to help drive a touch screen. Touch screens are graphic and require more memory than any of the microcontrollers we have discussed. So I would not get a 1902 if that is where you are headed. A 16-bit PIC is probably more appropriate.

Bob
I totally understand that Bob. I apologize if it wasn't clear. I do want to see how far I can take the 2nd 1902 (beyond the initial prototype). Then I will begin down the road of touch screen etc. if warranted. I need to walk before I can run :)
 
So I received all the necessary components in the mail today. I than begin looking for a programmer. During my research I pulled up all the data sheets etc. on Microchips website for the PIC16LF1902 I/SP and I/'m just gonna say it...gesh - this is not my comfort zone. Are there any companies or individuals in the N. Dallas area anyone could recommend? I'd like to be able to provide the components, along with diagram, and have them connect the circuit and program the PIC. I feel like I'm giving up a bit but having to learn all this and spend the 50-$100 for the programmer (not including the fact I have to learn C enough to get the circuit working) doesn't seem worth if I can simply pay someone to take it from where I've gotten it. With your help of course :) Anyone?
 
Not in the area. If I were to do it, I would charge $500 to deliver one prototype PCB (not to a specified size and shape) and the code. Is this in the range you are thinking?

Bob
 
Not in the area. If I were to do it, I would charge $500 to deliver one prototype PCB (not to a specified size and shape) and the code. Is this in the range you are thinking?

Bob
A little outside my budget but I'll get back with you to confirm. I'm completing the prototype so I can actually get the check to make a more polished unit.
 
Top