Show Posts
Pages: [1] 2
1  Using Arduino / General Electronics / High power 5V for sparkfun gap igniter on: August 30, 2013, 03:53:16 pm
I've created an fire-spitting dinosaur.
Works cool but I need a higher power 5 v supply.
It runs on a 12V battery, but for the spark i'm using a 230V supply reduced to 5V by a transformer. (sparkfun gap igniter == cool!!!)
How can I reduce the 12V to 5V 3Amps!
I've tried an 78T05 but that one fried after a couple of seconds.
2  Using Arduino / LEDs and Multiplexing / Re: not understanding 7 segment multiplexing on: January 07, 2012, 10:16:57 am
there are 2 different 7 segment displays:
one with a common anode or one with a common cathode.

  • with the common anode you connect the (1 or 2) anodes with the +12V and the other 8 cathodes via an normal NPN-transistor (eg: 2n2222) to the GND.
  • with the common cathode you connect the (1 or 2) cathodes with the GND and the other 8 anodes via an PNP-transistor to the +12V.

I would go for the first option and control the NPN-transistors via 4 shift regs
3  Using Arduino / Project Guidance / Re: ultrasonic transducer for water level on: January 07, 2012, 05:30:10 am
found this one already?
http://howmuchsnow.com/waterlevel/
I'v tried several ways to determine the waterlevel in my watertanks but this is the first stable version.
My watertank is just 1 meter deep so I'm using the http://www.sparkfun.com/products/8958
4  Using Arduino / Project Guidance / Re: Send serial signals wirelessly form iPhone 4 to arduino on: October 24, 2011, 02:16:45 pm
here is the code:
In the osc interface on your iphone you need to have 7 buttons:
stop, cw, ccw, up, dwn, hsup, hsdwn.
Dont know why but I changed the serverport to 10000 iso 9000.
it works.

Code:
// 24 OCT 2011
// ifoon crane interface
// IP address 192.168.30.177 , port 10000

#include <SPI.h>
#include "Ethernet.h"
#include "OSCClass.h"


int IfoonControlPin = 8;
int CraneDwnSwPin = 7;
int CraneUpSwPin = 6;
int CraneCWSwPin = 2;
int CraneCCWSwPin = 3;
int WinchUpSwPin = 4;
int WinchDwnSwPin = 5;
uint8_t ch;
uint8_t val[16];
int counter;
int CraneHeight = 900;
long prevOSCTransmission = millis();

OSCMessage recMes;
OSCMessage sendMes;
OSCClass osc(&recMes);

uint8_t *destIp;
int  destPort = 9000;
char *topAddress="1";
char *subAddress[1]={ "height"  };


byte serverMac[] = {
  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte serverIp[]  = {
  192, 168, 30, 177 };
int  serverPort  = 10000;
char *page;
char *IfoonCommand;
float value = 0;
int intvalue = 0;
int cw = 0,
ccw = 0,
CraneUp = 0,
CraneDwn = 0,
WinchUp = 0,
WinchDwn = 0,
StopCrane = 0;
long LastPingMillis = millis();

void setup() {
  Serial.begin(19200);
  Ethernet.begin(serverMac ,serverIp);
  osc.begin(serverPort);
  pinMode(IfoonControlPin, OUTPUT);
  pinMode(CraneDwnSwPin, OUTPUT);
  pinMode(CraneUpSwPin, OUTPUT);
  pinMode(CraneCWSwPin, OUTPUT);
  pinMode(CraneCCWSwPin, OUTPUT);
  pinMode(WinchUpSwPin, OUTPUT);
  pinMode(WinchDwnSwPin, OUTPUT);

  digitalWrite(IfoonControlPin, LOW);
  digitalWrite(CraneDwnSwPin, LOW);
  digitalWrite(CraneUpSwPin, LOW);
  digitalWrite(CraneCWSwPin, LOW);
  digitalWrite(CraneCCWSwPin, LOW);
  digitalWrite(WinchUpSwPin, LOW);
  digitalWrite(WinchDwnSwPin, LOW);
  osc.flush();
}

void loop() {
  //osc arrive check
  if ( osc.available() ) {
    Serial.println("received osc");
    logMessage(&recMes);
    page = recMes.getAddress(0);
    IfoonCommand = recMes.getAddress(1);
    value = recMes.getArgFloat(0);
    intvalue = int(value);
    if( !strcmp(IfoonCommand, "ping")){
      Serial.println("received ping");
      LastPingMillis = millis();
    }else if(millis() >(LastPingMillis+65000)){//no ping for 65 sec then everything OFF
      StopCrane = 1;
    } 
    if(!strcmp(page,"1")){
      if(!strcmp(IfoonCommand,"stop")){
        if (intvalue == 1){
          StopCrane = 1;
          cw = 0;
          ccw = 0;
          CraneUp = 0;
          CraneDwn = 0;
          WinchUp = 0;
          WinchDwn = 0;
        }
        else{
          StopCrane = 0;
          LastPingMillis = millis();
        }
      }
      else if(!strcmp(IfoonCommand , "cw")){
        if (intvalue == 1){
          cw = 1;
          ccw = 0;
        }
        else{
          cw = 0;
        }
      }
      else if(!strcmp(IfoonCommand , "ccw")){
        if (intvalue == 1){
          ccw = 1;
          cw = 0;
        }
        else{
          ccw = 0;
        }
      }
      else if(!strcmp(IfoonCommand , "up")){
        if (intvalue == 1){
          CraneUp = 1;
          CraneDwn = 0;
        }
        else{
          CraneUp = 0;
        }
      }
      else if(!strcmp(IfoonCommand , "dwn")){
        if (intvalue == 1){
          CraneDwn = 1;
          CraneUp = 0;
        }
        else{
          CraneDwn = 0;
        }
      }
      else if(!strcmp(IfoonCommand , "hsup")){
        if (intvalue == 1){
          WinchUp = 1;
          WinchDwn = 0;
        }
        else{
          WinchUp = 0;
        }
      }
      else if(!strcmp(IfoonCommand , "hsdw")){
        if (intvalue == 1){
          WinchDwn = 1;
          WinchUp = 0;
        }
        else{
          WinchDwn = 0;
        }
      }
    }//end page 1
  }//end osc reveive
  if((!strcmp(page,"1"))&&(!StopCrane)){
    digitalWrite(IfoonControlPin, HIGH);
  }
  else{
    digitalWrite(IfoonControlPin, LOW);
  }

  if ((cw)&&(!ccw)&&(!StopCrane)){
    digitalWrite(CraneCWSwPin, HIGH);
    digitalWrite(CraneCCWSwPin, LOW);
  }
  else if ((ccw)&&(!cw)&&(!StopCrane)){
    digitalWrite(CraneCWSwPin, LOW);
    digitalWrite(CraneCCWSwPin, HIGH);
  }
  else{
    digitalWrite(CraneCWSwPin, LOW);
    digitalWrite(CraneCCWSwPin, LOW);
  }

  if ((CraneUp)&&(!CraneDwn)&&(!StopCrane)){
    digitalWrite(CraneUpSwPin, HIGH);
    digitalWrite(CraneDwnSwPin, LOW);
  }
  else if ((CraneDwn)&&(!CraneUp)&&(!StopCrane)){
    digitalWrite(CraneDwnSwPin, HIGH);
    digitalWrite(CraneUpSwPin, LOW);
  }
  else{
    digitalWrite(CraneDwnSwPin, LOW);
    digitalWrite(CraneUpSwPin, LOW);
  }
 
  if ((WinchUp)&&(!WinchDwn)&&(!StopCrane)){
    digitalWrite(WinchUpSwPin, HIGH);
    digitalWrite(WinchDwnSwPin, LOW);
  }
  else if ((WinchDwn)&&(!WinchUp)&&(!StopCrane)){
    digitalWrite(WinchDwnSwPin, HIGH);
    digitalWrite(WinchUpSwPin, LOW);
  }
  else{
    digitalWrite(WinchDwnSwPin, LOW);
    digitalWrite(WinchUpSwPin, LOW);
  }
}

// *********  utility  ***********************************
void logMessage(OSCMessage *mes){
  uint8_t *ip=mes->getIp();
  //disp ip & port
  Serial.print(millis()/1000);
  Serial.print(" sec from IP:");
  Serial.print(ip[0],DEC);
  Serial.print(".");
  Serial.print(ip[1],DEC);
  Serial.print(".");
  Serial.print(ip[2],DEC);
  Serial.print(".");
  Serial.print(ip[3],DEC);
  Serial.print(" port:");
  Serial.print(mes->getPort(),DEC);
  Serial.print("   ");

  //disp adr
  for(int i = 0 ; i < mes->getAddressNum() ; i++){
    Serial.print(mes->getAddress(i));
  }

  //disp type tags
  Serial.print("  ,");
  for(int i = 0 ; i < mes->getArgNum() ; i++){
    Serial.print(mes->getTypeTag(i));
  }
  Serial.print(" ");

  //disp args
  for(int i = 0 ; i < mes->getArgNum() ; i++){
    switch( mes->getTypeTag(i) ){
    case 'i':
      {
        Serial.print( mes->getArgInt(i) );
      }
      break;
    case 'f': 
      {
        Serial.print( mes->getArgFloat(i) );
      }
      break;
    }
    Serial.print(" ");
  }
  Serial.println("");
}
5  Using Arduino / Project Guidance / Re: Send serial signals wirelessly form iPhone 4 to arduino on: August 23, 2011, 03:55:16 pm
I used this one:
http://www.sparkfun.com/products/10536
with an apple airport express. Good thing about the express is that it also can repeat the wifi signal.
but the http://www.sparkfun.com/products/9954 you can fix another antenna.
decisions.......

6  Using Arduino / Interfacing w/ Software on the Computer / Re: Controlling a water pump through a realay using Mega 2560 on: August 22, 2011, 04:09:27 am
I would go for the first option:
http://www.arunet.co.uk/tkboyd/ec/ec1relay.htm
using an transistor like the bd137
If you wanna expand the project with a real pump it is easier to realize.
7  Using Arduino / Project Guidance / Re: Send serial signals wirelessly form iPhone 4 to arduino on: August 22, 2011, 03:47:00 am
I'm using OSC http://hexler.net/software/touchosc to control the hoist on my boat.
The Iphone needs to be on the same wifi network as the arduino is.
OSC is really easy to setup and the interface can be created with a free program.
8  Using Arduino / Project Guidance / Re: Home monitoring, capacitive level sensing on: August 22, 2011, 03:35:55 am
Hello,

I'm using arduino for home monitoring as well,
for communication I'm using RS485 via 2 (or more) sparkfunbreakout boards (http://www.sparkfun.com/products/10124). A good tutorial is on: http://real2electronics.blogspot.com/2009/09/arduino-and-rs485-english-version.html
This works over a distance of 50 meter at my place.

I'm still looking for a capacitive sensor for my watertanks. Can you post a picture of the sensor you made? And maybe the arduinocode you're using?

regards,

F
9  Forum 2005-2010 (read only) / Troubleshooting / Re: strange behaviour of my lcd on: January 18, 2010, 01:58:53 pm
Thanx

1. already soldered it all together so not very easy to reconnect to my breadboard,

2. CAT 5 utp,

3. LCD is displaying temperatures and pressures from my dieselengine, update rate is 1 Hz, first it looks good and when I start changing the values (temperarily with a potentiometer for testing purpose)

4. see #3, at once

5. no, it mostly occured while I'm playing with the potentiometer.

6. but the degree sign was made by me but the 3 lines are a bit strange....
10  Forum 2005-2010 (read only) / Troubleshooting / Re: strange behaviour of my lcd on: January 18, 2010, 06:56:55 am
I'll try, but the first minute of so it works fine.
If it doesnt work i'll use 2 arduino's and i2c.
11  Forum 2005-2010 (read only) / Troubleshooting / Re: strange behaviour of my lcd on: January 18, 2010, 04:36:34 am
like this:

12  Forum 2005-2010 (read only) / Troubleshooting / strange behaviour of my lcd on: January 18, 2010, 04:35:36 am
My LCD gives starnge letters and numbers after a while.
Im using a Arduino Duemilanove.
On the breadboard there was no problem at all.
Now the LCD is connected with (2m long) wires to the board.
13  Forum 2005-2010 (read only) / Interfacing / Re: 7 Segment Display using SPI on: February 03, 2010, 08:52:50 am
mmmmm.
tried it on a Duemilanove,
MOSI and CSN on a pwn pin (10 and 11) and SCK on pin 12.
only 0000 on the display. (which are not always the numbers I'm looking for ;-) ) anybody tries it on a Duemilanove board?
14  Forum 2005-2010 (read only) / Interfacing / Re: Two wire serial bus for range 20-30m? on: July 13, 2010, 03:00:29 am
thx BenF,
I'll let you know if it works for me.
15  Forum 2005-2010 (read only) / Interfacing / Re: Two wire serial bus for range 20-30m? on: July 12, 2010, 06:09:24 am
gbulmer,
1 slave sending data (1 Hz) to 2 slaves and also asking data from 1 slave. It works fine for appr 24 hours then no data is going up or down.
after a reset (or plug in en out the usb from the master) it is back online again.

1 slave is 40 meters away from the master connected via I2C bus extenders. If I disconnect that one the system keeps working for ever.
So the error is caused by the long distance communication.

If the communication is lost the arduino's keep on doing what they should do except talking to each other.  
Pages: [1] 2