Show Posts
Pages: [1] 2 3 ... 323
1  Using Arduino / Programming Questions / Re: Time and TimeAlarms Libraries – Ask here for help or suggestions on: Today at 01:48:45 pm
The only benefit of flags right now is that the function gets called only once, not for a whole second (which is not much anyway, but for efficiency's sake let's say I'll do it).

Well it's more than that.... if you're switching on an LED at the start of the appropriate second and leaving it on for 5 minutes, yeah it's just a waste of effort but maybe no biggy if you re-switch it on a zillion times. But  in my case I was writing an eeprom and they have a limited number of writes before they wear out. In fact, an Arduino built-in eeprom can take 100k writes: loop() runs faster than 150k per second, so if I didn't prevent the writes after the first time, I'd wear out the eeprom in under a second. (Apart from the fact that I wanted the temp written at a specific time, not a minute later.)
2  Using Arduino / General Electronics / Re: Simple waveform gen for oscilloscope practice? on: Today at 01:14:48 pm
Jim looks like you are having way too much fun.

I'm between contracts: client taking aaaaaages with paperwork.
3  Using Arduino / Project Guidance / Re: avoiding delay on: Today at 12:10:11 pm
I looked at the example with the blinking led and at the millis() in te reference.
so far I didn't manage to get this in my sketch.

Well as I said before....

What have you tried so far: what worked, what didn't?

.... what code have you tried? Post it here, and explain what it's (not) doing. Also post a schematic of your circuit: we need to see how the button is connected.
4  Using Arduino / Project Guidance / Re: avoiding delay on: Today at 11:18:34 am
can anybody help me out?

What have you tried so far: what worked, what didn't?
5  Using Arduino / General Electronics / Re: Simple waveform gen for oscilloscope practice? on: Today at 10:35:59 am
Ok, so that was an interesting exercise.......

I had trouble getting the 8038 to wotk, perhaps a breadboard capacitance issue, so I changed tack.

Prompted by this EEVBlog, I decided to see if I could unravel the IR codes from my Philips remote. I already knew from using it with a TSOP and IRremote library it uses RC5 prootocol, so I looked that up here.

First I used a plain old photodiode to throw the raw input from the remote into the scope and check it against  the top part of the pic in that link. Then I used a TSOP (much tidier output) to verify a number of button pushes against the expected codes from the tables in that link.

Learned a lot about using the scope.

I'll do it all again and capture screenshots from the scope and post them here one day soon, as well as schematics of the connections. That might help someone, so watch this space.
6  Using Arduino / Programming Questions / Re: Code error on: Today at 05:17:50 am
 smiley-razz
7  Using Arduino / Programming Questions / Re: Code error on: Today at 05:03:54 am
Quote
Better would be to use the author's name and
Better would be to use a name that reflects why your Button class is better than the other 14 Button classes.

JimboZAsSuperMegaBestButtonClassOnThePlanet-AvoidImitations.h
8  Using Arduino / General Electronics / Re: Not all breadboards created equal on: September 17, 2014, 11:12:41 pm
Jim:
See eevblog investigation into capacitance and the breadboard:
https://m.youtube.com/watch?v=6GIscUsnlM0

I've been watching a few of those eevblog YouTubes since you posted that link Larry- thanks, I had never seen them before.

Very good stuff, although a bit exhausting if you watch a few back to back, pretty intense guy.
9  Using Arduino / Sensors / Re: Debounce occasionally missing signal on: September 17, 2014, 09:49:16 pm
I don't see where you're getting a bounce in a solid state system in the first place: I thought bounce was a mechanical phenomenon.

But that aside, an easy way to handle debouncing is to use the bounce2 library.

10  Using Arduino / Project Guidance / Re: Ground connection to analog input in Arduino Uno ? on: September 17, 2014, 02:21:03 pm
Quote
Can I apply the output of signal generator to Arduino uno ?

I think I answered: as far as I know, no- not if the signal is AC ie the trough is -ve wrt the ground.

If it's all positive, even the trough, then yes, why not, as long as it's not over 5V at the top. It's really no different from the standard ide example with a potentiometer varying the input between 0 and 5.
11  Using Arduino / Project Guidance / Re: Ground connection to analog input in Arduino Uno ? on: September 17, 2014, 02:08:58 pm
A DC sine wave is one where the polarity never reverses, ie the trough is still +ve or zero, never negative.

I may be wrong but I don't think you can / should apply -ve voltage, ie an AC sine wave, to the Arduino, since then the pin is -ve wrt to ground.
12  Using Arduino / Sensors / Re: Temperature sensor on: September 17, 2014, 01:53:35 pm
  At one point he connected the fan direct to a 9 volt battery but still went through the transistor.

Well if we have +ve at the top so to speak, the sequence is:

+ve supply
one side of motor
motor
other side of motor
transistor collector

then the base comes in from the side from the Arduino

and the emitter goes out to ground (= -ve side of power)

So yes the motor is directly connected to the +ve on one side, and the other side of the motor goes to ground through the transisitor.
13  Using Arduino / Motors, Mechanics, and Power / Re: Question from a really new Newbie :) on: September 17, 2014, 01:15:24 pm
I plan to use either a single Duracell 12V battery or a set of AA's connected together to power 12V.
Would that be OK?

Not for servos no, since they're usually 6VDC.

Just to clarify on the connections: with a servo the yellow wire which is the control line, does go direct to the Arduino, but the power must be separate.

Similarly, if you have a DC motor, you would drive through a transistor*, the base of which would be to an Arduino i/o pin. The transistor would then switch the external power.

*or more complicated, an h-bridge if you need direction control.
14  Using Arduino / Sensors / Re: Temperature sensor on: September 17, 2014, 01:01:34 pm
That guy bored me to tears after 3 minutes so I can't  answer all the questions, but here goes on the use of the transistor. If you had switched the fan off and on directly on the fan's power wire from the Arduino, yes you're right: probably melt something. I don't know what the fan he used draws as current, but almost certainly more than the 40mA max (20 recommended) that an i/o pin can supply.

The transistor is the switch then, in a separate circuit providing external power to the fan: the Arduino i/o pin switches the transistor's so-called "base" pin. The base pin in turn, closes the circuit inside the transistor and allows current to flow between the "collector" (which is hooked up to the fan and ultimately to V+) and the "emitter" which goes to ground.

You can read about transistors here, and this shows an Arduino / transistor example.
15  Using Arduino / General Electronics / Re: Not all breadboards created equal on: September 17, 2014, 11:42:33 am
Jim:
See eevblog investigation into capacitance and the breadboard:
https://m.youtube.com/watch?v=6GIscUsnlM0

Ok, so 2 "puffs" it is: alas, I have no idea what the implications of that are. Is 2pF capacitance between adjacent rows good, bad or irrelevant.
Pages: [1] 2 3 ... 323