Recent Posts

Pages: [1] 2 3 ... 10
1
Deutsch / Re: attiny85 sleep mode
Last post by uxomm - Today at 03:06 am
Versuch es mal so:
Code: [Select]
#include <avr/sleep.h>    // Sleep Modes
#include <avr/power.h>    // Power management
.
.
.
set_sleep_mode(SLEEP_MODE_PWR_DOWN);
ADCSRA = 0;            // ADC ausschalten
power_all_disable (); 
sleep_enable();
sleep_cpu();             // µC schläft               
.
.
.


Die Frage ist auch, wie der ATtiny wieder aufwacht?
Interrups wären eine Möglichkeit.

Einen guten Artikel (engl.) gibt es hier: 
http://www.gammon.com.au/power

Und Spezielles für ATtiny:
ATtiny85 sleep mode and wake on pin change (0,5 µA)
http://www.gammon.com.au/forum/?id=11488&reply=9#reply9

ATtiny85 sleep mode, wake on pin change interrupt or watchdog timer (6,66 µA)
http://gammon.com.au/forum/?id=11497&reply=6#reply6


2
General Electronics / Re: Motors for RC Car
Last post by WillN210 - Today at 03:06 am
The size will be proportional to whatever motors we choose. I don't really care about speed as long as it's super slow. I'm worried more about cost than I am about effectiveness.
3
General Electronics / Re: transistor problem
Last post by Sploddy - Today at 03:06 am
As an electronics Engineer with 65 years of experience I strongly suggest you intially learn Ohms Law and down load some material on basic electronics  and of electronics in general, how transistors work and their applications in running motors and other loads. 

Without that basic knowledge you are going to end up with a box of "Fried Chips"  To start with the Arduino boards have a very small power output capacity.  a BC337 is not capable of driving an IRFZ44N FET to such large amperage use! 

To drive a "100amp" motor with a single FET and a single driver is not really possible, an H Bridge of 4 FETs mounted on a large heatsink would be required.  Coupled with a fully regulated power supply (PSU).

Again you give no information as to the application use, whether the peak current is starting or running current, with electric motors the "starting" current can be up to 10 times the normal under load running current,  power source and application information are necessary to really give you assistance.  Resistors and capacitors are also needed to control the voltages and current flowing in the cct and to removed any spikes or switching transients.

Be careful when using datasheets on transistors, whilst they may indicate High Current capacity in actual practise it is of much less.   Also there are two uses, ICAS and CCS (Intermittent Commercial and Amateur Service and Continuous Commercial Service).  The latter being an industrial engineering rating

4
Programming Questions / Re: Basic code refresh sesh
Last post by pYro_65 - Today at 03:03 am
Per the documentation, only the first bunch of johnwasser's code is legitimate.
In reality, the second bunch of johnwasser's code works fine.
[Explanation:  The API docs only refer to using the opaque constants LOW and HIGH in digitalWrite.  While 1 and 0 work just fine, the API docs don't support this usage.]
Unfortunately its true, however we can still keep a single call, while keeping it simple.
The conditional operator can sometimes help make intentions clearer.

digitalWrite(Outputs[ i ], bitRead(number, i) ? HIGH : LOW );
5
Project Guidance / Re: Ethernet and APC220
Last post by weedpharma - Today at 03:02 am
Are you currently using the APC220 successfully?

If not treat it is two separate tasks. Get the APC220 working then the Ethernet and then combine them.

I have played with the APC220 and found the EN to require a capacitor to ground to work. Also the Rx on the Arduino goes to Tx of APC220 and Tx of Arduino to Rx.

Weedpharma
6
Programming Questions / Re: using arduino at the end o...
Last post by aarg - Today at 03:01 am
The GSM network time is not needed by the call stack and so is not maintained as scrupulously as CDMA time, which must be correct for the network to operate.

I have seen the network time in error several times on my earlier GSM only phone. A freind of mine thought it was so unreliable that he always set the phone time manually.

Maybe it's gotten better overall, but in any case with plain vanilla GSM, it's a network operators responsibility to ensure correctness. Some of those operations are run rather shoddily.

If the shield has an RTC, that's going to be better. If not, it's pretty easy and dirt cheap to add one to the system.
8
Project Guidance / Communicating between XBee
Last post by agnesaw - Today at 03:01 am
 Is it possible to communicate 2 XBee with
 1 Xbee connented to the breadboard
and  1 Xbee connected to Arduino?
9
Project Guidance / Re: How and what do i need to ...
Last post by zoomkat - Today at 02:59 am
Quote
I need Arduino to control two servos independently ie with the remote up/down for one of the servo and left/right for other servo. Speed would need to be controled as the servos would need to turn slow.
Below is a discussion on controlling the movement speed of a servo. Bottom is code for sending independent position commands to servos.

http://forum.arduino.cc/index.php/topic,61586.30.html

Code: [Select]

//zoomkat 11-22-12 simple delimited ',' string parse
//from serial port input (via serial monitor)
//and print result out serial port
//multi servos added
// Powering a servo from the arduino usually *DOES NOT WORK*.

String readString;
#include <Servo.h>
Servo myservoa, myservob, myservoc, myservod;  // create servo object to control a servo

void setup() {
  Serial.begin(9600);

  //myservoa.writeMicroseconds(1500); //set initial servo position if desired

  myservoa.attach(6);  //the pin for the servoa control
  myservob.attach(7);  //the pin for the servob control
  myservoc.attach(8);  //the pin for the servoc control
  myservod.attach(9);  //the pin for the servod control
  Serial.println("multi-servo-delimit-test-dual-input-11-22-12"); // so I can keep track of what is loaded
}

void loop() {

  //expect single strings like 700a, or 1500c, or 2000d,
  //or like 30c, or 90a, or 180d,
  //or combined like 30c,180b,70a,120d,

  if (Serial.available())  {
    char c = Serial.read();  //gets one byte from serial buffer
    if (c == ',') {
      if (readString.length() >1) {
        Serial.println(readString); //prints string to serial port out

        int n = readString.toInt();  //convert readString into a number

        // auto select appropriate value, copied from someone elses code.
        if(n >= 500)
        {
          Serial.print("writing Microseconds: ");
          Serial.println(n);
          if(readString.indexOf('a') >0) myservoa.writeMicroseconds(n);
          if(readString.indexOf('b') >0) myservob.writeMicroseconds(n);
          if(readString.indexOf('c') >0) myservoc.writeMicroseconds(n);
          if(readString.indexOf('d') >0) myservod.writeMicroseconds(n);
        }
        else
        {   
          Serial.print("writing Angle: ");
          Serial.println(n);
          if(readString.indexOf('a') >0) myservoa.write(n);
          if(readString.indexOf('b') >0) myservob.write(n);
          if(readString.indexOf('c') >0) myservoc.write(n);
          if(readString.indexOf('d') >0) myservod.write(n);
        }
         readString=""; //clears variable for new input
      }
    } 
    else {     
      readString += c; //makes the string readString
    }
  }
}

10
General Electronics / 9v Power Distribution
Last post by CantSayIHave - Today at 02:58 am
Hi, I'm working with an ATtiny84 and an l239d dual h-bridge motor controller, and I'd like to power everything with a 9v battery. As both boards require 5v for board power, I have an L7805 5v regulator which works just fine. The battery is connected to only the regulator and the Vin of the motor controller.

I would very much like to control speed. In the past, I have sent a PWM to the enable pin using my Arduino, and it worked just fine for speed control.

Now, with the 9v powering both the boards and the motors, I'm worried the motor is drawing too much current away from the board, as it starts and stops randomly when I'm using the PWM for speed. When I attach the enable pin directly to 5v, it works fine, but it appears there's not enough current to do PWM, or something.

In the past, I worked on a project involving a motor, transistor(w/ PWM), a piezo buzzer, and an ATtiny85. When the motor started, it would interrupt/restart the board over and over again and just throttle to full speed. I'm worried that same thing may be the case here.

P.S.- I'm using a 9v because I want the circuit to be as small as possible
Pages: [1] 2 3 ... 10

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy