Shop OBEX P1 Docs P2 Docs Learn Events
Newbie seeking advice — Parallax Forums

Newbie seeking advice

emily_hemily_h Posts: 3
edited 2007-10-20 04:11 in Propeller 1
Hi everyone,

I'm a mechanical engineer who got tricked into developing the electronics for a project, as well as the mechanical system. I have a basic understanding of analog electronics, plus some experience programming a BASIC Stamp that someone else had put together for me. So I've never picked out chips and components and accessories. I think I want to use a Propeller chip. Here's my basic project: I'm going to have 10 light variable resistors and two stepper motors. The stepper motors move a little shade that tries to shield the light sensors from the sun as the sun and the whole platform move around. It would also be nice to have a little LCD display, or maybe even the 2.5 inch display on the Propeller products page for showing the system status. The stepper motors come with controllers attached, I just need to be able to communicate with them via RS485 serial connections.

I'm thinking that the best plan is for me to buy the Propeller Education Kit, do a few demo programs, work everything out, and then move to a ProtoBoard or a PropRPM for the final project. Does anyone have example circuits for A/D conversion for the light sensors? Do I just build a little RC circuit and time the hi-low transition time? And can you recommend an RS 485 driver chip, since I believe I will need one or two of them?

Sorry that I'm a little out of the loop with techie electronics terms. Although I find this project a little scary, I'm looking forward to being a little more electronics-savy when I'm done!

Thanks!
Emily

Comments

  • Ken PetersonKen Peterson Posts: 806
    edited 2007-10-19 17:08
    Hi Emily,

    Sounds like an interesting project. I definitely would recommend working on each of your subsystems at a time and understand them individually before tackling the entire project. Since the SPIN language allows you to create objects, I would try to create an object to model each of your physical devices in software, then create your larger program to control those objects as a system.

    RS485 is a differential signalling protocol, which means you have two wires (A and B). If A is higher voltage than B, then it's a 1, and if B is higher voltage than A then it's 0. You can use two pins on the Propeller to do this, as the absolute voltage of the pins is not critical, only the difference.

    For reading the sensors, the method you use depends on how fast you need to read them. In this case it seems you don't need very fast response time, so measuring the RC time should work for you.

    In order to observe what's happening in your program, I would suggest trying the Prop Terminal in the Object Exchange. It allows you to send information back to your PC and display it on the screen. This will allow you to move forward more quickly without having to deal with video or external display hardware.

    Have fun!

    Ken

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


    The more I know, the more I know I don't know.· Is this what they call Wisdom?
  • emily_hemily_h Posts: 3
    edited 2007-10-19 17:48
    Thanks Ken! I've gone ahead and ordered an Educational Kit, now I just wait for it to arrive! I'll look into the Prop Terminal and other objects. Already developed code sounds fantastic to me. As for the RS485 stuff, does that mean I don't need a peripheral chip? That sounds great! Unless, of course, it would be easier to develop with a chip...

    Thanks for the help!
    Emily
  • Fred HawkinsFred Hawkins Posts: 997
    edited 2007-10-19 18:04
    Emily,
    Be sure to run through the Ed Kit Labs. I think that the Counters Lab will be particularly useful for your light sensing.
    Fred
  • Mike GreenMike Green Posts: 23,101
    edited 2007-10-19 18:18
    Emily,
    I'd use an RS485 driver chip. They add signal conditioning that would be important if you have any significant distance between the Propeller and the motor controllers. In addition, they add a layer of protection for the Propeller's I/O pins. Here's one example: www.linear.com/pc/productDetail.jsp?navId=H0,C1,C1007,C1017,P1713.
    These are short circuit protected, protected against static discharge to 15KV, and overvoltage to 60V. They also run off the Propeller's 3.3V supply. Other manufacturers make similar devices.

    Have a look at the Microphone to VGA demo program in the Propeller Object Exchange. It uses the ADC technique demonstrated in the counters tutorial for the PEK. There are some other objects in the Object Exchange that also demonstrate this. The circuit is shown on the Propeller Demo Board schematic for the microphone input.

    Post Edited (Mike Green) : 10/19/2007 6:23:30 PM GMT
  • emily_hemily_h Posts: 3
    edited 2007-10-19 20:09
    Thanks again, guys. I'm sure I'll have more questions once my propeller gets here. Mike, I looked at that R%485 chip, and it looks like it runs off of 5V (Vcc = 5V). Am I missing something?

    I will look at the Microphone to VGA demo this evening.
  • Mike GreenMike Green Posts: 23,101
    edited 2007-10-19 20:31
    Sorry - my mistake, you didn't miss anything. It is a 5V part. There are a variety of 3.3V parts though that I've seen from several manufacturers.
  • Ken PetersonKen Peterson Posts: 806
    edited 2007-10-19 22:53
    Here's a pretty good reference for details about RS485

    en.wikipedia.org/wiki/Rs485

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


    The more I know, the more I know I don't know.· Is this what they call Wisdom?
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2007-10-20 01:05
    Hi emily_h -

    It looks like you have gotten some great advice from others. It also sounds like you have a good idea of what the project needs to do. I would add that you should be sure you write down specific details in a design document before you begin coding. As you create the design document you might add tidbits of code or references to materials online, in the forum, or from the education labs.

    For my projects (work or hobby) I need to be sure to write down what I want to do, otherwise I lose track of where I am going or get caught up in the details without seeing the big picture. Especially with the Prop, I need to plan out how each object works together and what informations needs to be shared between cogs.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter
    tdswieter.com
    One little spark of imagination is all it takes for an idea to explode
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2007-10-20 02:30
    Here's a book that you might find useful.


    Practical Electronics for Inventors:

    www.quantumbooks.com/p/06CONS/0071452818
  • Ken PetersonKen Peterson Posts: 806
    edited 2007-10-20 04:11
    I would suggest using the protoboard rather than the PropRPM for your project. It's very reasonably priced at $25US for one board, or $100 for 5 boards. It has plenty of prototyping space on it and it's cheap! Be sure to test your protoboard by running some programs and testing pin I/O before modifying the board. A colleague of mine didn't do that, and after he got done with all the soldering the board was dead. Who knows whether it was something he did or not.

    K

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


    The more I know, the more I know I don't know.· Is this what they call Wisdom?
Sign In or Register to comment.