Show Posts
Pages: 1 ... 15 16 [17] 18 19 20
241  Using Arduino / General Electronics / Re: I2C logic level converter 5V - 3,3V on: February 26, 2012, 11:22:20 am
Ok thanks for the confirmation, I'll give it a try smiley
242  Using Arduino / General Electronics / Re: Analogread problem on: February 26, 2012, 11:10:06 am
How have you wired the potentiometer to the Arduino? The outer pins should be 5V and gnd, the one in the middle should go to your analog input.
243  Using Arduino / General Electronics / I2C logic level converter 5V - 3,3V on: February 26, 2012, 11:05:58 am
I want to connect an ADXL345 accelerometer and a HMC5883L magnetometer to the 5V I2C bus of a Mega1280 based board. I've used the ADXL345 by using 4k7 resistors between the I2C pins and 3,3V in the past. It worked but I think it would be better to make a logic level converter. I found the following pdf which shows a circuit how to make this. (see page 4) I happen to have a couple of 2N7000 N-channel mosfets. Are these suitable for this application? (datasheet: )
244  Using Arduino / General Electronics / Re: Hobbyist Resources Guide! on: February 24, 2012, 01:33:22 pm
You forgot the most important source of all... Ebay. I just love the Chinese sellers of electronic components on ebay, have not had any bad experiences. Takes some time to get here but you get free shipping from most.
245  Topics / Robotics / Re: Dagu Rover 5 chassis robot demo on: February 23, 2012, 06:07:20 pm
Nice to see another Rover 5 smiley I bought one a couple of weeks ago. I've managed to write a sketch that lets me remote control it through a Nrf24L01 wireless module. I'm using the Mega1280 based Dagu red back spider controller and motor controller. Power comes from a 2 cell lipo battery.  Here's a video of mine:

I also have the version with 4 encoders/motors, but don't really have a clue what to do with the encoders  smiley-confuse
246  Using Arduino / Project Guidance / Re: Uno+DHT11(Temp Sensor), PC Data Logging on: February 21, 2012, 04:42:48 pm
Then you need to keep a pc running all the time. Costs electricity  smiley-evil You can buy a simple sd card reader for a couple of dollars on ebay. (I bought one from Hong Kong, for less then 4$ including shipping.) Hook that up to your Arduino and log to the sd card.
247  Using Arduino / Programming Questions / Re: Blink without delay and millis but with the DS1307 :) on: February 15, 2012, 05:00:39 pm
That's interesting, thanks for the info.
248  Using Arduino / Programming Questions / Re: Blink without delay and millis but with the DS1307 :) on: February 15, 2012, 04:40:18 pm
Ha, that works. These simple things sometime look so difficult  smiley-roll-blue Thank you.
249  Using Arduino / Programming Questions / Blink without delay and millis but with the DS1307 :) on: February 15, 2012, 04:19:53 pm
I want to use a DS1307 RTC in a home automation project to do certain time based things. I have a small DS1307 board and have managed to make it work with various sketches that I've found online. This code was very handy ->
Now I thought lets try to make a sketch like the blink without delay example but using the data from the DS1307.
But I'm getting nowhere, I don't really have a clue how I should make this sketch... Anyone that can help me?
I've made the following sketch, which does not work.
 Blink without delay using a DS1307
 Led blinks once every second.

#include <Wire.h>
const int DS1307_I2C_ADDRESS = 0x68;

const int led =  13;      // the number of the light pin
int ledState = LOW;

byte second, minute, hour;

// Convert binary coded decimal to normal decimal numbers
byte bcdToDec(byte val)
  return ( (val/16*10) + (val%16) );

void getDateDs1307()
  // Reset the register pointer

  Wire.requestFrom(DS1307_I2C_ADDRESS, 3);

  second     = bcdToDec(Wire.receive() & 0x7f);
  minute     = bcdToDec(Wire.receive());
  hour       = bcdToDec(Wire.receive() & 0x3f);

void setup() {
  pinMode(led, OUTPUT);     

void loop(){

  int time1 = second;

  int time2 = second;
  if (abs(time1 - time2) > 1)
    if (ledState == LOW)
      ledState = HIGH;
      ledState = LOW;

    // set the LED with the ledState of the variable:
    digitalWrite(led, ledState);
250  Using Arduino / Motors, Mechanics, and Power / Re: Arduino mega2560 + MD25 on: February 14, 2012, 12:23:01 pm
Post the sketch you are trying to run.
251  Using Arduino / Networking, Protocols, and Devices / Re: rf2401 problem with mega 2560 on: February 07, 2012, 12:45:21 pm
That's very interesting, I'll definitely try that.
252  Using Arduino / Sensors / Re: (ask)accelerometer up to 20G? on: February 06, 2012, 02:50:55 pm
Is 16g enough? Then you could use the BMA180 or ADXL345. Both can be setup to sense up to 16g.
253  Using Arduino / Networking, Protocols, and Devices / Re: rf2401 problem with mega 2560 on: February 04, 2012, 02:52:20 pm
Well I got it working after trying lots of things. I found a solution but it's a bit weird. When I connect the RF24 module to my Mega 2560 and take the 3,3V from my lab power supply it works... 100% response rate. My Mega 2560 is a Chinese clone, maybe it has bad 3,3 voltage circuit, I don't know. But it works smiley
I found this out because I have 4 RF24 modules, 2 small ones with the antenna on the board and 2 big ones with preamp and amp and external antenna. The big ones draw quite a lot of current and you must power them from a separate power supply. I first tested the 2 small ones and ran in to the above problems. After a lot of head scratching I thought that maybe I had a bad module so I connected the 2 big ones and used external power, they worked. I then tried the 2 small ones using the same power supply and they suddenly worked like they should. I then removed the external power supply from the one connected to my Uno and that also worked. When I removed the external power from the one connected to the Mega 2560 and used the 3,3V from the Mega it stopped working, switching back to the external power supply everything was back ok. Weird things... On my Uno and Duemilanove I can use the internal 3,3V but not on the Mega 2560.

254  Using Arduino / General Electronics / Re: solder station question on: February 04, 2012, 07:55:57 am
I thought Japan used 100V, 50 or 60Hz depending on the region. I assume you are in the UK, where you have 230V? If it's made for 100V you will need a transformer.
255  Using Arduino / Programming Questions / Re: Copying Images from laptop to SD Card Using Arduino Mega2560 on: February 03, 2012, 03:45:37 pm
I use this with my Mega 2560 and sd card: const int chipSelect = 53;
Pages: 1 ... 15 16 [17] 18 19 20