Shop OBEX P1 Docs P2 Docs Learn Events
Advice Digi Compass to Dualdigit alphanumeric LED — Parallax Forums

Advice Digi Compass to Dualdigit alphanumeric LED

Ani1Ani1 Posts: 4
edited 2008-04-17 13:24 in Learn with BlocklyProp
I want to first say that I am completely new to stamps, etc.
My knowledge of electronics is limited and I have no working knowledge of ICs.

I want to use a digital compass (GeoSensory RDCM-802) http://www.geosensory.com/rdcm-802.htm which uses 3 outputs that generate a 3-bit binary code that corresponds to a direction (N, S, etc) and displays the directions via a dual digit alphanumeric display Liteon # LTP-3790JG (18-pin).


So that when the RDCM-802 outputs a value of say 001 the letters S and W show up on the LEDs. The letters will remain lit until the sensor changes.

What can be used to control and drive the LEDs from the RDCM-802 sensor?

I am looking to keep the project very very small in size, between 5-10V, and as cheap as possible.

I have been looking over the many options available from parallax and believe it would be a good fit for this project but do not know enough about it to figure out what the part list would be.

Any help would be appreciated.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-04-16 15:38
    A Stamp should be able to do what you want, but you'll need datasheets for both devices. You've put a lot of conditions on this project (very very small and cheap) without specifying details. You also say you have no experience with microcontrollers and programming and would have to spend some time learning (and spend some additional money for tools for learning).

    The usual way for people to get started with Stamps is to get the "What's a Microcontroller?" kit from RadioShack for $80. If your computer doesn't have a serial port and only has USB, you would probably do better getting a BASIC Stamp Discovery Kit (USB) from Parallax for $160. This includes the USB adapter and uses a 24-pin Stamp module which you could use with your project. With the RadioShack kit, the Stamp is built into the board and that may be too large or inconvenient to use with your project. The price difference would cover the cost of a separate standalone Stamp module.

    The Stamps (most of them) have 16 I/O pins. You'd need to use 3 to interface to the compass leaving 13 for the LEDs. The Stamps can drive some LEDs directly, but there are overall current limits and you may need some external chips to actually drive the LEDs, particularly if your display requires more than 13 I/O pins. Parallax sells some of these or they can be bought from suppliers like Jameco or Mouser or DigiKey over the internet. Parallax's website contains all sorts of downloadable tutorials and magazine columns on this sort of thing. Go through the Nuts and Volts columns for examples.
  • Ani1Ani1 Posts: 4
    edited 2008-04-16 16:13
    Thanks for you help.
    I can not find the datasheet for the LTP-3790JG LED. It appears to be a 2 character 18 segment per character display. 18-pins in 2 rows.

    You said the “BASIC Stamp Discovery Kit (USB) from Parallax uses a 24-pin Stamp module”.

    Could I use 3 of the pins for Inputs (from the compass) and 18 other pins for outputs to the LEDs?

    Also you mentioned that the “Stamps can drive some LEDs directly, but there are overall current limits and you may need some external chips to actually drive the LEDs.”

    Not knowing the current limitations of the LTP-3790JG LEDs if I did need more current from the Stamps what external chips would be needed to drive the LEDs?
    Example?
  • Mike GreenMike Green Posts: 23,101
    edited 2008-04-16 16:48
    The Stamps have 16 I/O pins except for the BS2p40 which has 32 I/O pins in a 40 pin module, so you'd have 13 pins available for LEDs or 29 pins with the BS2p40. Note that there are current limits for the BS2p40 for individual I/O pins, groups of 8 pins, and overall device current.

    There are two important things to know about the LED display. One, is it common cathode or common anode? That would determine what kind of LED driver you'd have to use. Two, how much current does it normally take for a segment?. The displays are likely to be 16 segments with a decimal point as a 17th segment and a common lead for each position for a total of 18 leads per position. If you keep the current per segment to under 10mA, you could use a pair of 74HC595 shift registers in series to drive the displays with 16 outputs available using only 3 Stamp pins regardless of whether the displays are common cathode or common anode. There's a variety of examples of their use in Parallax's tutorials and the Nuts and Volts columns from Parallax's website.
  • Ani1Ani1 Posts: 4
    edited 2008-04-16 18:13
    I think I need help a little more help.
    I am having a hard time understanding the relationship between the 74HC595s and the current needed to drive the LEDs.

    Let's say that I use a Stamp with 16 I/O pins 3 for Inputs 13 pins for LEDs.
    Also let's say that I'm using a LED with 16 segments with a decimal point as a 17th segment and a common lead for each position for a total of 18 leads per position. Each segment of the LED has a requirement of under 10mA.

    Why do you need the 74HC595? Can't you just drive the LEDs directly from the Stamp?
    I maybe reading this wrong, but the Basic Stamp can send 20mA on the output pins?

    If I have 13 pins for the LEDs I should be able to drive 13 LEDs?
    If I needed to drive additional LEDs (like there other 5 LEDs) I can understand using the 74HC595s to give me additional outputs.

    But what if the LED requirement was larger than 20mA to drive them?

    Maybe I need to read up more on LEDs.
    Thanks!
  • Mike GreenMike Green Posts: 23,101
    edited 2008-04-16 23:25
    Any one output pin of a Stamp can handle at least 20mA. The same thing is true of the 74HC595. Any "port" on the Stamp can handle only 50mA total current. A "port" is a group of 8 I/O pins, pins 0-7 and pins 8-15. All 8 output pins of the 74HC595 can handle up to 70mA total current.

    I had suggested limiting the LED current to under 10mA. Say you had 8 segments connected to a 74HC595. That's 72mA if you use 9mA and drive all 8 outputs. If you connected the Stamp directly to the LED with current limiting resistors, you could only drive 4 segments if they're split across the ports, 2 on each at 20mA each. If you limit the current to 10mA, you could use 5 segments on each port for a total of 10.

    If you need to use more than 20mA, you should consider using a driver transistor. The "What's a Microcontroller?" tutorial from Parallax shows how to do this. You'd need a transistor and base resistor for each segment in addition to the normal LED current limiting resistor.

    The 74HC595 are used to provide additional output pins since there are only 13 available and it's easier to put all the segments on a pair of 74HC595s and treat them identically rather than splitting the task between Stamp I/O pins and one 74HC595. By moving the segment driving to an external IC like the 74HC595, you can also increase the current limits available. The Stamp can handle only 50mA on an 8-pin I/O port while the 74HC595 can handle 70mA on a group of 8 output pins.

    Post Edited (Mike Green) : 4/16/2008 11:31:37 PM GMT
  • Ani1Ani1 Posts: 4
    edited 2008-04-17 13:24
    Thank you once again for your clear reply.

    It is very helpful and understandable.

    Ok, I will buy the starter kit and go through the tutorials.
    Time to hit the books!

    Thanks!
Sign In or Register to comment.