Show Posts
Pages: 1 ... 40 41 [42]
616  Using Arduino / General Electronics / Re: Passive Vs Active decoupling on: July 24, 2012, 10:08:20 pm
Heh, I bet ya that 7805 is acting like a 1N4001 in that circuit.  The motor was giving him that AC noise smiley-wink.
617  Using Arduino / Project Guidance / Re: Xbee project on: July 24, 2012, 08:10:05 pm
An Xbee might be overkill for your project.  I use them for collecting a lot of information forward/back from devices (robots, etc.).

I think a IR system:
http://learn.adafruit.com/ir-sensor
or a stomp switch with however many MCUs you may need.  You could have a master control MCU or just somebody operating the $5 remote.  Also you could hook up a "noise detector" so that the cubes pulse (just a few hundred milliseconds) to the percussion.

Just a thought.
618  Using Arduino / Microcontrollers / Re: problems programming standalone 328 on: July 24, 2012, 06:22:28 pm
...Rx and TX are connected to a USB-UART
module ( uses the CP2102 ) I got on Ebay and which seems to be OK because it is recognised by the
 pc. I also connected the GND and RST pins. I have tried to upload the basic 'Blink' sketch to the 328
 using the Arduio IDE, but without success...

Also, all the CP2102 boards that I have seen do not have DTR/RTS to reset the chip.  You might have to manually reset your 328 by waiting till the "Binary Sketch Size 1024 bytes" comes up then press and hold reset till the Rx on the "USB-UART Module" blinks twice, then release.
619  Using Arduino / Installation & Troubleshooting / Re: Program an Arduino using USBasp on: July 23, 2012, 08:57:02 pm

Hey, help. Suddenly I cant progrram my arduino. Why ??? Please help me.

Thank you

Do you remember which direction you hooked the 6-pin cable to the ICSP?  There is a pin 1 designated with a little dot on the UNO.  The colored wire (Red or Black) on the ribbon will tell you which side pin 1 is on the connector.

After that, check if it will upload via programmer (Try a slow clock, if you have a jumper for it).  If not, re-burn your bootloader through the Arduino IDE.
620  Using Arduino / Microcontrollers / Re: Rascal on: July 21, 2012, 02:15:47 pm
LOL, wanderson beat me with nearly the identical comments on RaspPi and $175 price.

Only thing I could add is if you want that internet control, the BitLash library could go a ways...



621  Using Arduino / Project Guidance / Re: 2 digit 7 segment score keeping on: July 20, 2012, 12:43:27 am
ok I found the sample code now how would I add the colon to the counting? I've tried to hook it up but I cant get it to work. Heres the sample code:
Code:
/*
 6-13-2011
 Spark Fun Electronics 2011
 Nathan Seidle
 
 This code is public domain but you buy me a beer if you use this and we meet someday (Beerware license).
 
 4 digit 7 segment display:
 http://www.sparkfun.com/products/9483
 Datasheet:
 http://www.sparkfun.com/datasheets/Components/LED/7-Segment/YSD-439AR6B-35.pdf

 This is an example of how to drive a 7 segment LED display from an ATmega without the use of current limiting resistors.
 This technique is very common but requires some knowledge of electronics - you do run the risk of dumping too
 much current through the segments and burning out parts of the display. If you use the stock code you should be ok, but
 be careful editing the brightness values.
 
 This code should work with all colors (red, blue, yellow, green) but the brightness will vary from one color to the next
 because the forward voltage drop of each color is different. This code was written and calibrated for the red color.

 This code will work with most Arduinos but you may want to re-route some of the pins.

 7 segments
 4 digits
 1 colon
 =
 12 pins required for full control
 
 */

int digit1 = 11; //PWM Display pin 1
int digit2 = 10; //PWM Display pin 2
int digit3 = 9; //PWM Display pin 6
int digit4 = 6; //PWM Display pin 8

//Pin mapping from Arduino to the ATmega DIP28 if you need it
//http://www.arduino.cc/en/Hacking/PinMapping
int segA = A1; //Display pin 14
int segB = 3; //Display pin 16
int segC = 4; //Display pin 13
int segD = 5; //Display pin 3
int segE = A0; //Display pin 5
int segF = 7; //Display pin 11
int segG = 8; //Display pin 15

void setup() {               
  pinMode(segA, OUTPUT);
  pinMode(segB, OUTPUT);
  pinMode(segC, OUTPUT);
  pinMode(segD, OUTPUT);
  pinMode(segE, OUTPUT);
  pinMode(segF, OUTPUT);
  pinMode(segG, OUTPUT);

  pinMode(digit1, OUTPUT);
  pinMode(digit2, OUTPUT);
  pinMode(digit3, OUTPUT);
  pinMode(digit4, OUTPUT);
 
  pinMode(13, OUTPUT);
}

void loop() {
 
  //long startTime = millis();

  displayNumber(millis()/1000);

  //while( (millis() - startTime) < 2000) {
  //displayNumber(1217);
  //}
  //delay(1000); 
}

//Given a number, we display 10:22
//After running through the 4 numbers, the display is left turned off

//Display brightness
//Each digit is on for a certain amount of microseconds
//Then it is off until we have reached a total of 20ms for the function call
//Let's assume each digit is on for 1000us
//If each digit is on for 1ms, there are 4 digits, so the display is off for 16ms.
//That's a ratio of 1ms to 16ms or 6.25% on time (PWM).
//Let's define a variable called brightness that varies from:
//5000 blindingly bright (15.7mA current draw per digit)
//2000 shockingly bright (11.4mA current draw per digit)
//1000 pretty bright (5.9mA)
//500 normal (3mA)
//200 dim but readable (1.4mA)
//50 dim but readable (0.56mA)
//5 dim but readable (0.31mA)
//1 dim but readable in dark (0.28mA)

void displayNumber(int toDisplay) {
#define DISPLAY_BRIGHTNESS  500

#define DIGIT_ON  HIGH
#define DIGIT_OFF  LOW

  long beginTime = millis();

  for(int digit = 4 ; digit > 0 ; digit--) {

    //Turn on a digit for a short amount of time
    switch(digit) {
    case 1:
      digitalWrite(digit1, DIGIT_ON);
      break;
    case 2:
      digitalWrite(digit2, DIGIT_ON);
      break;
    case 3:
      digitalWrite(digit3, DIGIT_ON);
      break;
    case 4:
      digitalWrite(digit4, DIGIT_ON);
      break;
    }

    //Turn on the right segments for this digit
    lightNumber(toDisplay % 10);
    toDisplay /= 10;

    delayMicroseconds(DISPLAY_BRIGHTNESS); //Display this digit for a fraction of a second (between 1us and 5000us, 500 is pretty good)

    //Turn off all segments
    lightNumber(10);

    //Turn off all digits
    digitalWrite(digit1, DIGIT_OFF);
    digitalWrite(digit2, DIGIT_OFF);
    digitalWrite(digit3, DIGIT_OFF);
    digitalWrite(digit4, DIGIT_OFF);
  }

  while( (millis() - beginTime) < 10) ; //Wait for 20ms to pass before we paint the display again
}

//Given a number, turns on those segments
//If number == 10, then turn off number
void lightNumber(int numberToDisplay) {

#define SEGMENT_ON  LOW
#define SEGMENT_OFF HIGH

  switch (numberToDisplay){

  case 0:
    digitalWrite(segA, SEGMENT_ON);
    digitalWrite(segB, SEGMENT_ON);
    digitalWrite(segC, SEGMENT_ON);
    digitalWrite(segD, SEGMENT_ON);
    digitalWrite(segE, SEGMENT_ON);
    digitalWrite(segF, SEGMENT_ON);
    digitalWrite(segG, SEGMENT_OFF);
    break;

  case 1:
    digitalWrite(segA, SEGMENT_OFF);
    digitalWrite(segB, SEGMENT_ON);
    digitalWrite(segC, SEGMENT_ON);
    digitalWrite(segD, SEGMENT_OFF);
    digitalWrite(segE, SEGMENT_OFF);
    digitalWrite(segF, SEGMENT_OFF);
    digitalWrite(segG, SEGMENT_OFF);
    break;

  case 2:
    digitalWrite(segA, SEGMENT_ON);
    digitalWrite(segB, SEGMENT_ON);
    digitalWrite(segC, SEGMENT_OFF);
    digitalWrite(segD, SEGMENT_ON);
    digitalWrite(segE, SEGMENT_ON);
    digitalWrite(segF, SEGMENT_OFF);
    digitalWrite(segG, SEGMENT_ON);
    break;

  case 3:
    digitalWrite(segA, SEGMENT_ON);
    digitalWrite(segB, SEGMENT_ON);
    digitalWrite(segC, SEGMENT_ON);
    digitalWrite(segD, SEGMENT_ON);
    digitalWrite(segE, SEGMENT_OFF);
    digitalWrite(segF, SEGMENT_OFF);
    digitalWrite(segG, SEGMENT_ON);
    break;

  case 4:
    digitalWrite(segA, SEGMENT_OFF);
    digitalWrite(segB, SEGMENT_ON);
    digitalWrite(segC, SEGMENT_ON);
    digitalWrite(segD, SEGMENT_OFF);
    digitalWrite(segE, SEGMENT_OFF);
    digitalWrite(segF, SEGMENT_ON);
    digitalWrite(segG, SEGMENT_ON);
    break;

  case 5:
    digitalWrite(segA, SEGMENT_ON);
    digitalWrite(segB, SEGMENT_OFF);
    digitalWrite(segC, SEGMENT_ON);
    digitalWrite(segD, SEGMENT_ON);
    digitalWrite(segE, SEGMENT_OFF);
    digitalWrite(segF, SEGMENT_ON);
    digitalWrite(segG, SEGMENT_ON);
    break;

  case 6:
    digitalWrite(segA, SEGMENT_ON);
    digitalWrite(segB, SEGMENT_OFF);
    digitalWrite(segC, SEGMENT_ON);
    digitalWrite(segD, SEGMENT_ON);
    digitalWrite(segE, SEGMENT_ON);
    digitalWrite(segF, SEGMENT_ON);
    digitalWrite(segG, SEGMENT_ON);
    break;

  case 7:
    digitalWrite(segA, SEGMENT_ON);
    digitalWrite(segB, SEGMENT_ON);
    digitalWrite(segC, SEGMENT_ON);
    digitalWrite(segD, SEGMENT_OFF);
    digitalWrite(segE, SEGMENT_OFF);
    digitalWrite(segF, SEGMENT_OFF);
    digitalWrite(segG, SEGMENT_OFF);
    break;

  case 8:
    digitalWrite(segA, SEGMENT_ON);
    digitalWrite(segB, SEGMENT_ON);
    digitalWrite(segC, SEGMENT_ON);
    digitalWrite(segD, SEGMENT_ON);
    digitalWrite(segE, SEGMENT_ON);
    digitalWrite(segF, SEGMENT_ON);
    digitalWrite(segG, SEGMENT_ON);
    break;

  case 9:
    digitalWrite(segA, SEGMENT_ON);
    digitalWrite(segB, SEGMENT_ON);
    digitalWrite(segC, SEGMENT_ON);
    digitalWrite(segD, SEGMENT_ON);
    digitalWrite(segE, SEGMENT_OFF);
    digitalWrite(segF, SEGMENT_ON);
    digitalWrite(segG, SEGMENT_ON);
    break;

  case 10:
    digitalWrite(segA, SEGMENT_OFF);
    digitalWrite(segB, SEGMENT_OFF);
    digitalWrite(segC, SEGMENT_OFF);
    digitalWrite(segD, SEGMENT_OFF);
    digitalWrite(segE, SEGMENT_OFF);
    digitalWrite(segF, SEGMENT_OFF);
    digitalWrite(segG, SEGMENT_OFF);
    break;
  }
}

The sketch does not appear to have the colon in it...?

Pins 4 and 12 (L1 and L2) on the 7-Segment display need to be powered.  You will need to other digital pins (PWM not needed) and set them to high in the sketch.
622  Using Arduino / Microcontrollers / Re: arduino as isp bricks chips?? on: July 19, 2012, 11:16:17 pm

Nearly any reasonable (e.g. 1 MHz) clock signal applied to XTAL1 allows the processor to be programmed regardless of the fuse settings.

Even a frequency pulser from another source, Arduino or AVR.  1 MHz with 0.5 pulsewidth width worked for me.
623  Using Arduino / Microcontrollers / Re: ATMega1284P, 8MHz, 57600 bootloader, no joy on: July 19, 2012, 10:46:05 pm
I had a similiar problem with the Mightohm core files.  For me the optiboot bootloader did not work for uploading files, but the original version did.  I logged the issue, but so far no results.

Same with me.  I think it might be the same problem that optiboot had with the Duemilanove and UART comms.  My blueboard UNOs and MEGAs yes, but my projects will be the original bootloaders.
624  Using Arduino / Microcontrollers / Re: Parallel Programer not working on ATmega328P-PU on: July 19, 2012, 10:11:30 pm
...and you might need to apply a 1MHz external...

why

I had a couple of ATMEGAs take a bootload and then stop talking (No SIG - 0x00000).  Looked around for a couple of weeks and I was ready to buildout a parallel programmer and found a reference to 1 MHz on the crystal pins.  Applied a 1MHz (1/2 pulsewidth) generated from an UNO to the breadboarded chip, and viola the serial programmer was just chatting away (slow clock on the programmer/USBASP).

Suspect that the 1 MHz factory default can not be cleared easily (at other frequencies) when doing the initial bootloading.  I have not tried the really slow baudrates, but 20 minutes was slow enough for me.  Also tried all the avrdude "B" parameters, no good.




625  Using Arduino / Microcontrollers / Re: Parallel Programer not working on ATmega328P-PU on: July 19, 2012, 12:42:23 am
"default from factory is using the internal oscillator, remove the 16Mhz crystal, set fuses and replace (in my guess)"

...and you might need to apply a 1MHz external...
626  Using Arduino / General Electronics / Re: Prototyping Part II - Beyond The Breadboard. Suggestions? on: July 19, 2012, 12:01:45 am
I like the Strip-Boards the best.  Perf-Boards have a tenancy to lift pads if you do not have a good iron.  Strips have all that length of copper to conduct heat and not pull from the substrate.  Also, translation from breadboard to strip-board is natural.

Just "cut" the strips with an engraver to disconnect the strip from the circuit.  Simples.
627  Using Arduino / Installation & Troubleshooting / Re: Arduino UNO smells funny when power is connected to it on: June 20, 2012, 01:06:23 am

Connecting it to another computer didn't help, so it looks this is permanently damaged. It can clearly draw power from a usb port, I wonder why it can't receive data.. =/



Try opening a serial monitor and type anything into the input box and send it.  Watch the Rx led.  Does it blink?

I think you might have fed the battery back into the 5V pin with the USB connected.  The only thing you will want to feed back from the external circuit is the ground.  At 10V, you tripped the MCU fuses and the Atmega will either need to be reprogrammed or replaced (See if you can find another Atmega328P to swap out and test). 

Apparently, if you run 20V+ through the MCU the physical fuse trips (Cracks the ceramic package)!

As for your original project, you might want to use a half/full-bridge shield (http://www.adafruit.com/products/81 ).

Good luck.
628  Topics / Robotics / Re: Dagu Rover 5 chassis robot demo on: June 15, 2012, 01:06:07 am

Mine tend to slip off, and I find it impossible to adjust the track height. Maybe I'm not doing it right.


I just got my Rover 5 and had pulled the retaining bracket (metal L-brac with two screws inside the chassis) to pull the appendage out to set the height.  I think it was an EE solution to a ME problem smiley-wink  Unfortunately, if you have track slippage with the low profile mode, adjusting the height up will make it worse.

I have a composite eye (lots of IR) coming in next week to see how the Dagu demo will work. The DFR Romeo will be interesting in running the R5 Motor/Encoder Board (4motors/4encoders), (2) servos and (6) tactile buttons.  I think there might be a 74HC595 chip and a dev board in there.

Thanks to Nick for opening this thread.  I look forward to any further developments to this platform.

-George
629  Topics / Robotics / Re: arduno robot? on: June 02, 2012, 12:51:24 pm

If its smaller motors that you want to control, you need variable speed, or more options, and the motors are around 1A (Peak) or smaller, I would recommend a motor shield. I personally use the "Adafruit Motor/Stepper/Servo Shield for Arduino kit - v1.0"
Its about $20 for the unassembled one and is also a great way to learn about basic soldering.
Here's the link: https://www.adafruit.com/products/81


Although I have not tried it yet, but LadyAda suggest for more amperage, to stack L293Ds pin to pin.  My L298Ns have the heatsink flange for all kinds of cooling tricks  smiley-grin
Pages: 1 ... 40 41 [42]