Show Posts
Pages: 1 [2] 3 4 ... 43
16  Using Arduino / Project Guidance / Re: disabling a MAX16910 with a DS3234 on: February 26, 2014, 11:57:29 am
I think the BSS138W is what I need, but I'm not sure of the schematic.  Here's a photo of an attempt.
The MAX16910 when powered up, will supply 5V to the DS3234, an Atmega chip, and other components like a LCD, etc.  When it's not powered up, the DS3234 will run on low quiescent current from it's coin cell battery, awaiting the next alarm trigger to power things back up.

MAX16910 datasheet
http://datasheets.maximintegrated.com/en/ds/MAX16910.pdf

BSS138W datasheet
http://www.fairchildsemi.com/ds/BS/BSS138W.pdf

DS3234 datasheet
https://www.sparkfun.com/datasheets/BreakoutBoards/DS3234.pdf
17  Using Arduino / Project Guidance / disabling a MAX16910 with a DS3234 on: February 26, 2014, 09:58:34 am
http://www.maximintegrated.com/datasheet/index.mvp/id/6336
this regulator uses only 1.6 uA when it's disabled. To enable to regulator, the EnablePin must to driven high. 
https://www.sparkfun.com/datasheets/BreakoutBoards/DS3234.pdf
The DS3234 can sleep, using only 1.5uA from it's coin cell battery.  So I want to shut down my project (Atmega328 is the base of it), by controlling the MAX16910 regulator with the INT pin from the DS3234.  But the DS3234 uses it's alarm to trigger the INT Pin to go LOW, but the MAX16910's enable pin is active high, so to startup the regulator, i have to pull its enable pin HIGH.  Is it possible to have the DS3234's INT pin do this with minimal extra components and quiescent current?
18  Using Arduino / Microcontrollers / Getting back to my question on: February 17, 2014, 06:10:22 am
http://3g1l.com/blog-burn-bootloader-blank-atmega328atmega328p-arduino-uno
On the page we find this:
Quote
Update:
If your chip comes straight out of the factory it 'should' be fused to work without an external clock -  meaning that you don't need the clock and the two capacitors.
But if you allready burnt a bootloader (even if it was aborted) or your supplier modifed the fuses for some reason - you need them.

To remove some of the variables from my question;
1) the only purpose of my project is to burn boot loaders to different chips, so,
     A) it's only a temporary setup for the second chip
     B) the primary chip won't be doing anything else, so it won't matter if even all it's CPU is consumed in this task.
     C). The secondary chip I'm burning, when installed in its permanent home, will have a 10k resistor on the reset pin, and crystal and caps for 16 MHz.

So then I was hoping I could burn a boatloader to them without the caps, & crystal, and maybe even the resistor. But this quote from another website says if the chip is already is fused for a crystal it won't work. I just wondered if this was true?  If it not true, I've got a meat idea that I think others would enjoy, but it means burning a boot loader on an atmega328P-AU without the crystal. And it can't be that it must he fused right to start with. It has to work either way. 
Hope this clears up my question a little.
19  Using Arduino / Microcontrollers / Burning boot loader without reset resistor on: February 16, 2014, 12:49:24 pm
http://arduino.cc/en/Tutorial/ArduinoToBreadboard#.UwD6jX-9KSM
In this example, could the 10K resistor be omitted if the Arduino ISP sketch was modified to set the reset pin high on the chip to be burned, rather than the resistor pulling it high. Would the Arduino not act as the 10K pull-up resistor?  There'd be the issue of current limiting  which the 10K resistor does, but wouldn't the Arduino doing the boot loading limit it's output, and with the whole process just taking long enough to burn a boot loader...  Maybe the 10K is definitely needed?  Anyone know for sure?  Thanks.
20  Using Arduino / Microcontrollers / Re: Arduino as ISP Programmer, but using different pins on: February 16, 2014, 09:44:37 am
When burning a boot loader onto an Atmega328P on a breadboard with an UNO as the ISP, do you necessarily have to use the pins 10 thru 13 on the Arduino UNO. 
You can use any pins you want but you will have to implement a bit-banged SPI.  TinyISP actually has the majority of what you want.  It's coded to use the symbols MISO, MOSI, SCK, and RESET to identify the SPI pins.  Those would have to be changed to whatever pins you want to use.  The relevant code starts here.

Thanks!  I'll check this out and may be back for more help!  I'll set up some code to use alternate pins and see how it works.
21  Using Arduino / Microcontrollers / Re: Is the Micro kinda weird? on: February 15, 2014, 10:46:48 pm
Posting your code for us look at, might speed up the help we can give.
22  Using Arduino / Microcontrollers / Arduino as ISP Programmer, but using different pins on: February 15, 2014, 10:44:43 pm
http://arduino.cc/en/Tutorial/ArduinoISP#.UwA0f3-9KSN
When burning a boot loader onto an Atmega328P on a breadboard with an UNO as the ISP, do you necessarily have to use the pins 10 thru 13 on the Arduino UNO.  Could you use any pins, and just change the pins number in the ISP sketch loaded on the UNO, or does it HAVE to be the pins affiliated with MISO, MOSI, and SCK, on the UNO?
23  Using Arduino / Sensors / Re: Is noInterrupts(); needed with a volatile variable? on: February 06, 2014, 08:32:41 am
Wow!
24  Using Arduino / Sensors / Re: Is noInterrupts(); needed with a volatile variable? on: February 06, 2014, 08:10:40 am
Thanks! That makes sense. Just curious, I wonder how long it takes to read the flowsensecount value?  I guess the flowmeter puts out about 10 pulses per second, so that 100 ms. It probably only takes a ms or 2 to check if flowsensecount is larger than the limit.
25  Using Arduino / Sensors / Is noInterrupts(); needed with a volatile variable? on: February 05, 2014, 11:53:53 pm
In the code below, in void Brew(), do I need the noInterrupts(); and interrupts(); lines?  The variable FlowSensorCount is declared volatile, and an interrupt runs the code "FlowSensorCount++;"
Perhaps I need to turn off interrupts when checking that variable, or maybe not?  Won't that make my flow meter miss some counts when interrupts are turned off.

Code:
// D2---FLOW SENSOR
// D3--WATER VALVE SOLENOID
#include <LED.h>
#include <Button.h>
Button startButton = Button(A5,PULLUP);
Button fullButton = Button(A2,PULLUP);
Button halfButton = Button(A0,PULLUP);
LED startLED = LED(A4);
LED fullLED = LED(A3);
LED halfLED = LED(A1);
//3 selection conditions:
const int emptyPot = 0;   //no selection made
const int fullPot = 1;    //full pot selection
const int halfPot = 2;    //half pot selection
// variables:
int potSelection = 0;     //selection starts out with nothing on power up
int fullCount = 200;     //number of pulses for a full pot of coffee
int halfCount = 100;     //number of pulses for a half pot of coffee
unsigned long lastPress;  //last time any button was pressed, for timeout
//***************setup variables***************
volatile int FlowSensorCount;  //the counter for the flow sensor
void setup() {
  Serial.begin(9600); //initiate serial port
  Serial.println("Bunn Coffee Water Version 1.0");

  attachInterrupt(0, CountPulse, RISING);//turn on interrupt for flow sensor on pin 2
  digitalWrite(2, HIGH);    //turn on pull up resistor for flow sensor on pin 2
  delay(200);
}

void CountPulse() //called from the interupt on Pin 2, from the water sensor
{
  FlowSensorCount++;  //increases count by 1
}

void loop() {
  updateStartLED(); //update start LED status
  if (fullButton.isPressed()){ //if the full button was pressed
    lastPress = millis(); //update the time
    Serial.println("Full Selection Button was pressed");
    fullLED.on();  //turn on full LED
    halfLED.off();   //turn off half LED
    potSelection = fullPot; //they selected a full pot
  }
  if (halfButton.isPressed()) { //if the half button was pressed
    lastPress = millis(); //update the time
    Serial.println("Half Selection Button was pressed");
    halfLED.on(); //turn on half LED
    fullLED.off();//turn off full LED
    potSelection = halfPot; //they selected a full pot
  }
  if (startButton.isPressed()) { //if the startbutton was pressed
    lastPress = millis(); //update the time
    Serial.println("Start Button was pressed");
    if (potSelection == fullPot) Brew(fullCount); //brew a full pot
    else if (potSelection == halfPot) Brew(halfCount); //brew a half pot
    else flashSelection();
  }
  if (millis() - lastPress > 10000) { //they changed their mind?
    potSelection = emptyPot; //cancel the selection
    fullLED.off(); //turn off any LEDS
    halfLED.off(); //turn off any LEDS
    startLED.off(); //turn off any LEDS
  }
  delay(100);
}

void Brew(int pulseCount){
  int solenoidPin = 3; //water valve solenoid pin
  pinMode(solenoidPin, OUTPUT); //set it as an output   
  FlowSensorCount = 0; //reset sensor count
  digitalWrite(solenoidPin, HIGH);  //turn on the water valve
  while (1) {
    noInterrupts();
    if (FlowSensorCount >= pulseCount) {
      digitalWrite(solenoidPin, LOW);  //turn off the water valve
    interrupts();
    break;
    }
  }
}

void updateStartLED() {
  if (potSelection == emptyPot) return; //no selection is made so do nothing with the start LED
  unsigned long lastBlink; //last state change
  if (millis() - lastBlink > 500) { //it's time to toggle
    startLED.toggle();
  } 
}

void flashSelection() {
  //user pressed start before making a selection
  //flash the half and full LEDS to give them a hint on what to do!
  Serial.println("make a selection first! (Half or Full)");
  boolean state;
  halfLED.on();
  for (int i = 0; i < 10; i++) {
    state = !state; //change the LED state
    halfLED.toggle();
    fullLED.toggle();
    delay(100);
  }
  halfLED.off();  //turn off on leaving
  fullLED.off();  //turn off on leaving
}
26  Using Arduino / General Electronics / Re: Protecting 120 VAC on my board on: February 05, 2014, 12:23:38 am
I have lots of different paints, enamels, silicone caulk, plumber goop…  Would any of these work to project the bottom of the board?
27  Using Arduino / General Electronics / Protecting 120 VAC on my board on: January 03, 2014, 11:57:22 pm
I have made my first board with high voltage on it, as seen in my photo.  I added Bstop to the high voltage traces so I could tin them and make them carry more current.  I'm wondering if there's some kind of household goop that I could coat the bottom of the board with to keep from being able to touch the high voltage contacts on the bottom?
28  Using Arduino / Motors, Mechanics, and Power / replacing the relay in this schematic on: December 19, 2013, 11:11:27 pm
I am wanting to use some of these relays with my Atmega328P:
http://www.digikey.com/product-detail/en/IM03DGR/PB1172CT-ND/1828462

They have a coil current of 28ma and coil voltage of 5 volts.  Would the schematic from this relay kit work well to control this relay? https://www.sparkfun.com/products/11042
29  Using Arduino / General Electronics / Re: First attempt at home skillet reflow on: December 19, 2013, 03:38:37 pm
Thanks for the pointers!
30  Using Arduino / General Electronics / Re: First attempt at home skillet reflow on: December 19, 2013, 02:27:58 pm
Ok thanks! I'll start keeping an eye out for an old thrift store special toaster oven.
I also will read up on the temperature stages. I've seen that data on data sheet but have never done this before. I kinda figured if 260°C was the goal, I could just go real slow and take as long as I needed to get to that point, but maybe it doesn't work that way.
Pages: 1 [2] 3 4 ... 43