Show Posts
Pages: [1] 2
1  Using Arduino / Project Guidance / Re: Random Flashing Strobe Control on: January 29, 2013, 07:57:20 pm
Thanks to everyone for their responses!  Lots of good ideas to keep me busy for a while.

2  Using Arduino / Project Guidance / Random Flashing Strobe Control on: January 29, 2013, 03:53:20 pm
I have been away from the Arduino for about a year and am just getting back into it.  The project I am making is a random strobe controller for 8 strobe units.  The strobes I am using are self-contained and have a self-triggering circuit.  They have a ground and positive and flash at a fixed rate of 2.5 times per second.  You can control the flash sequence by controlling power (there is no manual trigger).  You to have power the circuit for a second before it will initially flash. 

So...Controlling the random sequence is fairly simple, but I will need to hold the output open for a second plus some additional time for for the circuit to charge.  Now here comes the tricky part.  If I want the strobes to fire faster than a second apart I will need to overlap when my outputs go high.  I think I will need to use some sort of psuedo mutitasking or timer variables?  I will also need to bias my random outputs so that I do not repeat the same strobe twice in a row.  Anyone have any slick ideas?

3  Using Arduino / Project Guidance / Re: Arduino controlled air horns on: May 11, 2012, 03:23:05 pm
I belive you are correct about Indian music.  I do not have the horns, but planned on trying to source them for the solenoid setup and horns and then retuning the horns to the correct pitch.  I am sure with a little experimentation I could get any delay or overlap figured out for the solenoids.  Sometimes I wish I could do things the easy way and be satisfied, but that is just not my style.....
4  Using Arduino / Project Guidance / Arduino controlled air horns on: May 11, 2012, 12:16:00 pm
I have a project that I want to add a set of air horns to which play Dixie.  They sell units like this, but because of the way they integrate the pump with the air control they tend to go too fast or slow, and sound bad.  I found a set of horns available in India that have individual solenoid controlled valves to each horn that is controlled by a microprocessor.  Unfortunately the microprocessor is preprogrammed with tunes from India.  I was thinking though that I could take the horn and valve setup and control it using a Arduino with a selector switch the runs several different tunes.  Some of the other tunes could be "Frist Call" typically played at the opening of a horse race, Oringinal Star Trek theme intro, etc.

Has anyone tried or played around with anthing like this?  I have downloaded the scores from these tunes and it looks like you can do them all with 6 different tuned horns.

5  Using Arduino / Project Guidance / Re: Detecting deceleration on: April 22, 2012, 06:57:24 am
Thanks for your responses!  I have additional details on the vehicle in another post:,98632.0.html

There is a brake pedal for the hydraulic brake system with a switch.  The issue is that you can slow down (and stop) very quickly using the speed control which does not activate the brakes lights.  In fact, the hydraulic brakes are more for emergency or fast stops.  I use the bar in parades and motorcycle rallies and have caught people off guard as I slow down.

After thinking about it I have come up with a solution that might work best.  Accelerometers, tilt switches, and pendulums would all be affected by vibration.  The bar does not have any suspension and although low speed, still jostles around a bit if you are on rough terrain.  What I came up with is linking a potentiometer to the speed control and read the voltage change.  If the voltage drops as I decrease the speed control I know I am slowing.  I could control the brake light output one of two ways:

1. Each time the voltage drops by a certain factor I can activate the brake lights for a certain time period.

2. Each time the voltage drops I can measure the rate of voltage drop over time and activate the brake lights.  I could also add another potentiometer to make the rate adjustable.  This way a gradual slowing down does not activate the brake lights, but a faster rate of slowing down does turn on the brake lights.

Or I could program both methods and add a switch to select between them and see which seems to provide the best results. 


6  Using Arduino / Project Guidance / Detecting deceleration on: April 20, 2012, 09:26:31 pm
I have converted a vehicle to a hydraulic drive system and will typically use the variable speed control for slowing and braking.  I still have the hydraulic brakes, but do not expect to use them often.  When I was exclusively using the hydraulic brakes I used a pressure switch to trigger the brake lights.  Very simple and effective.  However, now that I am using the variable speed hydraulic drive to control acceleration and deceleration I do not have a good way to trigger the brake lights.  My first thought would be using an accelerometer.  Something that would trigger an output when the deceleration rate exceeds a certain rate (being adjustable via a pot would be ideal).  Anyone done anything like this?  Seems like this could be a very straight forward, but effective solution.

7  Using Arduino / Project Guidance / Re: Serial Communications Trigger on: April 10, 2012, 05:55:12 pm
Just a quick update.  I wrote a simple routine that sends out a ctl-E and if there is a response I continue with sending the serial data.

The serial data in my program takes 70ms to execute.
The routine that checks for a terminal response takes about 1ms to execute (serial port at 115,000)

So, it looks like I can save 69ms each program cycle by using a routine that checks for a terminal response.   Below is a copy of the code in the event it is useful to someone else.

unsigned long start, finished;      // Timer variables
void setup()

void loop()
 start=millis();                    // Start timer
  Serial.write(5);                  // ^E enquiry character
  //delay (50);                     // No delay was necessary, but initially had it in the code to test it out
  if (Serial.available() > 0)       // Check for serial data response
   finished=millis();               // Stop timer
    Serial.print(finished-start);   // Print program execution time to terminal window
    Serial.println(" ms ");
8  Using Arduino / Project Guidance / Re: Serial Communications Trigger on: April 10, 2012, 10:57:41 am
Thanks for your response!  I think this will work for me.  I can send the ^E enquiry character and if I get a response I will send the serial data, if no response I will skip that routine.  Just need to make sure the time sending the ^E enquiry character and waiting for a response is less than the actual time to just send the serial data to begin with.

9  Using Arduino / Project Guidance / Serial Communications Trigger on: April 10, 2012, 09:36:21 am
I have created a routine that outputs serial data to a terminal for troubleshooting (see attached picture).  I have it color coded and formatted using ascii codes which is very readable and works fine.  Since this requires sending serial data I would like to be able to control the routine so that it is only active when I have the USB cable plugged into a terminal.  Is there a way to auto detect whether the USB cable is plugged into the Arduino?

My initial thought is to send a short prompt like below and use the corresponding character to control  the serial display routine.  This would give me a way to toggle it on and off.  I would initially set it to "off" during setup.

Serial Communications egin or [Q]uit

10  Using Arduino / Project Guidance / Re: Assigning pin values on: March 30, 2012, 02:01:53 pm
I posted the example of using pin 13 because it is a common reference.  In my case I am using 10 LEDs each triggered by a digital pin.

11  Using Arduino / Sensors / Re: PulseIn timeout reading a proximity Sensor on: March 30, 2012, 12:49:22 pm
Thanks for your reply John,
The sensors I am using for testing are Omron Proximity Sensors P/N E2E-CR8C1.  I have those coupled to an op-amp to separate the 12v sensor from the 5v Arduino input.  There is an LED on the sensor which shows the sensor state, and I also have an LED on each op-amp output.  The LEDs are indicating the correct state.  I believe it has to do with how the function is declared out in the wiring.h file from what I have read.

12  Using Arduino / Project Guidance / Re: Assigning pin values on: March 30, 2012, 12:36:14 pm
Thanks all.  I am coming from the Basic Stamp and out of necessity you did not waste any memory or variables.  Really starting to like the Arduino!
13  Using Arduino / Project Guidance / Assigning pin values on: March 30, 2012, 09:39:27 am
While looking through sample code examples for assign pin values to a variable I see that people are using integers like:
int ledPin = 13;                // LED connected to digital pin 13

Is there a reason for not defining the variable as a byte since that is adequate to hold values 0-255?

14  Using Arduino / Sensors / Re: PulseIn timeout reading a proximity Sensor on: March 30, 2012, 09:29:32 am
I need to have a maximum value of 454,708 microseconds (which gives me a 1rpm resolution on my sensor disc.  Everything is wired correctly and I get values until I slow it down then it starts timing out.
Using an unsigned long variable.  Do not have teh code with me that I used on the PulseIn fucntion, but I recall the documentation was sparse on the formatting.

15  Using Arduino / Sensors / PulseIn timeout reading a proximity Sensor on: March 29, 2012, 08:36:52 am
I am having difficulties using the PulseIn function while specifying a timeout value.  Although the documentation says it should be able to read up to a 3 minute pulse, I seem to be timing out at one second no matter what value I specify in the PulseIn function.  I did some research and found some posts referring to making changes in the wiring.h file, but being new to Arduino this is a bit ambiguous at this time.  Perhaps someone has dealt with this before and can explain what needs to be done.

Pages: [1] 2