Show Posts
Pages: 1 2 [3] 4 5 6
31  Using Arduino / General Electronics / Using fuses to limit current (how to select values)? on: July 02, 2012, 04:55:57 pm
Recently, I had occasion to plug a radio in backwards. Luckily, the inline fuse in the power cord saved the radio. This got me thinking, though.

The inline fuse was rated at 4a 250v. Since the fuse was inline with a battery (12v), does this mean it opened at a different amperage than specified, or will all 4a fuses blow when 4a goes through them regardless of voltage? If not, is there an easy way to convert?

I think I've got religion when it comes to fuses now - all my power cables in the future are going to have them. Losing 20 cents worth of fuse is nicer than losing $50 worth of radio.
32  Using Arduino / Programming Questions / Re: help with this code, pretty please !!!! on: May 04, 2012, 06:53:38 pm
It looks as if your library isn't being imported. Is it in the right place? The error message you're getting is what happens when C++ doesn't know about a class:

http://cplusplus.syntaxerrors.info/index.php?title=%E2%80%98Foo%E2%80%99_does_not_name_a_type

33  Using Arduino / Programming Questions / Re: How to read the state of an output pin ? on: April 23, 2012, 04:03:53 pm
I'm not sure you can digitalRead() an output pin. You might have to keep track of the state manually:

Code:
digitalWrite(10, HIGH);
statepin10 = HIGH;


34  Using Arduino / Project Guidance / Re: 8 Character Limit - Taken out of original concept on: April 20, 2012, 05:47:33 pm
I don't know of a limitation - especially since you're not actually doing anything with audiofiles. However:

Code:
char audiofiles[NUMTAGS][14] = {"hello   ",

you're creating an array of 5 strings that are 14 characters long. That should be enough to fit 13 characters + \0.

What makes you think there's a limitation on string length? What behaviour are you seeing?
35  General Category / General Discussion / Re: If a program could program itself?.... (AI) on: April 12, 2012, 06:00:57 pm
I also looked into genetic algorithms / genetic programming back in the late 90's / early 2000s. It's not hard to come up with a language where every statement is syntactically valid (i.e. it does something, which may or not be what you want) and a fitness function (a way to evaluate a program to determine if it's closer or further away from a desired solution than other instances of a program).

LISP is good because a list can also be a program. Create a million lists at random, execute them all with your dataset, pick the best 50% or so, making sure that the fitness function also has a component that selects smaller programs over larger programs. Then cross-breed the programs (exchange parts of successful lists with parts of other successful lists). That's one iteration. Do a few million iterations and eventually you've got a program that does something like what you want.

The problems: it takes a LONG time to evaluate all the programs, and you might have to have some sort of timeout criterion to prevent endless loops. It takes a LONG time to do all the iterations you need to satisfy your fitness function. Once you've satisfied your fitness function enough, you have something that works for your test dataset - that might not handle all the data you throw at it. The more complicated a thing you want, the longer it will take. Not all problems can be solved with GP: you need a problem that lets you know when you're getting closer to a solution.

See it in action here:

http://alphard.ethz.ch/gerber/approx/default.html

(needs Java)

36  Using Arduino / Microcontrollers / Re: Uno voltage minimum on: April 12, 2012, 05:31:39 pm
Looks like you can run the 328 / 328p at anywhere from 1.8 to 5.5v. Not sure about the speeds you can run at various voltages, but if I had to guess I'd say you'd be safe using the internal oscillator. (Edit: looks like someone answered this question: http://arduino.cc/forum/index.php/topic,101084.0/topicseen.html )

http://www.atmel.com/devices/ATMEGA328.aspx

Also, I believe the analog reference voltage can't exceed Vcc.

The Uno itself has a voltage regulator that needs 6-12v in order to output 5v.
37  Using Arduino / Programming Questions / Re: Ardweeny programing on: April 09, 2012, 12:41:27 pm
Depending on your USB to serial adapter, you might not have auto-reset hooked up to the Ardweeny. In that case, you have to reset it manually with the push button at the right time. Here are some instructions:

http://andrewmemory.wordpress.com/2011/01/30/using-an-arduino-serial-usb-board-with-an-ardweeny/
38  Using Arduino / Project Guidance / Re: Long road to a Thermal Cycler - trying to make a relay work on: March 21, 2012, 03:22:51 pm
If you're doing this for the end result (rather than to get experience with electronics), you might want to take a look at this:
http://powerswitchtail.com/PSTIIU.aspx

Basically, what you want but in kit form, which might be easier :-) They also have assembled units, which is nice because you don't have to touch mains voltage.

The relay won't plug into the breadboard as-is. You'll need to plug it into a socket, and take wires from the socket to the breadboard. Alternately, you can just solder wires to the relay and run those to the breadboard. (Don't put 120v on the breadboard, though!)

You can use a double pole double throw relay as a single pole single throw relay - just ignore one "pole" (leave it disconnected). The "double throw" means the relay will switch two things at once independently, not that it cycles back and forth between them. Think of it like a knife switch:
http://ocw.mit.edu/ans7870/SP/SP.764/imagegallery/lab3/images/1.jpg
where the thing that does the switching is not your hand, but a coil.

I don't think it matters if you have the grounds connected or not - assuming you have a separate power supply for the LEDs and the Arduino, the relay effectively isolates one circuit from the other.
39  Using Arduino / Project Guidance / Re: Newbie with a Radio Scanner idea on: March 20, 2012, 04:11:19 pm
You might want to consider replacing volume and squelch potentiometers with equivalent value digital potentiometers rather than coming up with a mechanical linkage. Reading the screen should be possible, but you'll have to reverse engineer what causes things to appear - there are a number of possibilities. If you know what the values are (for instance because your kepad just typed them), you can send those to the PC without having to read them.

This is probably not the first project you want to tackle. On the other hand, getting a keyboard matrix working and a couple of digital potentiometers changing values might not be too hard to start out with. Good luck!
40  Using Arduino / Installation & Troubleshooting / Re: examples compiles with errors on: March 20, 2012, 04:01:50 pm
This looks like this known issue:

http://code.google.com/p/arduino/issues/detail?id=764

Guess nobody's got to it yet...
41  General Category / General Discussion / Re: INCOMING ASCII CODE TO USB PC KEYBOARD KEY TRANSLATION on: March 16, 2012, 03:51:55 pm
Many modern Arduinos can be reprogrammed to look like a keyboard. Once you do this, though, programming gets trickier. Here's someone who looks like he's done it:

http://hunt.net.nz/users/darran/search/?tag=keyboard
42  Using Arduino / Programming Questions / Re: "program" inside program on: March 16, 2012, 03:41:48 pm
You might want to try searching for "implementing state machine" as a start for some interesting info.
43  Using Arduino / Programming Questions / Re: Problem handling text on: March 08, 2012, 04:21:52 pm
A couple of things:

1. I'm not sure you can do command[0] = Serial.read().

You probably want command.setCharAt(0, Serial.read()).

2. Serial.read is probably going to return a signed integer, and I believe String treats its characters as unsigned bytes, so you'll have to make sure to convert. If no character is available, Serial.read() will return -1 - so you probably want to check for that as well.
44  Development / Other Software Development / Re: Bypass bootloader at runtime on: March 01, 2012, 06:10:33 pm
Here's something that might help:

http://arduino.cc/en/Hacking/Programmer

Essentially, if you can burn a bootloader with something (either a dedicated programmer, or second Arduino as a programmer), you can burn your code to the same place.

(On reflection, now I'm thinking that you're talking about the USB detection. Maybe this:
http://www.instructables.com/id/Turn-your-Arduino-Uno-into-an-USB-HID-Mididevice/
will be closer to what you're looking for?)
45  Using Arduino / Project Guidance / Re: Control the speed of a small servo motor and LED brightness fade over 5 minutes? on: February 29, 2012, 06:04:59 pm
Pretty much any LED and a current-limiting resistor are all you need for LED components. Here's a link:
http://sheepdogguides.com/arduino/aht0led.htm

You'll probably want to use a pin that can do pulse-width modulation (PWM) to dim the LED - there are 255 steps to choose from, so you could either increment by 1 every 1176 ms (approx) or go from 0 to 249 every 1200 ms and then go straight to 255 for full brightness.

Motors would be similar - but I have no recommendations for hardware for motors; never used 'em.
Pages: 1 2 [3] 4 5 6