Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
ArcticZombie
Sep 15, 2010
I have an ATmega328 controlling a relay which is hooked up to a 12V horn capable of pulling 8A. I'd like to power both the horn and the ATmega328 using the same 12V 25-50C 1300 mAh battery. How can I do that? I have tried it in parallel and it works fine until the relay is closed. The horn will come on for a split second but then the ATmega loses power. What exactly is happening? Is the horn taking all the power, starving the ATmega?

Adbot
ADBOT LOVES YOU

ArcticZombie
Sep 15, 2010
It's a SparkFun Beefcake Relay. It gets 5V straight from the voltage regulator, switched using a transistor. I'll have to try the capacitor tomorrow, the neighbours won't appreciate me firing up the horn at almost 10PM.

ArcticZombie
Sep 15, 2010
It wasn't the relay sucking up the current, it was the horn. The circuit worked fine without the horn connected. Anyway, I added a capacitor and all is well. Thanks.

ArcticZombie
Sep 15, 2010
I'm looking for some advice/sanity-checking on my first "proper" electronics project (proper in the sense that I'm trying to make it look professional). I'm a software guy by profession with experience in mechanical engineering, but electronics-wise just some small Arduino stuff making basic circuits on breadboards.

I'm sick of using my phone as my bedroom alarm clock so I'm working on creating a small wooden alarm clock. What I'm planning so far:
  • For power, I'm planning on either using a 1000mAh rechargeable lithium battery I have lying around, or a couple AA batteries. I might need more capacity?
  • For the RTC, I'm looking at the DS1307 for the backup battery capability and the 1Hz square wave output for interrupts.
  • For the digits of the clock I'm planning on using 4 SC52-11SRWA 7-segment LED displays driven by 4 74HC595 shift registers.
  • For user interaction, I'll have 2 buttons for setting the time and a tilt switch for determining which way up the clock is (to turn the alarm on/off by flipping it).
I'm concerned about power usage, I'd like the battery (or batteries) to last a reasonably long while and I need some advice picking an MCU. I've only used Arduino-compatible 8-bit AVR MCUs in my previous "projects", but I'm aware there are many others and I find the selection bewildering. The way I see it, I need:
  • Enough pins for all the I/O (9? 3 for the shift register(s), 3 for the buttons/switch, 2 for I2C with the RTC and 1 for the square wave interrupt).
  • 3.3v operation with some kind of super low-power sleep mode to be woken up by interrupts on button/switch/square wave.

ArcticZombie
Sep 15, 2010

KnifeWrench posted:

I would never trust my alarm to something that isn't plugged into the wall, sleep mode notwithstanding. Is there a reason you're trying to make this battery operated? A simple wall wart could obviate all of your power concerns, at least for your initial prototype.

As figured out, the flipping design is what was driving me to a battery powered device rather than a wired one where the cable would get twisted. I could use some sort of circular connector like a barrel jack that can spin when plugged in maybe? Something fancier like a slip ring as mentioned seems like it's getting pretty complicated for what I was imagining.

As long as the battery in this thing can last a reasonable amount of time (a week, minimum) and I can give some indication that the battery is low (less than 24 hours remaining I guess), I'm pretty OK with using a battery powered alarm clock.

csammis posted:

The MSP430 by Texas Instruments is the MCU I use in power-sipping applications because of its extremely low current sleep states. Even the little ones would be able to handle your IO requirements without a problem.

That said, the MCU power cost no matter how you slice it is going to be dwarfed by the LEDs and whatever you are going to use as the alarm function (speaker? piezo buzzer? vib motor?) when it goes off. Is your plan to keep the LEDs on at all times?

edit: I haven't used seven-segment displays and I don't know how it gets divvied up by individual segments but let's say you can get away with 10mA average draw per seven-segment display...obviously the 10s digit for the hour will be off most of the time in 12hr display, so I'm guessing here. Four displays comes out to 40mA, so 1000mAh / 40mA = 25 hours for just the LEDs. You should be able to keep the other components under 2mA average draw without breaking a sweat - a microcontroller in deep sleep will be in the microamp range for most of the time - but that's still only about a day on a single charge for an (optimal) 1000mAh source.

Ah you're right, I didn't mention the piezo buzzer I was planning on using. I'd like the LEDs to be on all the time. Would using PWM or something to have them very rapidly blinking so that it's imperceptible unless you wave the clock around save me significant power? It will be a 24 hour display. The 1000mAh source is maybe on the low side. The idea behind high capacity rechargeable AAs instead would mean that should the batteries get low, I can swap them out instantly rather than having to plug it in and avoid the cable problem.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply