Show Posts
Pages: [1] 2 3 ... 5
1  Using Arduino / General Electronics / Re: Wrong readings from voltage divider on: February 07, 2013, 11:58:50 am
I 'm sorry michinyon, I don't understand what you mean by: Those things are not "resistors"

Which things? The schematic for the circuit I took the measurements on is this:



As for the voltage divider not being the best way to approach the problem, I 'm all ears, as long as you bear in mind that I have very limited kit at my disposal (resistor kit, handful of ceramic caps and NPN transistors, couple of MOSFETs, DMM, some zeners, IR and normal LEDs, breadboards, veroboard, wires, soldering stuff, Seeeduino Mega 1280, laptop, um, that's about it).
2  Using Arduino / General Electronics / Re: Wrong readings from voltage divider on: February 06, 2013, 08:07:38 pm
Thanks for the capacitor tip. I tried it out and here are the results.



Three emitting LEDs were always on, drawing around 30mA each, placed around the receiver. The ADC was sampling the receiver and dumping out the raw signal (red) and the 5 point average (green).

I tried to guesstimate what happens at the far limit of detection, around 15 cm (closer than 10cm it's ridiculously easy). The AIR refers to nothing above the receiver. The OBJECT@~15cm refers to a chunk of veroboard placed roughly 15cm above the receiver. I tried increasing the overall resistance to see how far I could push the ADC (and hopefully, the detection). As it turns outthe ADC was surprisingly cooperative. The 1R / 2R refer to one or two series resistors of about 500kΩ before the receiver. The No Capacitor / Capacitor refers to having a round ceramic cap (561 J | B1 (I think) 64, whatever that means, I don't have another one I 'm afraid) attached between GND and the analog pin as suggested.

Looking at the top (red) window, it is not very apparent if the cap helps, but perhaps it's not an adequate cap. However, software smoothing does quite a neat job. As for detection, the 2R case yields a slightly bigger difference, but nothing to write home about. We are looking at a very tiny range, 1008-952 (ADC units) at the top window and 1004-961 at the bottom. Still, interesting results, I hadn't played with IR before.

By the way, I have no idea what kind of beam my IR LEDs have, but by a very rough approximation, looking at the size of the visible spot they make against an object when seen through a digital camera I 'd say they have a cone of ~60 degrees (give or take a hundred  smiley-confuse).
3  Using Arduino / General Electronics / Re: Wrong readings from voltage divider on: February 06, 2013, 01:04:28 pm
I 'm sorry Runaway Pancake but I don't understand what you mean. I 'm measuring range to an object so the emitter can't be pointing at the receiver. It has to point outwards and the receiver gets reflected, not direct light.

Anyway, sorry for staying quiet but I had put this on the back burner. I tried some more measurements in a somewhat more methodical manner, see pic below:



The top (red) section shows raw ADC readings, the bottom (green) a 50 point smoothed average. The three "windows", labelled 5cm, 10cm and 15 cm show some very rough estimates of the range of the object I used for reference (a spare breadboard) from the receiver.

Each window has two depressions, one labelled 100mA and one 30mA. These correspond to the current being fed to the transmitter at the time of measurement. I wanted to see how much worse things get if I limit current to under 40mA so I can power the transmitter from a pin (so I can turn it off when not measuring).

The results don't look too bad, when considering roughly where the limits of detection are. Looking at the smoothed signal, it is not inconceivable that the 15 cm @ 30mA could be picked up by a simple static trigger, although it would be a stretch (and changing ambient light would destroy this). At 10cm and closer, things are quite a bit better. I 'll have a look at using more than one emitter to see what effects I can get.
4  Using Arduino / General Electronics / Re: Wrong readings from voltage divider on: February 02, 2013, 12:27:15 pm
I am taking all measurements at night, always at the same spot, under the light of a compact fluorescent bulb (because I have seen that the sunlight does make a measurable difference, although not a very big one). Whatever contribution the bulb makes is a constant and barely noticeable. With the emitter turned off, voltage changes from 4.76V to 4.77V when cupping the receiver with my hands.
5  Using Arduino / General Electronics / Re: Wrong readings from voltage divider on: February 02, 2013, 11:48:07 am
OK, repeating yesterday's measurements, initially with the original 530K I get 970-450 on the ADC and 4.45V - 1.90V on the DMM. With the DMM disconnected I get 1010 - 370 (very roughly, numbers jump a lot).

Replacing the 530K with a 47K I get 4.70V - 4.13V and 1010-910 on the ADC. Disconnecting the DMM has no noticeable effect.

Both these measurements imply that the lowest impedance of the receiver when working as a sensor (detecting IR reflected off a body as opposed to being stuck head on against the emitter) is around the 200K region. For some reason, I was getting much lower values on the first day of testing, along with an increased detection range (when I had the problem when disconnecting the DMM) but not any more. Oh well, still, it 's good enough and useable.
6  Using Arduino / General Electronics / Re: Wrong readings from voltage divider on: February 01, 2013, 08:16:59 pm
No, no, it's a photodiode (my best guess). Both emitter and receiver look exactly like LEDs. In fact, poking around the net a bit, they look exactly like these on the right:



The resistance of the receiver goes from crazy high (many M, hard to measure as it jumps around a lot) to about 50k when put head on and touching the emitter. I initially powered the emitter with around 10 mA, then changed it to 100mA daring it die. So far it hasn't, although it's hard to tell with IR (I look at it through a phone camera but it's not an exact science  smiley-razz). It doesn't get particularly hot (though I only let it run a few seconds at a time to take measurements) and occasionally swap with a new one (I have three) to see if I get any differences. So far it handles the crazy high current quite well, although I don't think it makes such a huge difference to the overall performance as a sensor (if I understand correctly, LED efficiency drops a lot as current goes up so there's not much point pushing them after a point. I have no idea where that point is for IR LEDs but I 'll probably find out).
7  Using Arduino / General Electronics / Re: Wrong readings from voltage divider on: February 01, 2013, 06:11:43 pm
Thanks MaJiG. I didn't reply earlier because I wanted the sun to set so I could have identical conditions. I don't have an op amp and getting new hardware is a pain that I 'm going to avoid for the time being.

The emitter / receiver are not one unit, they are a pair I got on a whim when I saw them at a local shop and thought I could play with. Now, some more cool stuff happened. I swapped the resistor and receiver so I could read across the receiver like you suggested. Measuring via DMM, I was only getting about half the value range I was getting last night. Weird, I d' have thought the only difference would be that the high and low values would have swapped. I swapped them back to the original position and again, I only get half the range. The emitting LED seems OK, I can see it glowing when I look at it through a digital camera and the current going through it is the same. When the sensor is at the GND side of the divider, I get a rough range of 4.5V to 2.2V (46% of the value range).

Now, the funny thing is that the measurement has started working when only the board is connected. With the DMM connected, I get a rough range of 970 to 470 from the ADC (49% of the value range). With the DMM disconnected, I get roughly 1010 to 500 (again, 49%).

Thinking about this makes even less sense. These measurements are with the receiver on the GND side of the divider. This implies that the high values happen when the receiver has a high impedance and the low ones when it has a low one. Which implies that overall, the value of my divider is higher than yesterday. Which implies that the ADC should be tripping things up even more brutally. However, all that happens when I disconnect the DMM is that the measurements shift up a tiny bit.

One more thing that I observed is that the range of the sensor seems to have dropped. I didn't really make any measurements, but judging by eye, I am certain I was getting a noticeable value change at a greater distance. I thought maybe the emitter has a problem but I changed it and still got the same results.

Anyway, it's not particularly important if I make this work or not (I 'm just fooling around with random components), I 'm mostly stumped by what I 'm observing which is why I 'm posting here from academic curiosity. If you have any ideas don't hesitate to share.
8  Using Arduino / General Electronics / Wrong readings from voltage divider on: January 31, 2013, 07:16:05 pm
Hello, I am implementing a straightforward IR emitter / receiver pair for short range rangefinding and have come across some strange behaviour.

I power the receiver from the board's 5V line, grounding it via a resistor to the board's GND, forming a voltage divider. I measure the voltage between the receiver and resistor to get the receiver's response. When measuring via multimeter, I get wonderfully variable readings, covering most of the 5V range.

So far so good. However, when I connect the board's analog pin, things get weird. I get beautiful readings as long as the multimeter is connected. The moment I disconnect the probes, the reading goes close to 1000+ and hovers there.

What is happening here? One theory I have is that the overall resistance of the divider is too big. I have measured that the receiver's resistance drops from astronomical values to around 50k at its low end. I have used a 530k resistor so that I get a nice range of values (receiver completely dominates when its resistance is high, resistor mostly dominates when it is low). However, it might be that the trickle of current going through the divider can't hold the voltage once the nasty ADC line joins the party.

I would think that I 'll have to compromise and lower the overall resistance of my divider, even if it means losing my excellent value range. However, why do things work so beautifully when the multimeter is connected? Obviously it does something wonderful and I 'd like to replicate that without having to tape the multimeter to the board. Any ideas what that something might be?
9  Using Arduino / Motors, Mechanics, and Power / Re: Options for controlling high current DC motors on: September 01, 2012, 09:40:34 am
No, because I have no idea about the SUF2001, perhaps someone else might. But originally, you said you were connecting it through a board, which would indicate that you connect to a bunch of other components as well.
10  Using Arduino / Motors, Mechanics, and Power / Re: Options for controlling high current DC motors on: September 01, 2012, 09:04:07 am
You can replace anything with anything but as long as you don't say what it is you are referring to, the results might not be what you might expect.
11  Using Arduino / Motors, Mechanics, and Power / Re: Options for controlling high current DC motors on: September 01, 2012, 08:13:19 am
Which board do you have? What does the manual say? Does it not come with a library you can use?
12  Using Arduino / Motors, Mechanics, and Power / Re: Options for controlling high current DC motors on: August 26, 2012, 05:18:19 pm
I see. I have to admit I 've been stunned by how expensive driving a simple DC motor can be. An R/C ESC for a brushed 30A motor can be bought for $7.83 at hobbyking. With some creative soldering can't I make the equivalent of an H bridge using simple relays to route the current and have a cheap bidirectional DC motor controller? I must be missing something otherwise why would anyone spend so much money on the other circuits? Also, why are R/C ESCs so cheap compared to, for example, the Pololu motor controllers? I really feel like I 'm missing something blindingly obvious otherwise why would anyone buy them.
13  Using Arduino / Motors, Mechanics, and Power / Re: Options for controlling high current DC motors on: August 26, 2012, 02:29:29 pm
Yes, I had a look at the Pololu options but they are also quite pricey.

Now, regarding not being able to guarantee equal current, how much of a problem is it going to be? The question really is, does a chip getting hotter increase or decrease its impedance? If it increases it (as in the case of resistors), the system self regulates. If it decreases it, we will have runaway temperature increase and the chip will blow, then the next one in a cascade etc until the while piggybacking unit is gone. However, L293s also have thermal shutdown, which probably means that the moment the hottest one shuts down, we will get a cascade of shutdowns. Annoying but far from catastrophic.

So, my question I guess is, what's the worst case scenario? A few blown chips are hardly a problem, L293s are dime a dozen. The motor can't be damaged by anything the chips do. In the unlikely case a chip blows (if the thermal shutdown fails for some reason), could it dump the input voltage (12V) somewhere where it could do something awful (like the Arduino PWM or GND pins)? Is it reasonable to protect against this by branching some 5V Zeners from each of these lines to ground as a safety valve?
14  Using Arduino / Motors, Mechanics, and Power / Options for controlling high current DC motors on: August 26, 2012, 11:55:54 am
Hello forum, I would like to bidirectionally control  a large DC motor (to the tune of 10-20A at 12-24V, will most likely only need the 12V / 10A).

The only shield I have seen that handles any serious current is MegaMoto which is hideously expensive.

Typically, shields or raw ICs on breadboards use the L298 (which needs a bucketload of peripheral components and the max current is a joke) or the L293 (which doesn't need as many peripherals but the max current is also a joke).

So, is there anything obvious I 'm missing?

If not, is there anything wrong with piggy backing a bunch of L293s (which are dirt cheap)? In the past, I have piggybacked 3 L293Ds (.6A per channel) to control DC motors with current drain around 4A. If I remember correctly, the L293B (which I think is obsolete and is replaced by the N?) go up to 1 or  2A per channel so I should be able to get quite a bit of current with a moderately sized stack.

Any comments or ideas are very welcome.
15  Using Arduino / Networking, Protocols, and Devices / Re: RS232 reading problems on: August 22, 2012, 02:58:35 pm
Guys, thank you for the replies. Unfortunately, I found the reason, my intellectual inadequacy  smiley-razz smiley-red

The RS232 coming from the PC is at a different logic level than the 0-5 the Arduino uses.

@johnnyonthespot. The ELM232 datasheet contains two sample circuits for interfacing the chip and I 'm using a board made by a friend which follows one of them. Now, the board converts the ELM232 Rx/Tx to the logic level expected of a PC RS232 and spits it out over a DB9 plug but that is not readable "raw" by the Arduino. The simple solution was to touch the ELM232 Tx pin directly with a jumper wire connected to the Arduino's Rx and hey presto, it all works. Quick and dirty hack is to simply bypass the board between the chip and the RS232 plug and solder wires directly to the tracks under the chip's legs.

As for using int as opposed to bytes, I was in a hurry (OK, guilty, I could have cast it into byte before putting it into the array).

Thanks again guys.
Pages: [1] 2 3 ... 5