Show Posts
Pages: 1 2 [3] 4 5 ... 7
31  Using Arduino / Project Guidance / Re: Please need help on complex alarm-clock project!! on: February 26, 2013, 07:34:28 pm
The Arduino is not really sited for keeping time over a long period, thus I would suggest that you use a Real Time Clock (RTC) module, such as this one:

The rest is fairly straightforward.  Search the forums for debounced switches, LED control, and DC motor control.

Good luck!
32  Using Arduino / Project Guidance / Re: Need to power small dc motor car for specific distance and stop on: February 26, 2013, 07:25:31 pm
I can't really address this until tomorrow, but my first thought is that the latching HED isn't being turned OFF.  Make sure that your magnet wheel has the one South pole magnet and the three North pole magnets.  The HED is a latching type so when it detects the South pole it will turn ON and stay ON until it detects a North pole. Thus, if it doesn't see a North, the motor will never turn Off.  Be sure that you have the magnets with the proper polarity on your sensor wheel.

Once you are sure of the magnets, using my original code, when first run it waits to see the wheel align with the South magnet. Turn the sensor wheel until the LED turns ON, then turn the sensor wheel until a North magnet is aligned with the HED and the LED should turn OFF.  I suspect that the problem is with the North magnets.

More tomorrow...
33  Using Arduino / General Electronics / Re: Using Schmitt trigger for battery life indicator on: February 26, 2013, 01:12:53 am
Using the input trigger voltage of an inverter is pretty chancy, methinks.

I would use a 5.1V zener and a comparator chip like an LM339.

Just a thought...
34  Using Arduino / Project Guidance / Re: Need to power small dc motor car for specific distance and stop on: February 20, 2013, 03:03:09 pm
retrolefty, nice catch. Attaching mods. Karma bump.

HazardsMind, the motor is ON less than five seconds.
35  Using Arduino / Programming Questions / Re: While Loop on: February 20, 2013, 01:25:13 am
Do you mean
sensorVal = DigitalRead(Sensor);

instead of

DigitalRead(Sensor) = sensorVal;

and then

While(sensorVal == HIGH)
   DigitalWrite(MotorPin, LOW);
   sensorVal = DigitalRead(Sensor);

DigitalWrite(MotorPin, HIGH);
36  Using Arduino / General Electronics / Re: High Side Switching on: February 20, 2013, 01:19:40 am
The problem, to my thinking, is that the back-EMF might produce a high negative voltage at the collector of the pnp.  If the voltage is high enough it might exceed the max reverse voltage on the base-collector junction.

My vote is to err on the side of caution and add the diode.
37  Using Arduino / Project Guidance / Re: Requesting help with Blackjack counter. on: February 20, 2013, 01:07:51 am
I have lived in Las Vegas and will be retiring there next year.  I have counted cards and was even asked to leave a casino -- although not trespassed. I also worked for two and a half years as a casino employee -- admittedly in marketing, but interacted with security almost daily.

That being said, here's my honest advice:

The use of an electronic device to aid in the play of any casino game is a felony.

There are sensors in many of the casinos that scan for the EM signature of home-brew devices such as the nano. You will need to heavily shield your device to avoid disaster.

The use of pager vibration motors can give you the feedback you desire without the problems of a servo.

There is no need to complicate your design by using both shoes.  You can count up and down with buttons in the same shoe.  One under the big toe and one one the side of the foot, for instance.

You can purchase a pair of "elevator" shoes which would give you lots of space for the nano and batteries.

These things can get hot.  Allow for this as you design.

A simple up/down counter implies a simple one-level (all cards have a value of +1, -1, or 0) count. If you're going to use an illegal aid, at least optimize it to the more advanced multi-level counts.

Card counting, while appearing to be daunting at first blush, isn't really that hard.  I understand the lure of using technology but if your goal is to make money, you might just be more profitable using a single-level count like Synder's Red Sevens.  There are plenty of others, but the advantages are in the 1/10ths of a percent.

Know that the casinos are not idly sitting around while armies of counters take their money.  They have instituted "no mid-deck entry" to cancel "Wonging" a deck (worth the Google search).  They also now have computer systems that automatically keep the count and identify who is varying their bets according to the count.

An expert (electronic or mental) card counter finds it hard to make much headway with the casinos' counter-measures.  There are WWW sites that are dedicated to countering the countering.

But, I digress.

Be sure that you risk being trespassed at a casino that you don't want to later visit.  I play tournament poker and would be foolish to count at a casino that hosts large poker tourneys, for instance.

Last thing: The casinos have found that so many clients carry a cell phone, they ignore the EM signatures of these devices. So maybe your best bet (pun intended) would be to use an Android or iPhone in your shirt pocket and a modified Bluetooth keyboard in your shoe.
38  Using Arduino / Project Guidance / Re: Need to power small dc motor car for specific distance and stop on: February 19, 2013, 07:21:29 am
Here's the final drawings. Everything is there.
39  Using Arduino / Programming Questions / Re: Need help coding a debounce on: February 18, 2013, 06:10:18 pm
I'm more of an Idiot-Savant!  JK
40  Using Arduino / Programming Questions / Re: Need help coding a debounce on: February 18, 2013, 05:24:05 pm
That's half right!  smiley-wink
41  Using Arduino / General Electronics / Re: Transistor and external power, which circuit is right on: February 18, 2013, 05:19:22 pm
I'm old school and get nervous when you hook up an Arduino to voltages above 5VDC.

For my money, I would use a 4n35 opto-coupler to isolate the Arduino from the 12V circuit.

If you need a schematic, I can provide one.  Just let me know...
42  Using Arduino / Programming Questions / Re: Need help coding a debounce on: February 18, 2013, 05:06:59 pm
A simple debounce routine just waits an amount of time after detecting a change in the button state.  If it is a glitch, the glitch will be gone on the second read.

   int currUp = digitalRead(buttonPin);  // get the current state of the button

   if(currUp != prevUp) // check to see if the state of the button is different from our lst read
      //here: we have detected a different state of the button, so now debounce
      delay(50);  // wait 50mS, which is an eternity to a glitch

      currUp = digitalRead(buttonPin);  // re-read the button

      if(currUp != prevUp) // check to see that we still have the same state as we first detected
         //here: this no glitch, so proceed with your code
         if(currUp == LOW)

   prevUp = currUp;
43  Using Arduino / Project Guidance / Re: Need to power small dc motor car for specific distance and stop on: February 18, 2013, 04:49:17 pm
1)  The D13 pin has the on-board LED on the UNO. It is the one nearest d13.  There is nothing for you to connect.

2)  The diagram was using a reed switch for simplicity.  As you face the HED, the left-most pin is number 1, the middle pin is pin 2, and the right-most pin is pin 3.

pin 1 goes to +5V
pin 2 goes to GND
pin 3 goes to pin d12

I'll cook up another set of breadboard and schematic diagrams tonight.

You should probably test the HED individually just to see how it works.

I am attaching a breadboard  and schematic for the test circuit. You should see the LED come ON when the South pole of a magnet comes near the sensor, and the LED should turn OFF when a North pole comes near the sensor.  You can see how the sensor reacts to the magnet and you can also see how close your magnet needs to be to turn the sensor ON/OFF.

In the diagrams, I used a 4.8V battery pack, but you can just use jumpers from the Arduino 5V and GND.
44  Using Arduino / Project Guidance / Re: Need to power small dc motor car for specific distance and stop on: February 16, 2013, 04:17:43 am
BTW, you're going to need small powerful magnets. Like these

They need to be axial. You would glue one with South toward the sensor and three with North toward the sensor.

Using four will balance the wheel and turn OFF the Hall Effect Detector, which is latching.

Willie the postman???

Keep me up updated...
45  Using Arduino / Programming Questions / Re: indexOf does not work with a string value? on: February 14, 2013, 11:57:41 pm
Karma bump
Pages: 1 2 [3] 4 5 ... 7