1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Attiny slow rising power up voltage

Discussion in 'Microcontrollers' started by dr pepper, Jul 2, 2017.

  1. dr pepper

    dr pepper Well-Known Member Most Helpful Member

    Joined:
    Oct 6, 2008
    Messages:
    4,755
    Likes:
    258
    Location:
    North west UK
    Ok, I'm more used to pic's when it comes to this.
    I'd like to over complicate my bicycle lights with an Attiny85, the lights are dynamo powered.
    Coding the system and the hardware are no problem for me, however I was wondering how the attiny would cope with the supply voltage going up & down being dynamo powered, well actually its an alternator, the voltage comes up to enough to run the lights at walking speed but for electronics the 1 second it takes is a very long time.
    Is there a power up timer on this chip?, and can I enable it using the arduino ide?, or is it enabled by default.
     
  2. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,323
    Likes:
    653
    Location:
    Derbyshire, UK
    ONLINE
    So why not use a small PIC?.

    Power wise, I would suggest you're going to need to arrange stable power whatever device you use.
     
  3. dr pepper

    dr pepper Well-Known Member Most Helpful Member

    Joined:
    Oct 6, 2008
    Messages:
    4,755
    Likes:
    258
    Location:
    North west UK
    Too lazy I spose, I like the arduino ide.
    I got a pic 12f683 to work on something similar, a solar cell without a battery, and it was fine, I dont know for sure however I think I'd be ablet= to get it to work Ok on a fluctuating power source.
    Actually the system will have a battery, but the idea is to get the processor to flash some Led's for a while after the push hog has stopped then go to sleep mode and save power, switching from batts to alty is still going to make a unstable power rail, theres every chance the chip will lock up.
    And thinking about the i/o, I'll have 2 x 5mm leds and a 10w led in the rear, and a 10w led in the front, a pushbutton and an i/p for alty making power, that allready exceeds the 5 i/o's the attiny has, so it looks like it'll be a 'duino mini 168 I got a load cheap.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,869
    Likes:
    144
    Location:
    morristown,tn

    The Attiny85 said it will power on at above 1.7 volts
    But you got do as Nigel said figure a stable power out
     
  6. dr pepper

    dr pepper Well-Known Member Most Helpful Member

    Joined:
    Oct 6, 2008
    Messages:
    4,755
    Likes:
    258
    Location:
    North west UK
    Do you mean shutdown Burt?
    I spose I got to do some research, the pic has a power up timer which holds the chip in reset if the rail is low, and also a brown out detect which does the same after power up.
    Just watched a youtube vid, someone doing a teardown on a rocket part, the electronics were powered by a wind generator, and the proc was indeed a microchip pic.
     
  7. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,323
    Likes:
    653
    Location:
    Derbyshire, UK
    ONLINE
    Why not power the processor from a small rechargeable battery, or even a 'super' capacitor - charged from the dynamo, and used solely for powering the processor.
     
  8. dr pepper

    dr pepper Well-Known Member Most Helpful Member

    Joined:
    Oct 6, 2008
    Messages:
    4,755
    Likes:
    258
    Location:
    North west UK
    Super cap is an interesting idea, a little'n to power the chip, and a big'n to power the small leds when stopped, and put the chip in sleep when the big'n has discharged & keep it alive.
    I dont have much room in my placcy box though 100 x 100, maybe make a hole and stick the cap through it.
    Now I need to work out out how many farads it takes to flash 4 leds for 2 minutes and keep a at328 alive for a few days, at 300nA deep sleep probably not so big.
     
  9. ronsimpson

    ronsimpson Well-Known Member Most Helpful Member

    Joined:
    Apr 17, 2007
    Messages:
    7,360
    Likes:
    972
    Location:
    Loveland, CO USA
    The LED flash rate and duty cycle can change when the "big" cap get too low.
    Flash like mad when you have the power but when there is no power being generated, cut the power used way back.
     
  10. dr pepper

    dr pepper Well-Known Member Most Helpful Member

    Joined:
    Oct 6, 2008
    Messages:
    4,755
    Likes:
    258
    Location:
    North west UK
    Good idea that.
    Finding a supercap isnt easy, I need 4.7F @ 16v, I'd rather not series them, but that might be the only way sensoble cost wise..
     
  11. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,323
    Likes:
    653
    Location:
    Derbyshire, UK
    ONLINE
    Use a battery - FAR better (and much cheaper) than a supercap (which aren't very 'super' at all).

    I only mentioned them as a 'stable' supply for the micro, to avoid your potential reset problems.
     
  12. ronsimpson

    ronsimpson Well-Known Member Most Helpful Member

    Joined:
    Apr 17, 2007
    Messages:
    7,360
    Likes:
    972
    Location:
    Loveland, CO USA
    Most modern micros have good "power up reset" circuits.
    If not there is an 3 legged IC that monitors the power and does a power-on-reset.
    --------------------------
    Last time I worked on something like this; at low speed the alternator only gave a pulse every 1/10 of a second. So power the LEDs directly off the alternator. Use a diode+cap=peak detector to power the micro. Size the cap to hold for a second or two. Run the micro in 32,000hz mode not 8mhz. In low power mode many micros pull only uAs.
     
  13. dr pepper

    dr pepper Well-Known Member Most Helpful Member

    Joined:
    Oct 6, 2008
    Messages:
    4,755
    Likes:
    258
    Location:
    North west UK
    The 'duino does have power up timers and a brown out detect, so it should cope, I'm going to put together a test jig and run it off my bench supply, instead of varying the voltage from the bench supply I'll put a pot inline and increase the resistance till the chip browns out, in the attempt to mimic how a hub alty works, as I understand it the impedance increases as the thing slows down.
    Ron, a max803 or the likes?, yes thats an idea, theres a good chance I'll be using eeprom with this project, I'd allready thought of protection for that, measure the supply voltage and only write to the prom if the voltage is high enough, then I can be sure theres enough juice in the cap to keep the system alive long enough for the prog cycle.
     

Share This Page