Show Posts
Pages: 1 2 3 [4] 5 6 ... 266
46  Using Arduino / General Electronics / Re: IR Led and Phototransistor connection give always 0 value on: July 26, 2014, 01:32:05 pm
If it's counting too many, it may be that the loop is going too fast for the falling grain. By the time the loop goes again, the grain is still there so it thinks it's a new one.

So you should perhaps  use a state check to see if the sensor is still blocked, ie see if it has gone from clear to blocked. If it's blocked now, and was blocked before, it's not a new bead. If it's blocked now and was clear before, it's a new one.
47  Using Arduino / Project Guidance / Re: Using Aruino Digital pins after putting on a motor shield on: July 26, 2014, 01:15:02 pm
What you say is true Twogan, for some shields.

But look at the pic in the link in the OP's first post. That shield brings the pins out in Grove connectors, making it not as simple a matter of just jamming a wire into a hole.

In general though, pins not used by a shield are indeed available for use, just that in this case the connection is a bit more tricky.
48  Using Arduino / Project Guidance / Re: Using Aruino Digital pins after putting on a motor shield on: July 26, 2014, 12:56:33 pm
As a matter of modern-day-principle you should look away from a motor driver board (shield or otherwise) that uses the L298 chip and look towards (for example) something like this. Far more efficient (the 298 drops at least 2V, up to 4+ iirc at high current), much smaller footprint, and doesn't need a heatsink the size of an elephant.
49  Using Arduino / Project Guidance / Re: Is 5.5volts from external regulator to Vin pin enough?? on: July 26, 2014, 12:27:58 pm
But why are you limited to the converter you mentioned in your opening post?

There are loads of others, like these at Pololu.
50  Using Arduino / Motors, Mechanics, and Power / Re: Proper battery Freaduino / Servo motors on: July 26, 2014, 11:33:40 am
Quote
6V x 2 servos =12V

No, 2 servos would be connected to the power source in parallel, so still 6V.

edit: pic attached
51  Community / Exhibition / Gallery / Example of a state machine on: July 26, 2014, 02:04:59 am
Hi all,

Thought I'd share this.

I implemented a state machine turnstile (I prefer turnstYle but wth, no biggy....)  based on what I read here. The attached code is fully commented but in essence it takes care of these events:

Current     Event    Transition   New
   state                            state
 -------------------------------------------
 Locked      Coin     Unlock       Unlocked (normal operation)
 Unlocked    Pass     Lock         Locked   (normal operation)
 Locked      Pass     Alarm        Locked   (abnormal operation: forced entry)
 Unlocked    Coin     Thanks       Unlocked (abnormal operation: paid twice)


In a nutshell, it starts locked, you pay, it unlocks, you open, enter, close and it locks. If you pay when it's unlocked, thanks for the donation, you paid twice. If you open without paying, alarm.

My turnstile isn't mechanically correct: it's just a short metal strip on a hinge. One end rests on an electromagnet, and there's an optointerrupter half way along. The optoint detects the presence of the strip, the magnet locks it in place. Lifting the strip is like pushing into the turnstile, dropping it is like the stile closing behind you. You can lift the strip against the magnet to simulate an illegal entry.

Payment is by clicking a software debounced momentary switch, which simulates a coin drop.

This implementation does not worry about the stile being open, ie sort of hovering between  "clicks"; perhaps PhaseII could look for that and alarm on a timeout, meaning someone is trapped or it didn't click closed properly.

You're welcome to do whatever you like with this.....

52  Using Arduino / Project Guidance / Re: Is 5.5volts from external regulator to Vin pin enough?? on: July 26, 2014, 12:27:13 am
The output will be 5.5 volts, which will be terminated on the Arduino's Vin and Gnd pins.

According to this spec site, the Vin input should be between 7 to 12 volts:

Will this work?

I'm pretty sure you already answered your own question....
53  Using Arduino / Project Guidance / Re: Getting wrong result from PWM on: July 25, 2014, 04:30:07 am
Not clear to me if this "controller" is the Arduino or another device connected to it?
54  General Category / General Discussion / Re: don't understand the meaning of a warning in a motor driver board user guide on: July 25, 2014, 04:16:26 am
I have a feeling your English is better than theirs.....
55  Using Arduino / Installation & Troubleshooting / Re: Maybe a stupid question, but how to you prevent old code from running... on: July 24, 2014, 09:30:10 pm
Correct me if I'm wrong,
Assuming you're running a relativly stock arduino without sd card reader or other storage,
when you upload the next sketch/program into the arduino the previous one gets erased from the arduino.
The memory it is stored in is non volitile (does not wipe as soon as power is lost) memory..

True but that's not what the OP's asking. His concern is that if he builds circuit B and powers up, the old sketch for circuit A will run before he loads the new sketch for circuit B, and that could have consequences.
56  Using Arduino / Installation & Troubleshooting / Re: Maybe a stupid question, but how to you prevent old code from running... on: July 24, 2014, 09:20:12 pm
Not sure if it's standard or not... standard (as in most common) is probably to build the new circuit under power and risk shorting something.

I think there's even been a suggestion to load BareMinimum when you've finished playing: that way next time you power up, the board's in a known condition, especially if you have many boards and just grab one.

57  Using Arduino / Installation & Troubleshooting / Re: Maybe a stupid question, but how to you prevent old code from running... on: July 24, 2014, 09:13:05 pm
There are a number of threads that suggest you may be right.

So what you could do is:

  • Power Arduino down
  • Dismantle old circuit
  • Power up, old sketch runs but no circuit attached
  • Load Bare Minimum sketch (empty setup() & loop()- File > Examples > 01 Basics)
  • Power down
  • Mantle* new circuit
  • Power up (Bare Minimum runs)
  • Load new sketch

*Well, if dismantle means take something apart, mantle must mean build it in the first place?
58  Using Arduino / Motors, Mechanics, and Power / Re: L293D no power on output on: July 23, 2014, 01:59:21 pm
It's a bit difficult to follow your wiring from those pics. Can you do a quick hand-drawn sketch of your wiring, exactly as you have it, including the power for the motor and the chip, and the chip enable?

edit.... you sure you have voltage on the ends of the battery wires?
59  Using Arduino / Motors, Mechanics, and Power / Re: L293D no power on output on: July 23, 2014, 01:39:37 pm
The pic has Arduino outputs on 5, 6, 9 and 10.... so if you have it wired like that you should be using 5 & 6 or 9 & 10, not 11 & 12.
60  Using Arduino / Programming Questions / Re: LED/Photocells with Relay Module on: July 23, 2014, 11:54:58 am
First step is to forget about the program as such- at least in a formal, code sense- and list in detail exactly what the steps are. You have it in your mind I guess, and listed it in broad outline already, but now you need to list it more fully.
Pages: 1 2 3 [4] 5 6 ... 266