Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : Indicator Ideas
Author | Message | ||||
viscomjim Guru Joined: 08/01/2014 Location: United StatesPosts: 925 |
I am working on a project that uses the uMite 44 pinner. I have come to a point where I have just a couple of I/O pins left and need to figure out a way to indicate several "modes" with only a max of 2 I/O pins. My first step was to implement an apa102 spi led so I could have several colors along with flash rates to indicate many modes. However, it looks like I need 5 volts for power (which I don't have) and the 3.3v spi signaling from the uMite is a bit flaky for it (there was a thread on this and WW had some issues). So that one is out. Next would be a bicolor led. This would give me red and green and flashing for both and possibly "amber" if I switch both leds on and off fast enough. This might work. Has anyone had to do something like this and come up with a cool alternative for displaying several states with only two pins on a uMite? Using a small I2C Oled is an idea, but not real estate or cost effective. Any ideas would be great. Thanks!!!! |
||||
WhiteWizzard Guru Joined: 05/04/2013 Location: United KingdomPosts: 2794 |
Hi Jim, Please quantify 'several states'! Also, how much footprint do you have to play with? Lots of ideas but need some more basic info . . . . WW For everything Micromite visit micromite.org Direct Email: whitewizzard@micromite.o |
||||
viscomjim Guru Joined: 08/01/2014 Location: United StatesPosts: 925 |
Hi White, I need about 8 states to be clearly indicated and I have about the space that an 8 pin dip would take up max. I appreciate your input! Jim |
||||
CircuitGizmos Guru Joined: 08/09/2011 Location: United StatesPosts: 1421 |
Does the WS8212b work better on 3.3V than the apa102? Micromites and Maximites! - Beginning Maximite |
||||
viscomjim Guru Joined: 08/01/2014 Location: United StatesPosts: 925 |
Hi CG, I looked into a few of the addressable leds, but there is the 5v problem. I don't have 5v to play with on this board. |
||||
robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2290 |
how about using a small moving-coil meter movement, but instead of numbers on the scale, have text for each of the given states? just a single PWM output pin would be needed. this would definitely have a certain 'cool' factor. taking the idea a step further, an LM3914 (https://en.wikipedia.org/wiki/LM3914) could be used if configured in "dot mode". this gives you 10 LEDs as indicators. using modern high-brightness LEDs you could drive it with a 10-step staircase, with a stair 'left out' (return to zero) for any given LED being turned off. you would need to go through each sequence of 10 steps in 20mS or less (50Hz) for persistence of vision to kick in. or, even simpler (and probably cheaper) use an auxiliary 28-pin MX150 or MX170 connected to an RS232 output. pulse the LED driver pins in sequence and you would then only need a single series resistor shared amongst them all. this would give you 18 LEDs. cheers, rob :-) |
||||
MicroBlocks Guru Joined: 12/05/2012 Location: ThailandPosts: 2209 |
I ran into the same problem with my USBSerial/Programmer project. There was only one pin i was willing to use for an indicator and i needed four states. The 2 leds correspond to two bits. (00,01,10,11) This is what i used: You can extend this to eight states when you add blinking. It works with red leds and 1n4148 diodes as they have a pretty high forward voltage. The software defines the pin as an input to indicate 00, as an output to indicate 01,10. The 11 is done by changing the output rapidly between the 01 and 10 states. Microblocks. Build with logic. |
||||
Frank N. Furter Guru Joined: 28/05/2012 Location: GermanyPosts: 813 |
Hi, what is with a cheap HD44780 display, controlled over one wire? There is a very interesting solution by Roman Black. Frank |
||||
WhiteWizzard Guru Joined: 05/04/2013 Location: United KingdomPosts: 2794 |
Jim, I find that using led(s) at different colours, and/or flash rates (to indicate the various states), then any more than three states then you start to forget what the meanings are. And if your device is fr use by other people then they will soon get confused by many multicolour states. Not knowing exactly what you need, I would consider a mini OLED display. With matherp's excellent work on all the various displays types, you could get a small unit working over SPI (or I2C). The slight disadvantage is that they are the size of a 'wide' 14pin DIP; but they do allow you to write words to a screen that then makes everything really clear. Even the mini units allow two lines of very clear text - this should be more than enough to clearly show eight different states They run from 3v3 volts and draw typically around 5mA when enabled with just a couple of words on the OLED. If you were to turn on every pixel then the current draw goes up to around 30mA (not likely in your use). One more thing, if you use a bi colour OLED (I like the blue / yellow ones) then you also have a 'warning' colour (with the yellow) that draws the users eye to it. Another option is a mini 7-segment display driven by a I2C/SPI SMD driver chip. Then display a single digit and/or Letter. Will draw more current than the OLED though! Hope this sparks some ideas for you . . . . WW For everything Micromite visit micromite.org Direct Email: whitewizzard@micromite.o |
||||
bigmik Guru Joined: 20/06/2011 Location: AustraliaPosts: 2870 |
Jim, This looks perfectly suited to the PCF8574, assuming you have access to i2c pins. It can drive 8 LEDs with direct control of each led.. It is a 16 pin chip but the SMD type is a similar size to a 8 pin dip. The data sheet states it will work down to 2.5 v and you can buy i2c backpack modules designed to attach to LCD modules for around $1 inc postage that use a SMD '8574 If you can't mount the chip itself in your artwork you can use the board mounted near your led displays. Regards, Mick Ps see my IO Panel in my boards (see link in my signature below) for a schematic, one of the channels is designed to drive LEDs. Mik Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
viscomjim Guru Joined: 08/01/2014 Location: United StatesPosts: 925 |
Thanks everyone for the ideas. The meter one is interesting and so is the bar graph. As even more states have been added my only real choice is the small oled as WW said, it is much clearer to understand than learning led colors and flashes. TZ, on your circuit, do you get any slight led on when the pin is set as an input? Thanks Jim |
||||
MicroBlocks Guru Joined: 12/05/2012 Location: ThailandPosts: 2209 |
Jim, When using 3.3v they are as good as off. In pitch dark you can see a tiny glow but it is not visible under normal conditions. With leds that are more efficient (white/blue) you probably need to add another diode or a resistor to drop the voltage. It is easy to test, just on a breadboard and connect the point between the LEDS either to gnd or +3.3v through a resistor. When not connected you simulate a input pin. Microblocks. Build with logic. |
||||
viscomjim Guru Joined: 08/01/2014 Location: United StatesPosts: 925 |
Thanks, I will give that a try... |
||||
CircuitGizmos Guru Joined: 08/09/2011 Location: United StatesPosts: 1421 |
There is also the DS2408 ----- 1-Wire 8-Channel Addressable Switch 8-Channel, Bidirectional Port Expander can be Powered and Operated from a Single Communication Line The DS2408 is an 8-channel, programmable I/O 1-Wire® chip. PIO outputs are configured as open-drain and provide an on resistance of 100Ω max. A robust PIO channel-access communication protocol ensures that PIO output-setting changes occur error-free. A data-valid strobe output can be used to latch PIO logic states into external circuitry such as a D/A converter (DAC) or microcontroller data bus. DS2408 operation is controlled over the single-conductor 1-Wire bus. Device communication follows the standard Dallas Semiconductor 1-Wire protocol. Each DS2408 has its own unalterable and unique 64-bit ROM registration number that is factory lasered into the chip. The registration number guarantees unique identification and is used to address the device in a multidrop 1-Wire net environment. Multiple DS2408 devices can reside on a common 1-Wire bus and can operate independently of each other. The DS2408 also supports 1-Wire conditional search capability based on PIO conditions or power-on-reset activity; the conditions to cause participation in the conditional search are programmable. The DS2408 has an optional VCC supply connection. When an external supply is absent, device power is supplied parasitically from the 1-Wire bus. When an external supply is present, PIO states are maintained in the absence of the 1-Wire bus power source. The RSTZ signal is configurable to serve as either a hard-wired reset for the PIO output or as a strobe for external circuitry to indicate that a PIO write or PIO read has completed. DS2408: Block Diagram DS2408: Block Diagram Enlarge+ Key Features Control Eight Independent I/O Port Pins from a Single Micro Port Pin Eight Channels of Programmable I/O with Open-Drain Outputs On-Resistance of PIO Pulldown Transistor 100Ω (max); Off-Resistance 10MΩ (typ) Individual Activity Latches Capture Asynchronous State Changes at PIO Inputs for Interrogation by the Bus Master Data-Strobe Output to Synchronize PIO Logic States to External Read/Write Circuitry Minimalist 1-Wire Interface Lowers Cost and Interface Complexity Built-in Multidrop Controller Ensures Compatibility with Other 1-Wire® Net Products Supports 1-Wire Conditional Search Command with Response Controlled by Programmable PIO Conditions Unique Factory-Lasered 64-Bit Registration Number Ensures Error-Free Device Selection and Absolute Part Identity Communicates to Host with a Single Digital Signal at 15.3kbps or 100kbps Wide Voltage and Temperature Operating Ranges Enables Robust System Performance 2.8V to 5.25V -40°C to +85°C Industrial Temperature Range Micromites and Maximites! - Beginning Maximite |
||||
viscomjim Guru Joined: 08/01/2014 Location: United StatesPosts: 925 |
Thats a nice chip. Going to put that one in the library. Well, the oled display won't work on this project. So I am forced to use the bi color led using 2 I/O pins. I will be using one that is common anode with 2 led's in one package with 3 leads. From what I can gather, turning on either one is a no brainer, however, if you modulate both of them at the same time, you can get a "yellow" color, which will help significantly in this project. Has anyone ever used one of these, and if so, at what frequency do you flash both to produce this yellow color? Do you have to flash red and then green then red, etc. or can they both be flashed at the same time. Any input would help as this is the final way I have to go. THANKS!!! |
||||
bigmik Guru Joined: 20/06/2011 Location: AustraliaPosts: 2870 |
Hi Jim, There are two (at least) types of bi-colour LEDs ... There is the type that have two LEDs in reverse parallel so power one way lights red swap positive and Gnd and the other LED lights. These are 2 pin devices. Then there are 3 pin devices so the cathode (or anodes) of the LEDs are common so you can drive eac led independently so no need to alternate power direction. This type might be suited to you but each led requires 1 io line. I have a few spare PCBs with the pcf8574 SMD chip, if you want pm me your address and I will send you one.. I feel it is the way to go, myself. Regards, Mick Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
CircuitGizmos Guru Joined: 08/09/2011 Location: United StatesPosts: 1421 |
Micromites and Maximites! - Beginning Maximite |
||||
CircuitGizmos Guru Joined: 08/09/2011 Location: United StatesPosts: 1421 |
You could straddle a 7-segment LED display over a DS2408 or over a pcf8574. Micromites and Maximites! - Beginning Maximite |
||||
kermess Regular Member Joined: 04/04/2013 Location: SpainPosts: 45 |
Bon día from Barcelona. Another possible solution is to use the classic shift registers as these for example. http://www.nxp.com/documents/data_sheet/74HC_HCT595.pdf or http://www.nxp.com/documents/data_sheet/74HC_HCT164.pdf Salutacions. David |
||||
Frank N. Furter Guru Joined: 28/05/2012 Location: GermanyPosts: 813 |
Hi David, this was my suggestion with the Shift1 system for 1-wire shift registers from Roman Black on the first side of this thread. There is a solution to drive a 74HC595 with ONLY ONE PIN to drive LED's or a HD44780 display... There's a BASIC program under the "picbasic.co.uk" forum: "Driving a 2x16 LCD with only One Pin and 74HC595" Frank |
||||
Print this page |