Show Posts
Pages: [1] 2 3 ... 44
1  Using Arduino / General Electronics / Re: 315Mhz transmitter, push button version on: September 01, 2014, 06:13:38 pm
Once you open the keyfob housing, what you have is a naked circuit board. How is that different than buying one, if it does what you want?
As my original post says, I need a solid, reliable, 'finished' looking product.  Not one that is made from a hacked apart key fob. Think, 'something you could market' not "something you built in your basement".

Quote
The first link points to a transmitter/receiver combination that does require a microcontroller or chip to generate/decode the transmission. The second link points to a board with an encoder chip, which is what you will find inside the keyfob.
No, it does not. The transmitter works as a stand alone key fob.
2  Using Arduino / General Electronics / 315Mhz transmitter, push button version on: August 31, 2014, 07:28:51 pm
I have used a fee of these:
http://www.ebay.com/itm/171126910799
The transmitter is a key fob.  But now I have a project that I need a remote switch to activate the transmitter, not a key fob button.  I don't want to try to tear apart a key fob and 'hot wire' connections to it, as it needs to be a solid, reliable finished product.
There are dozens of these:
http://www.ebay.ca/itm/190938367165
But am I correct in that you can't just hook a momentary button up these these, but rather they have to have an Arduino or something generating the code? 

I see this one that uses the word 'encoder' and I think, but am not sure it will work with just a remote push button?
http://www.ebay.com/itm/290964097931

But also, I am needing it within 10 days (here in USA), and this one is overseas. Does anyone know of where to buy something like this (if this will work the way I think) here in the states? 

So basically, I'm needing something that works just like the key fob transmitter, but one that I can connect wires to an external switch. I only need one channel.
Thanks for any help on this!
3  Using Arduino / Sensors / Re: Opto Tilt Switch connection on: August 29, 2014, 06:09:52 pm
Thanks.
4  Using Arduino / Sensors / Opto Tilt Switch connection on: August 29, 2014, 01:40:11 pm



On this tilt switch by NKK, would I connect Vout directly to an arduino digital pin, or would I need a resister in series (for what ever reason, I'm not sure).
The simple schematic is on page three of this data sheet:

http://www.nkkswitches.com/pdf/ds-bTiltSwitch.pdf

Here's my eagle schematic:
5  Using Arduino / Storage / Re: Atmega328P-AU interfacing with an SD Card at 3.3 V system voltage on: July 27, 2014, 02:14:33 pm
Thanks!
6  Using Arduino / Storage / Atmega328P-AU interfacing with an SD Card at 3.3 V system voltage on: July 24, 2014, 02:11:27 pm
I've never made anything except 5 volt projects, but trying to connect an SD card, I think it might be time to test out a 3.3 volt system. I think the answer is yes to all these questions, but I just want to be sure:
If my Atmega328P-AU runs at 3.3 volts, I can just connect pins 10-13 (SPI) directly to the SD socket?.
If I run it at 3.3Volts, I'll need to flash a different Bootloader on the Atmega328P-AU than the one I use for 5volt?
I will need to use an 8Mhz crystal instead of a 16Mhz one?
I have an FTDI board I use to program my projects that has a 3.3V/5V switch, so I can use that to program it?
Thanks
7  Using Arduino / General Electronics / Re: resistor placement for Atmega328P-AU on: July 19, 2014, 11:30:31 am
Yes.
Don't forget  a cap on Avcc also.
Thanks, for verifying that for me.
8  Using Arduino / General Electronics / resistor placement for Atmega328P-AU on: July 19, 2014, 09:31:45 am
I've started using 2 decoupling caps for the AU version, since there's Vcc/GND on 2 opposite sides of the chip.  To try to keep them as close to the chip as possible had to run the Aref grounding cap through the one.  I guess this is ok.  See the photo.  The cap on the cap side of the Atmega is a Vcc/gnd decoupling cap, and the cap right above it is the Aref cap that goes to GND.  Does this layout look suitable?
thanks.
9  Using Arduino / Project Guidance / Re: disabling a MAX16910 with a DS3234 on: July 03, 2014, 03:21:11 pm
I really would like to be able to power up a project using the alarm from the DS3234 RTC, so as to have ultra low quiescent current.   The DS3234 only uses about 1.5uA when running off the coin cell, and the MAX16910 regulator only uses 1.6uA when in shutdown. I see 2 problems I'm not sure how to overcome.

1) The data sheet says the INT pin on the DS3234 needs a pull-up resister.  But if it's connected to 5V like in my schematic, there isn't 5V because the regulator will be powered off.

2) Enable on the regulator needs to be pulled high (2.4V or more, from the data sheet) to start up the regulator. But when the RTC chip's alarm is triggered, the INT pin goes LOW.

    I've drawn up these 2 components with their recommended schematics from the data sheets.  See the attached photo or pdf file.
thanks for the help!
10  Using Arduino / Programming Questions / Re: #ifdef doesn't seem to be working on: July 02, 2014, 08:07:51 am
WHEW! Thanks again.  I thought I was in big trouble, but you are right:

Code:
#include <EEPROM.h>
#include "writeAnything.h"
#include <math.h>
//#define PCB_Version_2.0
//#define PCB_Version_4.0
#define PCB_Version_4.2

int CenterDebounce = 15;  //+- this much is still considered center on the joystick
int motorUpPin = 6;   
int motorDownPin =11;
int LEDpin;
int analogPin;
int buttonPin;
char splashScreen[50];
struct config_mySettings { //these are stored in EEPROM
  unsigned long center;    //center reading of axis on joystick
  unsigned long up;        //upper limit of axis on joystick
  unsigned long down;        //lower limit of axis on joystick
}
joystick;

I will touch up my code, putting them back the way they should be.  I had moved them to setup(), trying to solve that initial problem.
thanks again.
11  Using Arduino / Programming Questions / Important Concern on: July 01, 2014, 09:56:06 pm
I have finished a project and have a few motor controllers ready to ship out to friends.  But I see now that my sketch does what you said not to do.  But it works, so I don't understand why.  I declared my variables in setup(), but use them in loop().  But my controllers work perfect, so will they ever stop working because of this?  The variables in question don't actually change, they are just defining pin numbers.  see my setup and loop below:

Code:
void setup(){
    Serial.begin(9600);
#ifdef PCB_Version_2.0
  LEDpin = A1;        //power indicator
  analogPin = A2;     //joystick connected to A2
  buttonPin = A5;     //program button on digital pin 2
#endif

#ifdef PCB_Version_3.0
  LEDpin = A1;        //Power indicator
  analogPin = A3;     //joystick connection pin
  buttonPin = A5;     //program button
#endif

#ifdef PCB_Version_4_0
  LEDpin = A5;        //Power indicator
  analogPin = A3;     //joystick connection pin
  buttonPin = 2;      //program button
#endif

#ifdef PCB_Version_4.2
  LEDpin = A5;        //Power indicator
  analogPin = A2;     //joystick connection pin
  buttonPin = 2;      //program button
#endif
  
  pinMode(buttonPin, INPUT);  //set pin as input
  pinMode(motorUpPin, OUTPUT);
  pinMode(motorDownPin, OUTPUT);
  pinMode(LEDpin, OUTPUT);
  digitalWrite(LEDpin, HIGH); //power indicator
  digitalWrite(buttonPin, HIGH);  //turn on pullup resistor
  digitalWrite(motorUpPin, LOW);  //be sure motor is off
  digitalWrite(motorDownPin, LOW);  //be sure motor is off
  analogWriteSAH_Init();  //this initiates the PWM timer to run on 20Khz
  EEPROM_readAnything(50, joystick);     //load settings from EEPROM
}

void loop(){
  if (buttonPressed()) {  //has the program button been pushed?
    Serial.println("The button has been pressed.");
    Serial.println("Entering program mode.");
    programMode();  //enter program mode if so
  }
  int reading = analogRead(analogPin);  //get a reading from the analogPin
  if (reading < 100 || reading > 900) error(); //the reading is way out of range (connector failure??)

  int offset = reading - joystick.center; //how far the reading is from the center value
  offset = abs(offset);
  //Serial.print("THE READING:  ");
  //Serial.println(reading);
  if (offset < CenterDebounce) { //we'll allow for the center reading to float a little
    motorIdle();  //turn off motor if it's this close to center
  }
  else if (reading > joystick.center) motorUp(reading);   //motor up in this range  ( center + 35 < reading < 900 )
  else if (reading < joystick.center) motorDown(reading); //motor down in this range ( center - 35 > reading > 100 )
  delay(10);
}

I can change them all if need be, but it will envolve a great deal of unpackaging.  They work now.  Will they ever NOT work because of this problem?  What I've read online says a variable declared in setup is NOT available to use in the loop.
12  Using Arduino / Programming Questions / Re: #ifdef doesn't seem to be working on: July 01, 2014, 09:40:07 pm
Ok, thanks for solving that mystery!
cheers.
13  Using Arduino / Programming Questions / #ifdef doesn't seem to be working on: July 01, 2014, 11:11:00 am
I've seen people use this in code, and thought I'd try it.  I have different PCB version, which use different pins from the Arduino.  So I can uncomment the version I need when uploading, but I get the redeclaration error. Is there something wrong with the way I'm using #ifdef?


Code:
//#define Version_3.0
//#define Version_4.0
//#define Version_4.1
#define Version_4.2

int CenterDebounce = 15;  //+- this much is still considered center on the joystick

struct config_mySettings { //these are stored in EEPROM
  unsigned long center;    //center reading of axis on joystick
  unsigned long up;        //upper limit of axis on joystick
  unsigned long down;        //lower limit of axis on joystick
}
joystick;


void setup(){
#ifdef Version_3.0
  int motorUpPin = 6;     //pin 6
  int motorDownPin = 11;  //pin 11
  int LEDpin = A5;        //Power indicator
  int analogPin = A2;     //joystick connection pin
  int buttonPin = 2;     //program button
#endif

#ifdef Version_4.1
  int motorUpPin = 6;     //pin 6
  int motorDownPin = 11;  //pin 11
  int LEDpin = A5;        //Power indicator
  int analogPin = A2;     //joystick connection pin
  int buttonPin = 2;     //program button
#endif

#ifdef Version_4.2
  int motorUpPin = 6;     //pin 6
  int motorDownPin = 11;  //pin 11
  int LEDpin = A5;        //Power indicator
  int analogPin = A2;     //joystick connection pin
  int buttonPin = 2;     //program button
#endif
14  Using Arduino / Microcontrollers / Re: Atmega328P-AU is working, but won't take an upload on: June 20, 2014, 10:41:39 pm
I figured it out.  I had to change to board to Arduino Pro Mini, instead of Uno.  On Atmega328P-AU chips I've bought with the boot loader already on them, I just just UNO as the board, but when I loaded the boot loader on mine, I used Pro Mini as the board.  The ones I've bought must have had a different boot loader on them.
15  Using Arduino / Microcontrollers / Atmega328P-AU is working, but won't take an upload on: June 20, 2014, 04:36:14 pm
I burned the boot loader on these, and then uploaded a sketch that blinks D13, and sends a Serial String out every second, so it is easy to test them when installing them on new boards.  I uploaded this sketch on them via arduino's boot loader, not the ISCP header, so that I'd know for sure the bootload went ok.
So now, I have two of these new boards, and and after populating them, they both send out the serial string when I connect them with my FTDI breakout, but neither will take an upload.   Being that they send out the serial, that means the power supply is connected to the chip correctly thru the FTDI breakout, and that the TX is connected.  I check the continuity of the DTR pin, and the 0.1uF cap on it, which checked correctly at 100nF.  
Any ideas why this would be.  I even took off a few components like a Pololu SW and a remote RF receiver from one of them, but that didn't help.
I've cleaned them 3 times with alcohol and a toothbrush. I've also connected 12v to it's powered supply which feeds the board thru a 5 volt LM1117, and it would light up the onboard LED and continue to send the Serial string...

edit: I'm sorry these photos are upside down! also, I've tried my FTDI cable with a different project, and it works fine loading sketches on it.  It's also the Atmega328P-AU version.

Oh, the issue is, I get the message  avrdude: stk500_getsync(): not in sync: resp=0x00
Pages: [1] 2 3 ... 44