Trying to Figure Out How to Design This (USB / Battery Power)

Discussion in 'General Electronics Chat' started by Dash_Merc, Jun 27, 2010.

  1. Dash_Merc

    Thread Starter New Member

    Jun 27, 2010
    9
    0
    I'm very new to circuit design, and I'm having some trouble because of it. I've got the majority of my circuit designed, but I can't quite figure out how to do the rest of it.

    The requirements I'm having trouble meeting are these:

    -run on batteries
    -charge by usb
    -transfer code to the mcu by usb.

    So basically, I need somebody to teach me how I would go about creating this schematic, and what it ought to look like.

    The batteries are LiPo, and the charger IC is a MAX1555, and the MCU is an AT90USB1286, if that helps.

    Can anybody point me to where I can learn how to do this the right way?
     
  2. sceadwian

    New Member

    Jun 1, 2009
    499
    37
    What research have you done yourself? Teaching you from scratch something like that would take months if you don't have basic circuit knowledge already. So as far as schematics go what do you have so far?
     
  3. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    well, the USB has 4 wires in it. 5v, GND, TX and RX.

    So you will use the 5v and GND to the charger AND the MCU. Think of it like a breadboard.

    You have a 5v rail and a GND rail. So when you bring the USB connector in the schematic, take the 5v pin and draw a long rail that will supply the charger, MCU and whatever else may need it.

    Same with gnd.

    With the TX and RX, you will run those directly to the MCU
     
  4. Dash_Merc

    Thread Starter New Member

    Jun 27, 2010
    9
    0
    Here's my (somewhat disorganised) schematic:

    http://tinypic.com/r/2dijeow/6

    I'm making a clock, using 132 LEDs (12 of them RGB, making for a total of 156 LEDs to drive), driven in a multiplexed arrangement (I could save pins using Charlieplexing, but figuring out how to make multiple LEDs appear to be on simultaneously in a Charlieplexed arrangement is too much of a headache), controlled by an AT90USB1286 running the Arduino firmware (because I royally suck at C, and I'm not interested in tackling a new programming challenge and schematic design at the same time -- I'm more interested in fast prototyping; once I get it working how I want, I will consider switching to raw C), reading the time signal from a DS3231 RTC/TCXO. It will run off a LiPo battery, which will charge by USB, and the AT90USB1286 will receive program updates via USB when I see fit. There will also be a rotary encoder with built-in pushbutton involved to handle user interface issues (setting the time, changing to stopwatch mode, etc.).

    So to summarise:

    -AT90USB1286 (running Arduino)
    -DS3231 RTC/TCXO
    -12x13 Multiplexed LED array
    -Rotary encoder user interface
    -LiPo battery
    -USB charging and software updating

    I've got most of it figured out, but I want to make sure I have the power section of the schematic figured out before I finish routing everything, design the board file, and print myself a test board.

    All I really need is the ability to charge the battery via USB, upload new software via USB, and not have the power supply be interrupted by plugging in or unplugging the USB cable. I'm not sure if the MAX1555 chip I have in the schematic handles this natively, so I'm confused at how to set the schematic up to handle it.

    If this is indeed too complicated a question to ask, please just point me in the right direction for some ace resources, and I'll get studying. After all, that is how I got as far as I have; reading schematics, reading datasheets, reading forums and wikis and how-tos, and asking questions. And several complete design overhauls.

    Also, please don't question my choice of chip, nor my choice to use Arduino software. I realise how amateurish I am, but we all have to start somewhere, right?
     
  5. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    Here is a link to an AAC version for folks who dont like going off site. The OPs link requires a few more links to get to a legible version of the schematic. So:

    http://forum.allaboutcircuits.com/attachment.php?attachmentid=20689&stc=1&d=1277723346

    And adout the 1555, that should be all you need. From maxim website max1555 data:
    And here is the 1555 datasheet:
    http://datasheets.maxim-ic.com/en/ds/MAX1551-MAX1555.pdf

    Now remember, when charging from USB, you will only have 400ma left for the UC and the LEDS..well everything.

    You will have to run this in a really truncated or dim mode when USB is powering it. As for batteries, it depends on what you are using, but the max1555 is only for 1-cell Li+ batteries.

    Where you are going to get the current to power 156 LEDs, I dunno.
     
    Last edited: Jun 28, 2010
    Dash_Merc likes this.
  6. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    You will probably need some pins for the initial programming, I am not really sure if that AT90 is capable of programming a brand new chip through USB.
     
    Dash_Merc likes this.
  7. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    He is using the arduino bootloader, which is just fine.
     
  8. Dash_Merc

    Thread Starter New Member

    Jun 27, 2010
    9
    0
    I did realise that I forgot to read the MAX1555 datasheet, and opened it right after I posted. As you said, it does appear to automatically handle that switchover, but it says from USB to AC adapter. Would it still smoothly handle the transition back and forth from USB to battery?

    In any case, I guess it doesn't need to be absolutely smooth, as the DS3231 will have a backup button-cell to keep the RTC information alive in case of main power failure. No I haven't put that in the schematic just yet. :p

    As for powering all 156 LEDs, I'm only going to be illuminating three at a time, most of the time. During initial power-on, I do plan for there to be a POST, which will light each LED in turn, but never do I expect them all to be on simultaneously, so I should be ok. Also those three aforementioned LEDs will only be lit up for 15 seconds at a go in normal clock mode, when the user presses the button on the rotary encoder to indicate he/she would like to read the time.

    I know it's overkill to use that many LEDs, and I could just go with 7-segment displays, or a binary-style display, but I'm interested in replicating the motion of the arms of a mechanical clock (three concentric rings, 60 for seconds, 60 for minutes, 12 for hours), purely for aesthetic purposes.

    I will be conserving as much power as possible.

    And as for burning the chip, I will set up a rig to do my initial programming (probably involving gator clips and stuff). Once I burn the Arduino bootloader on there, everything else can easily be handled by USB, thanks to the Arduino IDE.

    Thank you for your help. I really appreciate your support. :)
     
  9. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    Yeah, it doesn't get much easier than that if your using arduino. quite powerful for such a small package.
     
Loading...