4 Replies Latest reply: Dec 3, 2012 11:47 AM by nathanjseeley RSS

need help picking components

l1t7l3ph0o7 Level 3

Ok I have a project that requires 3 pwm outputs and two digital inputs

I'm looking for an 8-pin MCU where i can just analogWrite to the PWM pins instead of mucking around with software PWM.

 

I've tried the attiny45, but have had no succcess with pwm on three pins, the closest i can get makes one of the inputs high, and i need that input for a button.

Aslo i need to be able to program it with my arduino uno, I see i can program lots of chips with the arduino, so i don't forsee that to be a problem.

 

also using the PWM pins I intend to control three mosfets to control 1 meter 30 led 12v led strip i got from sparkfun.com, and I would like to find a one chip solution to do that, or at least find another way to make the circuit smaller.

 

I am open to using bigger chips, though I need to keep the circuitboard small, it has to fit in a very tight place.

  • 1. Re: need help picking components
    l1t7l3ph0o7 Level 3

    Just to elaberate, I am new to arduino and programming, I would like to learn as much as I can about it, And this is my very first project that I really want to see to the end!

     

    I have written a program that works (almost) perfectly, when I upload it to the arduino uno. I say almost because there is one unexpected behavior, but it's no big deal.

    When I upload it to my ATTINY45, I get irratic behavior, that I beleive is due to limitations of the chip?

    I'm not trying to accomplish a lot, but I have been racking my brain trying to figure this out.

     

    The only thing I do different between the arduino and the ATTTINY45 is re-assign the pins before I upload the sketch.

  • 2. Re: need help picking components
    nlarson PremierFarnell

    Hi there - not sure if you had seen our resident expert in Arduino, Jeremy Blum?  Feel free to ask him if you don't get any replies on this thread   We've also got an Arduino group that has lots of super experienced Arduino people too. 

     

    Good luck and also welcome to element14 Community!

  • 3. Re: need help picking components
    Cabe Atwell Level 15

    Check out the PIC10F or PIC12F series.

     

    If you go up the PIC family tree, you may find that some will handle PWM built in. What are you going to do with the mosfets ultimately?

     

    Cabe

  • 4. Re: need help picking components
    nathanjseeley Level 3

    The other thing you could use Is some 555 timers for the pwm and then use the attiny45 to handle the button. You can find some 555 calculators on the web so you can get your desired frequency. Infact (from the sound of it) you could almost use 555 timers for the whole project (not that I would recomend that)