Show Posts
Pages: 1 2 [3] 4 5 ... 68
31  Using Arduino / General Electronics / Re: High Voltage Monitoring on: February 16, 2013, 02:49:30 am
Yes, the 10-bits (0...1023) have by default a range of 0 to 5V.
By selecting the internal reference, the 10-bits have a range of 0 to 1.1 V.

That is roughly 1mV resolution.
With the resistors I mentioned, the resolution to measure the 500V is 0.7V.
So you can measure the 500 with 0.7V precision.
However, due to the high impedance, and resistor inaccuracy, it is not that accurate.

http://arduino.cc/en/Reference/AnalogReference
32  Using Arduino / Installation & Troubleshooting / Re: Toasted??? on: February 16, 2013, 02:42:12 am
I bought the cheapest USBasp programmer on Ebay.
Well, actually I have two of those cheapest, since one of them has timing problems on the USB to my computer.

If you mention something, like the fuse detector, please add a link to it (just copy the url in the text).
If you use another Arduino board to test that, you can use the other Arduino also as a programmer.

Reading 0xFF could be that the value is 0xFF or it could be that nothing could be read.
33  Using Arduino / General Electronics / Re: High Voltage Monitoring on: February 15, 2013, 06:05:51 pm
You could use a voltage divider, if it is okay to connect the grounds.
For example two resistors of 22M in series to reduce the voltage and a third resistor in series of 68k for the voltage to the Arduino.
Perhaps adding 1nF parallel over the 68k to reduce noise and perhaps some protection diodes.

The resulting voltage will be : 68k / (22M + 22M + 68k) * 500 = 0.77V
If you set the voltage reference of the Arduino to 1.1V, you can measure the voltage.

I have done something like that with my Geiger counter, and it is doing well.
I measured the voltage with my multimeter and adjusted the calculation in the Arduino to that.
This is my post with the schematic for my Geiger counter: http://arduino.cc/forum/index.php/topic,120390.msg907435.html#msg907435
34  Using Arduino / Networking, Protocols, and Devices / Re: Mixed Parity Odd and Even in Serial Protocol on: February 15, 2013, 01:47:32 pm
Serial.println will add a CR LF, but Serial.print and Serial.write don't.

If you set the last Serial.begin(), the data can be received. But only in the same format. So after you sent the last byte, the device starts responding and that data can be received in a normal way.

CrossRoads, 9-bit data ? Is that even possible ?
35  Using Arduino / Motors, Mechanics, and Power / Re: How to run motor in both directions, using just 2 output pins on: February 15, 2013, 11:23:18 am
nop, will not spend so much on a shield

5 or 6 dollars (inclusive shipping) on Ebay.
Search for "motor shield", it is the same as the Adafruit shield, but an older version with cheaper components.
36  Using Arduino / Programming Questions / Re: Using PROGMEM data on: February 15, 2013, 10:40:11 am
PSTR is the same as declaring a string in flash with PROGMEM.
So you can use sprintf_P() and strcpy_P() with PSTR and also with PROGMEM strings.

The Serial.println() uses the 'stream' class. The 'F()' macro is for that class.
37  Using Arduino / General Electronics / Re: 433mhz Receiver on: February 15, 2013, 09:12:10 am
Do you have a flat bed scanner, perhaps that can make a good scan/photo.
38  Using Arduino / Programming Questions / Re: Using PROGMEM data on: February 15, 2013, 09:08:33 am
You have a mixture of Arduino and avr gcc code.
The Arduino uses the arv gcc compiler, and every low level function can also be used with the Arduino.

For the Arduino, the 'F()' macro is created:
Code:
Serial.println(F("Hello string in flash memory"));
But the 'F()' macro is something typical for the Arduino IDE only.

The sprintf_P() functions are avr gcc functions, they work with PSTR.
Code:
sprintf_P( buffer, PSTR("Hello number twelve: %d"), 12);

Perhaps this will be fixed some day. For now it is a little inconsistant.
39  Using Arduino / General Electronics / Re: 433mhz Receiver on: February 15, 2013, 08:54:46 am
I can't find it.
The pins are most of the times : Ground, Data, Vcc, Antenna.
If you look at the board with a magnifier, perhaps you can see which pin is ground and which is the antenna.
40  Using Arduino / General Electronics / Re: 433mhz Receiver on: February 15, 2013, 05:53:47 am
The only way is to buy an other one to compare them.

Was it powered via the Arduino with the USB bus or did you use an adapter with more current ?
41  Using Arduino / Motors, Mechanics, and Power / Re: Arduino mega with 2 dc motors on: February 15, 2013, 05:43:07 am
You need a H-bridge shield for the motors.
But which one depends on the maximum current (stall current) of the motors.
42  Using Arduino / Motors, Mechanics, and Power / Re: How to run motor in both directions, using just 2 output pins on: February 15, 2013, 05:41:34 am
You can use a H-bridge.

I think it is like this:
If you keep one pin low, the other pin uses PWM for forward speed.
To reverse, do it the other way around, the first pin for PWM and keep the second pin low.

If you build a H-bridge yourself, you need extra transistors. Perhaps the best way is to use a H-bridge with optocouplers. With optocouplers you don't have to worry about level shifting or inverting the signal for NPN or PNP transistors.

I like this kind of circuit: http://www.mcmanis.com/chuck/robotics/tutorial/h-bridge/bjt-circuit.html
It can be adapted for NPN transistors only.
43  Using Arduino / Motors, Mechanics, and Power / Re: Control 5 bidirectional motors with Arduino on: February 15, 2013, 05:35:26 am
Tell us more.

What kind of motors ? Do you know the type, or can you make a photo of it.
If you tested them for reverse rotation, that doesn't mean they are also manufactured for that.
Do you know the voltage of the motors ? Can you measure the stall current ?
How do you want to control them ? With speed control in both directions ?

To control a motor with speed and direction, a H-bridge is used.
http://en.wikipedia.org/wiki/H_bridge
There are many shields for the Arduino with a H-bridge, but some of them are only for 1 or 2 motors.

If you only want full speed in both directions, the DPDT relay could be used. That could even be used with a PWM output of the Arduino to have also speed control.
44  Using Arduino / Installation & Troubleshooting / Re: Toasted??? on: February 15, 2013, 04:24:56 am
To rewrite the bootloader you need a programmer, and use a cable to the ICSP header.
I use the USBasp programmer with an adapter from a 10-pin to a 6-pin header.
If avrdude can't open the device, it can't see the programmer, you have to fix that first.
45  Using Arduino / Networking, Protocols, and Devices / Re: Just a quick question on logging (Leonardo) on: February 14, 2013, 07:20:09 pm
I don't know what causes that, sorry. I noticed myself that the keyboard emulation is sometimes slower than expected.

You could run a test with a very simple text editor. To see if that is a lot faster.
Perhaps you can let the Arduino (with keyboard emulation) write to a file that can be imported in Excel.

For logging, you could also add a SD card shield, and write the data to a file on the SD card. Afterwards you plug the SD card in the computer to read the data.
Pages: 1 2 [3] 4 5 ... 68