Next kit (maybe) Dragonfly Seven segment & 16F886

Status
Not open for further replies.

blueroomelectronics

Well-Known Member
As I wait for the Mongoose chassis to be stamped (Mid July) thought I'd make a quick fun kit.
Dragonfly was originally a much different kit but I thought I'd make something with LED displays instead. Everyone seems to love LED displays
Similar to the Firefly 16F88 Tutor the Dragonfly sports a 16F886 microcontroller.
Highlights include
  • Six seven segment .56" display (MAN6740) Red, Green or Blue etc...
  • Six pushbuttons
  • 32768Hz crystal on TMR1
  • RS232 (simple two transistor drivers same as Fireflys)
  • 1wire connector
  • ICD2 (Inchworm) programming / debugging connector
**broken link removed**
 
Last edited:
I was thinking of proposing such a kit to you Bill. I was thinking of multiple display footprints; three staggered dual-digit patterns for Clocks and one normal 8-digit pattern for Frequency Counters or such. Use single in-line sockets and you could easily reconfigure the displays for either footprint. And you definately need a column of discrete LEDs just to show what you're lookin' at after pressing the <Mode> switch; Clock, Calendar, Alarm, Appliance Timer, Indoor Temp', Outdoor Temp', Frequency Counter, etc.

Anyway, let's see the schematic, please? And I hope you don't mind if I make some significant suggestions, like losing the 4017 in favor of an MIC5821, and others, to provide a truely "high performance" design.

Mike
 

Attachments

  • Matrix 7-Seg 8-Pin Bus.JPG
    150.8 KB · Views: 1,399
  • Matrix Display (9 pin 7-seg).PNG
    76.4 KB · Views: 1,563
Last edited:
The problem with the MIC5821 is price and availability. It's several times more expensive than a CD4017 available almost anywhere for about 1/5th the price of the MIC5821, six 2N3904 transistors are also very cheap. As an added bonus the 4017 cannot have more than one output active at a time.

The schematic will be ready in a couple of days. I'll post it here first.

In a nutshell...
16F886
pincount
8 LED segments
2 4017 (Clk & Reset)
3 ICD2
1 keypad (6 keys)
2 32768Hz crystal
2 RS232
1 1wire

6 undefined

I could drive the digits directly instead of using a 4017 but I like a little free I/O.

By all means Mike I'd like to hear your suggestions.
 
You'll never get full brightness by directly driving segments from PIC pins when you have more than a few displays. The duty cycle is just too low and the PIC pins cannot provide the necessary 'peak' current. You could always add transistor segment drivers but then you have 1 driver IC, 6 column driver transistors, and 8 segment driver transistors, so you end up using more hardware than you really need.

You're using 8 pins to drive the segments and two pins for the '4017. That's one more pin than my high-performance 9-pin design. I hadn't considered price of the MIC5821 IC before because I've been using pin-for-pin compatible Allegro A6821 samples.
 
Hi did you run out of pins? I don’t know whether you have enough pins or not,
Also you have already built your kit.

Assuming they are common cathode SSD’s.
If there is a brightness problem replacing 4017 with an UDN source driver IC for row driver & keep remaining other 6 transistors as a column driver to show the ground path to segments.

I think for 6 segments the brightness is much not affected driving directly (or through an OHM resistor) from PIC pin by assuming he is using RED COLOUR segments.

For one row getting caught only 6 low power LED’s maximum within very small delay.
 
Last edited:
I do like your idea of daisy chaining the displays plus your A6821 design looks top notch, and driving both cathode & anodes will get the brightness up for sure. I even considered Charliplexing but wanted this to be simple to grasp and difficult to damage with even with poor coding.
Because the 32KHz crystal sits on C0 & C1 I lose CCP2 and would like to give the CCP1 pin to the USER port.
Also the SSP module to the USER port as well as RA0, RA1 & RA4 (TMR0/1wire)
LED segments would have to be split up (because of the ICD2) so RB0-RB5 + RA6 & RA7 should do nicely as segment drivers.
That leaves RA2, RA3 & RA5 for the 4017 & switch inputs.
 
Last edited:

I could drive the LEDs directly with a ULN2803 and yes RED HE would be my first choice, those expensive blue versions seem pretty bright also.

But driving directly would leave only 3 I/O pins, not bad really and could happen. The PCB is only in the first stages, and can be changed readily.
 
Hmm mode LEDs eh... Would 6 be enough? If I use a A6821 as a column driver for CC displays I could probably squeeze some status LEDs on the board.
 
You still have a choice to save another couple of pins from your Segment arrangement.

The each two segment unit can make an arrangement from CA & CC. The common pins of both connected as one control pin. Little bit boring coding for that.But this is most suitable for 2 digits.
 
Last edited:
I use the MIC5821 or A6821 for CA displays Bill. Discrete LEDs can be used in place of one of the normal 7-segment displays in the matrix.

You say you can't use RB6 and RB7 because of the ICD2? Is that because you want to run in Debug mode?
 
Mike said:
I use the MIC5821 or A6821 for CA displays Bill. Discrete LEDs can be used in place of one of the normal 7-segment displays in the matrix.

You say you can't use RB6 and RB7 because of the ICD2? Is that because you want to run in Debug mode?
I take it the A6821 is an open collector device so it could run as a CC driver. The MAN6740 displays are dual I'd lose them in pairs.

Yes I want the debug mode, students love it as it sure makes bug finding much eaiser. Not so tough to split a port, RB0 thru 5 for segment A-F and RA6 for G and 7 for dp. The other choice would be a 3 to 8 demuxer like a CD4053 as I want positive logic for the NPN transistors. Both the 4017 & 4053 are dirt common, cheap and still made.

Opps I'm using a MAN6940 (CC) display.
 
Last edited:
Have you considered the CD4511 seven segment driver?, takes four inputs and outputs the seven segments - commonly used for driving seven segment LED's from PIC's because it saves three pins driving the segments.
 
The CD4511 would only allow digits, where's the fun in that
**broken link removed**

The 16F886 has pins to spare in the design, I might add a trimpot & RS485.
**broken link removed**
 
Last edited:
Nigel Goodwin said:
Doesn't it allow HEX digits?, but not random segments like you showed.
No it kindly blanks the display for A-F
Here's the beta (unfinished) schematic for Dragonfly
**broken link removed**


 
Last edited:
Well here it is in 3D (moved to a post below), I think I should add a power LED though. I'll post the revised schematic in pdf later today.
 
Last edited:
The reasons you give for compromising your designs continue to amaze me (grin).

I see DigiKey sells the MIC5821 for $2.90 (USD) and the equivalent A6821 for $2.25 (USD). That is a bit expensive but if I were going to the expense of making a printed circuit board I think it would be relatively easy to justify a $2.25 IC over a $0.16 IC when you consider that you'd end up with a high performance full brightness display with full fade-to-black PWM brightness control using a 9 pin bus (that will support up to 56 displays or 448 LEDs, see below).
 

Attachments

  • Matrix 7x8x8.PNG
    32.9 KB · Views: 3,883
Last edited:

The johnson counter in the CD4022 is idiot proof as only one digit can be lit at any given moment; the MIC5821 can allow all digits to be lit as it's a serial to parallel chip, it is a cool chip though. At 1/6 duty HE RED MAN6940 displays appear plenty bright with a segment drive of 25ma x 7 (plus the dp)

Using the 4022 is a snap too, simply reset (blank display) and increment the clock for each digit and pushbutton. After six digits repeat. The CD4022 is still a popular IC, digikey has thousands of em (and so do all the local electronics retailers)

Using modern or unusual parts gets me lots of email, just adding the BS250 (not available round the world it seems) to the Inchworm+ got me plenty asking for substitutes.

These kits are aimed squarely at hobbiests & schools. The more foolproof they are the easier they are to support. If the MIC5821 had a johnson counter version I'd use it.
 
blueroomelectronics said:
Using modern or unusual parts gets me lots of email, just adding the BS250 (not available round the world it seems) to the Inchworm+ got me plenty asking for substitutes
While I told you I used a BS250 in my design (I had them on hand) I also suggested that you implement a PNP with the extra resistor because P-channel MOSFETs in a TO-92 case are very difficult to come by. When I saw you had put the BS250 on the updated board I just figured you missed or ignored my suggestion. I was however delighted that you had not implemented the relay (big yuch!).

If you recall, I mentioned the target Vdd switching circuit before you went into Inchworm production. I was just trying to help you improve the design. I'm not trying to say "I told you so". I was just trying to help you avoid "learning the hard way" by passing along some of my experience, much of which was "learned the hard way" (grin).

That's the case here as well. I was just trying to help you improve the design. I'm happy to see you've implemented the single-pin column driven switch matrix but I'll shut up and stop trying to force my display subsystem design suggestions.

Mike
 
I do appreciate your suggestions Mike and the BS250 is the right option as it has a lower voltage drop than a transisitor. And any PFET with similar ratings would work as well. The MIC5821 is a much more specialised part. I do like the PWM brightness control idea.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…