Show Posts
Pages: [1] 2 3 4
1  Using Arduino / Motors, Mechanics, and Power / Re: Mosfet and switching regulator on: June 06, 2012, 10:25:40 am
So something like this http://www.digikey.com/product-detail/en/LP38692MP-5.0/LP38692MP-5.0CT-ND/723513 would probably work better? Thanks again for the help, I didn't even think to look for regulators with an enable pin. Should I use a current limiting resistor on the enable pin if I end up going with one of those?
2  Using Arduino / Motors, Mechanics, and Power / Re: Mosfet and switching regulator on: June 06, 2012, 04:43:58 am
Thanks for the help. I'm actually running two servo's off the regulator, just trying to keep the schematic simple. It's for a pair of cat ears mounted on a headband. I'll check on the current draw when I get back from work.I'm trying to keep the circuit size small so that all the components can fit inside the ears, otherwise I would just use one mosfet per servo. Besides saving power I was wanting to cut power to the servo's because even when I don't write to them they tend to jitter a little, but that may be my code. I'll take a look at the mcp1702's.
3  Using Arduino / Motors, Mechanics, and Power / Re: Mosfet and switching regulator on: June 05, 2012, 11:13:35 pm


Sorry for the crappy schematic. U2 is the 3.3v regulator, it is attached to the 328p with appropriate filtering caps (I just didn't add them in because I have to head to work in a minute). U1 is the 5v regulator. R1 is a pulldown resistor and R2 is a current limiting resistor.

When I set pin 14 Low I'm expecting to cut power to the 5v rail, this is not happening. If I connect the servo ground to the fet drain instead of the regulator ground to the fet drain, then set pin 14 low, the servo will not move even when it is pulsed. That is functioning as I would expect. If I manually disconnect ground from the regulator then the 5v rail loses power as I want. It's just not working when wired as the schematic I've attached. If it won't work this way I'll look into getting some P-channel mosfet's, I don't currently have any.

would you recommend something like this http://www.digikey.com/product-detail/en/LP2985IM5-3.3%2FNOPB/LP2985IM5-3.3CT-ND/334984 to replace the 3.3v regulator?
4  Using Arduino / Motors, Mechanics, and Power / Mosfet and switching regulator on: June 05, 2012, 12:18:42 pm
I have a bare 328p hooked up to a 3 volt switching regulator off of a 7 volt lipo. I am also running a 5 volt switching regulator to supply power to some servo's that the 328p is controlling that won't run off of the 3 volt. I'm trying to cut power to the 5 volt regulator when I'm not using the servo's to conserve power. This works correctly if I hook the servo's ground up to the drain on the mosfet that I'm using, but it doesn't work if I hook up the regulator's ground to the mosfet, is this not going to work? I'd like to conserve as much power as possible when it's in sleep mode. I'm using a http://www.digikey.com/product-detail/en/NTD3055L104-1G/NTD3055L104-1GOS-ND/1484764 for the mosfet and these http://www.digikey.com/product-search/en/power-supplies-board-mount/dc-dc-non-isolated-linear-regulator-drop-in-replacement/4326593?k=oki for the regulators. Thanks
5  Using Arduino / Project Guidance / Re: RFID Reader on: May 28, 2012, 10:53:12 pm
maybe this article will help with setting it up http://hackaday.com/2012/05/27/reading-rfid-cards-from-afar-easily/.
6  Using Arduino / Project Guidance / Re: Simple one way wireless switch on: May 28, 2012, 01:12:03 pm
sorry for spamming, actually just found this http://www.ebay.com/itm/RF-Wireless-Remote-Control-Receiver-Modul-315MHz-/160446634532?pt=Garage_Doors_Openers&hash=item255b5d5a24 which should be easier to set up.
7  Using Arduino / Project Guidance / Re: Simple one way wireless switch on: May 28, 2012, 01:08:22 pm
not totally sure if this would work, but you should be able to get one of these http://www.ebay.com/itm/315-MHz-Wireless-Radio-Superregeneration-Receiver-0243-/190676310334?pt=Radio_Control_Vehicles&hash=item2c6531993e and a remote like this http://www.ebay.com/itm/RF-315MHz-Wireless-Electric-Garage-Gate-Door-Remote-/170775117936?pt=Garage_Doors_Openers&hash=item27c2fd8070. Then just find what code the remote is sending by listening for it and use that combo. Someone with more experience with this chime in and let me know if it would work.
8  Using Arduino / Installation & Troubleshooting / Re: Printing out sketch on: May 28, 2012, 12:14:27 pm
have you tried just opening the files in wordpad?
9  Using Arduino / General Electronics / Re: Battery life... on: May 28, 2012, 11:09:28 am
I would look into something like this http://www.ebay.com/itm/Flight-Max-4000-mah-2S-7-4V-Lipo-Battery-20C-Fits-Traxxas-Rustler-VXL-New-Hard-/310403171828?pt=Radio_Control_Parts_Accessories&hash=item48457885f4. Without know the current draw it's hard to tell, but I'd questimate the battery I linked to would get around 10 hours of run time at full brightness. You can also run the leds at a lower brightness with PWM and it can sometimes reduce the power consumption without drastically reducing the brightness.
10  Using Arduino / Programming Questions / Re: Flashing an LED whilst in an interrupt function on: May 28, 2012, 08:37:25 am
you could set a global variable in the interrupt and check it's state in the main loop. That way you can do the flashing in the main loop, not the interrupt.
11  Using Arduino / Project Guidance / Re: New here - Questions About Java/Android on: May 28, 2012, 05:32:59 am
you could get something like this http://www.goodluckbuy.com/serial-bluetooth-rf-transceiver-module-rs232-w-backplane-enable-and-state-pin-1.html and interface them with bluetooth serial. The bluetooth module is really easy to use, I use it on several of my barebone boards.
12  Using Arduino / Project Guidance / Re: DTMF decoding with Arduino on: May 27, 2012, 01:57:02 pm
Someone may come up some better hints, but something along these lines should help cut the memory usage a lot. If you need any of it explained let me know.

Code:
#define Q1 4
#define Q2 5
#define Q3 6
#define Q4 7
#define RED 8                   // 1st device (RED LED)
#define GREEN 9                 // 2nd device (GREEN LED)
#define std_out 10

void setup() {
  pinMode(Q1, INPUT);
  pinMode(Q2, INPUT);
  pinMode(Q3, INPUT);
  pinMode(Q4, INPUT);
  pinMode(std_out, INPUT);
  pinMode(RED, OUTPUT);
  pinMode(GREEN, OUTPUT);
}

void loop() {
  byte key;
 
  // wait a bit...
  delay(500);
 
  // read inputs
  key = read_inputs();
 
  if (key == B1000)            // if 1st device detected with '1000' (key 1)
  {
    while (digitalRead(std_out) == LOW);                            // wait for next key press
   
    delay(100);
   
    key = read_inputs();
   
    if (key == B1101)        // if '1101' (key *) is pressed...
    {
      digitalWrite(RED, HIGH);                                      // turn on 1st device
    }
    else if (key == B0011)    // if '0011' (key #) is pressed...
    {
      digitalWrite(RED, LOW);                                       // turn off 1st device
    }
  }
 
  else if (key == B0100)       // if 2nd device detected with '0100' (key 2)
  {
    while (digitalRead(std_out) == LOW);                            // wait for next key press
   
    delay(100);
   
    key = read_inputs();
   
    if (key == B1101)        // if '1101' (key *) is pressed...
    {
      digitalWrite(GREEN, HIGH);                                    // turn on 2nd device
    }
    else if (key == B0011)    // if '0011' (key #) is pressed...
    {
      digitalWrite(GREEN, LOW);                                     // turn off 2nd device
    }
  }

}

byte read_inputs(){
  byte key = 0;
  if(digitalRead(Q1)) key &= 1;
  key <<= 1;
  if(digitalRead(Q2)) key &= 1;
  key <<= 1;
  if(digitalRead(Q3)) key &= 1;
  key <<= 1;
  if(digitalRead(Q4)) key &= 1;
  return key;
}
13  Using Arduino / Networking, Protocols, and Devices / Re: MMA7660 will only read the first register on: December 01, 2011, 02:24:07 pm
Thanks a ton, works great now.
14  Using Arduino / Networking, Protocols, and Devices / Re: MMA7660 will only read the first register on: December 01, 2011, 12:28:24 am
Thanks, I'll give your library a shot  smiley-grin
15  Using Arduino / Networking, Protocols, and Devices / Re: MMA7660 will only read the first register on: November 30, 2011, 05:11:08 pm
So I read the data sheet a little more carefully and found that the register pointer is reset when it receives a stop condition over I2C. So I tried removing the wire.endTransmission() and adding another Wire.beginTransmission() before I do the Wire.requestFrom(MMA7660_CTRL_ID, 1). It's still resetting the pointer though, any hints? Here's the part from the datasheet:

Quote
MMA7660FC clears its internal register address pointer to register 0x00 when a STOP condition is detected, so a single byte write has no net effect because the register address given in this first and only byte is replaced by 0x00 at the STOP condition. The internal register address pointer is not, however, cleared on a repeated start condition. Use a single byte write followed by a repeated start to read back data from a register

I can get the information if I read all the registers at once and just grab the one I want, but it seems kind of wasteful. Here's the hack I'm using for now:
Code:
uint8_t MMA7660::read(uint8_t REG_ADDRESS){
Wire.beginTransmission(MMA7660_CTRL_ID);
Wire.write(REG_ADDRESS);  // register to read
Wire.endTransmission();
Wire.requestFrom(MMA7660_CTRL_ID, REG_ADDRESS + 1); // read a byte
while(! Wire.available()){
delay(1);
}
while(Wire.available() > 1){
Wire.read();
}
return Wire.read();
}
Pages: [1] 2 3 4