PDA

View Full Version : External display for computer???



jantman
12-05-2006, 12:30 PM
Hello,

I haven't done anything with microcontrollers before, but have an idea for a project and thought a BASIC stamp might fit.

What I want to do is design a unit which will display text on screen that is sent by a computer (I guess via RS232 serial, or USB if it would be easier), and also have the ability to control the status of 4 LED's (2 green, 2 red).

So I have 3 questions...

1) How involved would the hardware/onboard software development be? Can something like this be assembled from mostly pre-made pieces and programmed using largely existing code?

2) Are there available enclosures pre-made for such a project (STAMP with LCD) that I could just drill out 4 holes for the LEDs?

3) (big question) How involved would the server-side (Windows machine) programming be? Would it be relatively easy to send the messages through telnet or the like, and then have the Windows machine generate them somehow?

Sorry for posting such a basic question, but I can't find much on the 'net about it.

Kevin Wood
12-05-2006, 01:05 PM
The Basic Stamp is a good choice for a first microcontroller. There is easily a few hundred downloadable documents on the Parallax website to help you along. The first ones that you might look at is the "What's a Microcontroller" manual and the "Basic Stamp Manual".

Okay, for your project, it sounds like you want to connect a Basic Stamp to a PC. The Stamp will receive data from the PC, and from that data, it will display messages to an LCD (connected to the Stamp), and control 4 LEDs (also connected to the Stamp). This is well within the capability of the Basic Stamp series.

To answer your specific questions:

1. How involved the project is will depend on how "polished" you need the final results to be. You could do this on anything from a breadboard with loose parts to a custom manufactured circuit board. You should have no problem building this from existing products & parts, and there is plenty of code available to use as a starting point.

2. There are hundreds (thousands?) of enclosures available, not including the home-built kind. It's very likely that you can find something that will work.

3. How "server" are you talking about, and what is your programming experience? It is very easy to create a VB-like application that allows you to send commands via the serial port to the Stamp from the local machine. If you need to do this via a network connection, you would need to add this capability to the VB-like application, or access the machine via a remote desktop connection.

There are quite a few posts on the forums dealing with this type of stuff, but the standard search engine doesn't work very well. Try searching via the Google engine at search.parallax.com (http://search.parallax.com). Use the advanced search option, and type forums.parallax.com in the domain field. Terms like VB, VB.Net, C#, C++, RealBasic should turn up some results.

jantman
12-05-2006, 01:59 PM
In terms of how "server", I'm just talking about a separate computer (Windows - eek!) to send the data over serial. My programming experience is pretty extensive, but my VB is rusty and I've never done any RS232. No network connectivity is required. If I decide to implement it, I'll do that in VB, and it won't have an effect on this project - I'll just change the input to the function that sends the display data to the LCD.

Thanks for the advice.

Also... are there *free* VB whatevers (API's/modules/methods) to do the RS232? I looked at some online, but they were all pay-for-software. Coming from an open source world, I find this disturbing...

Martin Hebel
12-05-2006, 02:06 PM
Take a look at using StampPlot for your PC interface. It allows you to create a GUI that interfaces with your controller.

Let's say for example you drag and drop a checkbox on the StampPlot screen, name it chkLED1.

From BASIC Stamp code you can control the LED on board with the following:

LED1 PIN 10

LOW LED1

DO
DEBUG "!READ (chkLED1)",CR ' Read value of check box (0/1).
DEBUGIN DEC value ' accept returning values
LED1 = value ' set LED to state
Pause 200
LOOP

There are 2 full tutorials on the download page for StampPlot, and it's free for home/educ use, including drag and drop GUI creation.

http://www.stampplot.com

-Martin

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Martin Hebel
StampPlot - Graphical Data Acquisition and Control (http://www.stampplot.com/)
AppBee -ˇ2.4GHz Wireless Adapters & transceiversˇfor the BASIC Stamp & Other controllers (http://www.selmaware.com/appbee)ˇ

Kevin Wood
12-05-2006, 04:59 PM
I used the term VB-like to give the impression of a GUI driven app. You can use any language or libraries that support serial comms - Java, C, C++, C#, VB, Perl, Python, etc.

As for open source tools, you can, again, use anything that runs on Windows and gives you serial port access. The big difference will be the code you write, compared to Linux/Unix.

If you want strictly GUI based tools, you can check out the Express versions of Visual Studio - VB, C++, C#, and J#, or the free Explorer versions from Borland (now CodeGear) - Delphi, Delphi.Net, C++, and C#. The Visual Studio tools are easier to develop with, but also require a run-time VM if you distribute your program.

For non-gui tools? Your text editor & compiler of choice.

Here is an older thread that deals with this topic, which has some code samples that you can use to get started:

http://forums.parallax.com/showthread.php?p=607328

Sarten-X
12-05-2006, 05:36 PM
My next computer I plan to build myself, and throw in a few interesting features, one of which is a pair of LCD displays to show temperature & fan speen, and a working temperature gauge (a needle thing, like the dashboard of a car). This seems similar to what you're doing, so here's my current plan: AˇBS1USB module for the processor. It seems to beˇa cheap and easy way to get what I want. I don't know what kind of hardware you have already or will have, but my decision for USB is based solely on the fact that I have a PCI card with an internal USB port. The screens and gauge will be mounted in the PC case, with the help of a friendly Dremel tool. Making a clean mounting hole is easy, if you plan everything out and go slowly. For an external enclosure, my personal preference is to buy a suitable case from Radio Shack and cut it as needed. My system will get its own measurements, so I can't help you much with the software. My LCD will be parallax's backlit 2x16 display, which seems to require no significant external circuitry to make it work.

You mentioned wanting to use only pre-built parts.ˇThe same concern is why I like the parallax screen. Also, LEDs need only a resistor (or at least, they SHOULD have a resistor).

Kevin Wood
12-05-2006, 09:39 PM
LEDs connected directly to a Stamp pin NEED a current limiting resistor, otherwise you'll fry your Stamp. Parallax uses 220 Ohms in their manuals, but I personally use 1KOhm for the lower current rating on the pin.

Matrix Orbital makes PC bay insert display units: www.matrixorbital.com (http://www.matrixorbital.com)

Also, although the BS1 isn't difficult to use, it is less feature rich hardware- & software-wise than the BS2 series. The BS2 makes a better "first" microcontroller than the BS1, especially when it comes to the amount of documentation available.

Jantman, a good choice for a "getting started kit" is the Basic Stamp Activity Kit, also known as the RadioShack WaM kit, since it is also sold by RadioShack. It comes with the HomeWork Board, which has a permanently mounted BS2, instead of the modular BS2 in other kits. If you want to get a modular kit, which will allow you to use the different modules, you can get the Basic Stamp 2 discovery kit.

You can find links to both kits here: www.parallax.com/html_pages/products/kits/starter_kits.asp (http://www.parallax.com/html_pages/products/kits/starter_kits.asp)

With either kit, you would only need to purchase an LCD display, and you would have enough parts to prototype your system. Here are the displays that Parallax sells: www.parallax.com/html_pages/products/audiovisual/lcd.asp (http://www.parallax.com/html_pages/products/audiovisual/lcd.asp)

Post Edited (Kevin Wood) : 12/5/2006 2:56:47 PM GMT

Vern Graner
12-06-2006, 07:36 AM
jantman said...
Are there available enclosures pre-made for such a project (STAMP with LCD) that I could just drill out 4 holes for the LEDs?

I used a PACTEC case (http://www.pactecenclosures.com/Plastic-Enclosures/HPS-Series.html) that I bought at Frys to enclose a Super Carrier Board (http://www.parallax.com/detail.asp?product_id=27130) and a Parallax LCD module (http://www.parallax.com/detail.asp?product_id=27977). In the "open" photo (attached), you can see that there's plenty of space inside for additional circuitry, buttons etc. http://forums.parallax.com/images/smilies/smile.gif

The two devices in there are a Rogue Robotics uMP3 player (http://www.roguerobotics.com/products/electronics/ump3) and a Pocket Watch B (http://www.parallax.com/detail.asp?product_id=27962)). Since these pictures were taken, I've added four small push buttons and four "status" LEDs to the front of the unit.

Of course, if all you need is a simple external display, you could always go this route (http://www.thinkgeek.com/computing/avcards/7e3e/). http://forums.parallax.com/images/smilies/cool.gif

Hope this helps http://forums.parallax.com/images/smilies/smile.gif

Vern

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔



Vern Graner CNE/CNA/SSE | "If the network is down, then you're
Senior Systems Engineer | obviously incompetent so why are we
Texas Information Services | paying you? Of course,if the network
http://www.txis.com | is up, then we obviously don't need
Austin Office 512 328-8947 | you, so why are we paying you?" ŠVLG


Post Edited (Vern) : 12/6/2006 12:42:59 AM GMT

bennettdan
12-09-2006, 07:14 PM
Hey Jantman
ˇLook at this sight he uses a PC to talk directly through an DCE app Mod to a Parallax serial LCD screen. http://www.devx.com/dotnet/Article/32067/0
This wont help you much with turning on and off the LEDs but I can help with that if you have a BS2 and an LCD screen you can hook them together and wire in the LEDs to the stamp and then download
Microsofts Visual Studio Express 2005 for FREE it has the serial port controls in it.
http://msdn.microsoft.com/vstudio/express/vb/download/
Then I can help you with a program to run the LCD and LEDS.

Hope this helps email me if you need more help this is the kind of projects I like..
bennettdan@bellsouth.net (mailto:bennettdan@bellsouth.net)

One more thing if you want a nice price on a LCD screen you can go to http://kronosrobotics.com/xcart/customer/home.php?cat=292ˇand order his LCD parrallel to serial chip for $7 and then use the cheaper parrallel LCDsˇfrom Matrix Orbital for $19
http://www.matrixorbital.com/index.php?cName=lcd-mop-character-lcds

Then you can have a serial LCD for like 30 dollars..

Forrest
12-09-2006, 07:27 PM
>>Then you can have a serial LCD for like 30 dollars..<<

If you check Vern's message, there's a link to Parallax's backlit 2 x 16 serial LCD for $29.95.

bennettdan
12-09-2006, 09:17 PM
Yes I seen the 29.95 one size but with the kronos chip you can use it on larger ones up to 4 lines which make them alot cheaper.Sorry to not add it..