Connect with us

Help needed for microcontroller based project.

Discussion in 'Electronic Design' started by adam, Jan 7, 2006.

Scroll to continue with content
  1. adam

    adam Guest

    Hi Group,
    We are a group of four B.E students studying in M.h.S.S. COE, Mumbai,
    India. We writing to you to seek some help and guidance. Since this is
    our first microcontroller based project, we are unaware about the
    practicalities and methodologies that go into it.
    In our project, we have decided to use the following:
    AT89C52/AT89S52: MICROCONTROLLER
    DS1307: RTC
    MAX232/MAX485: LEVEL CONVERTER
    AT24C1024: SERIAL EEPROM
    4051B: 8:1 ANALOG MUX
    IC 741/ LM324: COMPARATOR

    LOGIC: 8 channels connected to the MUX, depending on which input is
    enables, MUX selects it and sends it to the COMPARATOR. The second
    input to comparator is a reference voltage. Comparator's output to port
    1.0. Ports 1.1,1.2,1.3 as selects lines to MUX. Ports 1.4,1.5 for
    intefacing with memory. Ports 3.0,3.1 as RXD and TXD. Ports 3.2,3.3,3.4
    for interfacing with RTC.
    Using select lines of MUX , we wish to determine which channel is
    enabled.
    using RTC we wish to sore the real time and pin number in EEPROM. Using
    RS232C we wish to display this data on a PC.

    We are facing the following queries:
    1. Is our logic correct? Are all the Ic's comaptible?
    2. Useful tips from your side.

    We are in the stage of preparing the circuit diagram and there are many
    doubts which occur. We would like you to suggest software for
    preparing schematics and layout. Is there some software available which
    directly converts schematic to layout? Please give names.

    The next challenge is the software side. In our syllabus we have learnt
    C/C++. Since you have mastered this, please guide us how to write the
    programs and routines and recommend compliers, simulators and other
    software related to programming. Are programs and codes available on
    net? If yes, Please give the resource locations or websites.

    Any help will be really encouraging and greatly appreicated by us. We
    look forward for some positive response.
    Last but not the least, we wish you a very happy and prosperous new
    year.
    Thanking you and with best regards,
    Adam Mashraqui.
    (on behalf of the group)
     
  2. MaWin

    MaWin Guest

    741 is not suitable,
    the LM324 does contain 4 of what you need only one but it will do.

    Why don't you buy an ATmega128 from www.atmel.com ?
    It includes 8 analog inputs, RTC and enough self programmable Flash
    memory for your data, so your only additional chip would be a MAX232.
    No DS1307, no AT24C1024, no 4051 MUX and no LM324.

    It has too many (unused) pins ?

    Ok, then think about some ATtiny (The ATtiny11 does have a comparator,
    that will save you the LM324, the ATtiny24 has 8 analog inputs and a
    RTC which will save the 4051 and the comparator and the DS1307 from
    the parts you mentioned above) and a free C compiler like WinAVR/gcc.
     
  3. Sounds okay.

    Suggest you use an LM339 rather than an LM324 or 741 (the latter would
    require a negative supply to get common mode range that includes
    ground and you'd then have to clamp the output to the rails to avoid
    problems with the micro. The 339 just requires a pullup resistor (or
    maybe not even that if you use a pseudo-bidirectional input).

    Get something very simple like the I2C + RTC + serial communications
    working first (say transmitting the current time to a PC one-way) and
    then build on that.

    You can write this in assembly or C (or C++ but that would not make
    much sense). See what software your school has licenced for your use--
    compilers and PCB CAD packages are generally not free.


    Best regards,
    Spehro Pefhany
     
  4. Rob Young

    Rob Young Guest

    IC 741/ LM324: COMPARATORUse a real comparator like LM339 instead of an op-amp.

    Unless you need to voltage range, use 74HC4051 instead of 4051B and run
    everything on +5V only. You don't say what range of input signals you want
    to monitor but for a student project, just getting things to work with a
    single power supply is pretty good. With a +5V only supply you can monitor
    from just above 0V to just below 5V. For extra credit, explain in your
    report why you can't get all the way to 0V and all the way to 5V.

    If you want to use C, the SDCC compiler is free and pretty good for 8051
    derivative microcontrollers. You can work under Linux or MS-DOS or Windows
    (>= W98). You supply the editor. Don't bother with C++ for this. That
    would be like driving tumbtacks with a sledge hammer. Assembly might be
    just fine. Also WinAVR would be a good choice for the Atmel 8051
    derivatives.

    Search around the web for various bootloaders and debugger/monitor programs.
    Google for "paulmon" and read his pages. Also look at his reference
    designs.

    Design everything on paper, then start from the microcontroller and work
    outward, well and the power supply. Microcontroller + RS232 would be a good
    pair of chips to get working first. Then add the RTC. Then add the EEPROM,
    MUX and finally comparator. Heck, extra time left? Add an ADC (SPI bus,
    i2c bus or parallel) too or build one using comparators (lots of extra
    credit if you can build an 8-bit flash converter).

    As for CAD software, there are free EDA packages, such as gEDA. CadSoft's
    Eagle should have all the parts already in its library that you would need
    for drawing your schematics and probably the free version may have
    sufficient capacity for your PCB too. But your design sounds simple enough
    that good-old wire-wrap or point-to-point wiring on perfboard should be
    sufficient.

    If you guys can pool your money and are able to play nice together and share
    a copy, get The Art of Electronics, second Edition.

    In general, Google is your friend for this project. There are tons of
    examples out there, some good, some bad. Look at a few and you with some
    concentration you will discover the good from the bad. If you do use
    information you find during a web search, be sure to give due credit in your
    report. Don't plagerize!

    Have fun.

    Rob
     
  5. Pooh Bear

    Pooh Bear Guest

    As a student exercise I'd have thought that interfacng the I/O would be a
    useful learning process.

    Graham
     
  6. Cambridge has licenced a low-cost soft-cover edition for India and
    allowed to be sold in a few nearby countries (plus Africa). I see it
    listed for a paltry Rs.450, so they may as well snap up several
    copies.


    Best regards,
    Spehro Pefhany
     
  7. Ken Smith

    Ken Smith Guest


    I suggest an LT1081 for the MAX232, they are easier to get.

    If you are comparing I suggest you use a comparitor like the LM339 and not
    an op-amp like the LM324.

    Don't trust the AT89C52's data sheet on the subject of in place
    programing. If you are using that one, buy a programmer. The Philips
    parts that can be programmed via the RS-232 may be a better option for
    you.


    Add a 1N4005 diode and an LM7805 or the like to your list so that you have
    inverse protection and local regulation. It is much safer to do than rely
    on an external supply being set right.

    [....]
    I've hear people say they like Eagle for this purpose.
    www.eagle.com I think.
    The Keil stuff is fairly good but it cost money. A few free ones are on
    the web. Try google. Also feed "8051" and "free" into google.
     
  8. David Harmon

    David Harmon Guest

    On Sat, 7 Jan 2006 17:33:02 +0000 (UTC) in sci.electronics.design,
    (Ken Smith) wrote,
    Unrelated. The Eagle software is from www.cadsoft.de
     
  9. How often are you going to be writing this 'real time' , and pin number to
    the EEPROM?. If it is more than a few times an hour, look at FRAM instead.
    It is amazing how quickly the life of a typical EEPROM, can get used up,
    if data is changing quickly.

    Best Wishes
     
  10. Ken Smith

    Ken Smith Guest

    If there isn't much data, a battery backed static ram can be a good way to
    go.
     
  11. linnix

    linnix Guest

    For commerical products, I would suggest ATmega88 and PowerPAD
    (schematic to layout).

    For learnings, AT89C52, transistor level shifters, op-amp comparators
    (no ICs) and manual layouts (pick your gerber editor). That way, you
    will be happy not to use them again.
     
  12. Guest

    The flood of postings (and private email) I see from Indian engineering
    students wanting other people to do their homework makes me very happy,
    because it reminds me that quantity is not quality, and the number of
    annual graduates in a field says nothing about the host country's
    ability to excel in the field.
     
  13. Guest

    You're too charitable. The original posting was way over the "do it for
    us" threshold, very close to if not actually over the "here is a
    collection of stuff we were told we had to use, tell us what to do with
    it" line.
     
  14. Ken Smith

    Ken Smith Guest

    Yes but assuming that you consider the US at least something like a
    leader, you should cast your mind back to the sorts of posting we saw from
    US students in the past.

    You only need 1% idiots to make a lot of evidence of idoits.
     
  15. cbm5

    cbm5 Guest

    I read the original posting and wondered what the question was. I'll
    give them the benefit of the doubt and say that maybe they did pick all
    their own components, but really they are at the point of "OK we have a
    plan, now let's break it up and get to work." Are "all the ICs
    compatible?" Give me a break...read a datasheet once in a while. No idea
    what PCB CAD programs are out there, or which ones your school has
    available, or whether it is possible to automatically go from schema to
    layout? Not funny. Teach us how to use C++? I don't exactly have
    guru-level grasp of C++, preferring to use assembly on microcontrollers,
    but even I know that you don't pick up C++ on a whim. And what does "In
    our syllabus we have learnt C/C++" mean, exactly? Obviously the syllabus
    is not based in reality, but who made the syllabus and why does it apply?
     
  16. adam

    adam Guest

    Hi Spehro Pefhany,
    I will take your criticism on a positive note. You have mentioned that
    datasheets can help us know about compatibility. What are the
    parameters one should check to assess the compatibilty of any two IC's?
    Thanks and with best regards,
    Adam Mashraqui.
    (on behalf of the group)
     
  17. Pooh Bear

    Pooh Bear Guest

    I'm disturbed that you need to ask that question if you're supposedly
    studying electronics including hardware design !

    Do you any ideas at all how one would decide if 2 ICs were 'compatible'.
    I'm very curious.

    Graham
     
  18. Jim Thompson

    Jim Thompson Guest

    Put them in a room all alone ?:)

    ...Jim Thompson
     
  19. He also seems to have mixed up the follow-ups, as I mentioned nothing
    about datasheets in this thread. cmb5 was the one who mentioned that.

    You know, electronics is a really detail-oriented business, at least
    on the technical end of things. I'm tempted to do a John Houseman (as
    Charles W. Kingsfield Jr.) and offer them Rs. 5 apiece to call their
    moms/mums.. but that wouldn't be nice.



    Best regards,
    Spehro Pefhany
     
  20. Jim Thompson

    Jim Thompson Guest

    On Mon, 09 Jan 2006 17:46:31 -0500, Spehro Pefhany

    [snip]
    "Paper Chase", one of my all-time favorites !-)

    ...Jim Thompson
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-