Go Down

Topic: I need a Programmer... ASAP (Read 3629 times) previous topic - next topic

bmanthey

I am not a programmer, and I need a solution quickly, so I don't have time to troubleshoot and learn the programming necessary to make it work. So, anyone that can write me a program and send it to me I would truly appreciate.

I purchased an ARDUINO Uno, and I hope that it will work for the following application.

I'm going to provide as much information as I can here, but if you have a questiopn, please send me an e-mail. Bob@benchmark.us.com

I have attached a Rendering of what we are building, and a basic wiring schematic.

Pit Crew Challenge Lights and Timers

Inputs: (4) N.O. Momentary push button
Start Button = StartButton
Reset Button = ResetButton
Stop Button for Player 1 = StopButtonP1
Stop Button for Player 2 = StopButtonP2

Outputs: (7) 12VDC LED Lights
YellowLight1
YellowLight2
YellowLight3
GreenLightP1
GreenLightP2
RedLightP1
RedLightP2

Outputs: (4) Momentary Closed Contact
TimerStartStopP1
TimerStartStopP2
TimerResetP1
TimerResetP2

The TIMERS are stand alone units. The START and STOP are the same input, and just require a momentary closed circuit, so the output for Start and Stop are the same.
The RESET also just requires a momentary closed contact.

Start - When the operator presses the StartButton, The yellow lights light in order 1,2,3, with a 1 second delay between, then the yellow lights go off and the Green lights come on - at the same time the (2) timers are started.
This is to simulate the starting lights at a Drag Race.

   if (StartButton)  //is pressed
      YellowLight1 = ON
         wait 1 second
      YellowLight2 = ON
         wait 1 second
      YellowLight3 = ON
         wait 1 second
      YellowLight1 = OFF
      YellowLight2 = OFF
      YellowLight3 = OFF
      GreenLightP1 = ON
         TimerP1 = START
      GreenLightP2 = ON
         TimerP1 = START

Once the timers are started, the 2 contestants need to complete their task, when they have finished, they press their STOP button.
When one of the contestants presses their STOP button, that players timer is stopped, their GREEN light goes off and their RED light comes on.
The other contestants timer continues to run and their GREEN light remains illuminated until their STOP button is pressed.

loop  //wait for player input
   if (StopButtonP1) //is pressed
      TimerStartStopP1 = STOP
      GreenLightP1 = off
      RedLightP1 = ON

   if (StopButtonP2) //is pressed
      TimerStartStopP2 = STOP
      GreenLightP2 = off
      RedLightP2 = ON

RESET - When the round is over (Both timers are stopped and both RED lights are illuminated) The operator presses the RESET button. Both Timers are RESET to 00:00 and all of the lights are off.

   if (ResetButton)  //is pressed
      RedLightP1 = OFF
      TimerResetP1 = Reset
      RedLightP2 = OFF
      TimerResetP2 = Reset

groundFungus

You will save everyone's time if you read and follow the forum guidelines.  https://forum.arduino.cc/index.php/topic,148850.0.html

PaulS

You know that the Arduino is a 5V device, right? You'll need transistors to control 12V lights.

The timer displays only need to be turned on or reset to make them count or stop?

The coding seems trivial.

bmanthey

The programming is trivial... but I'm not a programmer, so to me it's impossible.

The Timers are complete buy-out devices. I am just tapping into the blister-switches on the device to START-STOP and RESET.

Can I use Relays for the lights? I can set up a dayghter board with relays to handle the 12VDC line.

Can you do the programming for the ARDUINO UNO for me.

DVDdoug

sorry...  I've rather pessimistic about this...

Professional programmers generally charge around $100 USD an hour for consulting/contract work  (about the same price as a plumber or auto mechanic).   Most of us here are hobbyists so you can get plenty of free advice and help if you want to do it yourself, or maybe you can hire someone cheaper.  But, a custom program is NEVER a 1-hour job!  You can negotiate whatever you want, but usually these are by-the-hour contracts (not fixed-price), sometimes with a "not to exceed" stipulation.   But, if the programmer agrees not to exceed 8 hours, that doesn't mean the program will meet your expectations in 8 hours...     It means if you want additional work, he can't charge you without your approval.

This might be a one day job if all the specs & requirements are nailed-down, but they usually aren't.   There's usually some back-and-forth, tweaking & debugging and it might turn into 2 or 3 days.

For a microcontroller project, the programmer usually needs his hands on the hardware (or a reasonable approximation/simulation of the final hardware).

Anything for competition usually needs to be calibrated, verified, and certified so that no one questions the timing.  A backup system might be required too.   Nobody is going to trust a homemade timing mechanism.   For "serious" competition, sometimes there is a sanctioning body, and they may need to approve any timing system. 

PaulS

Quote
Can I use Relays for the lights?
Sure. You need transistors to drive them... Transistors are cheap. Relays are not.

TomGeorge

Hi,

I'd say you will need a circuit diagram as well to go with the program?

Tom..... :)
Everything runs on smoke, let the smoke out, it stops running....

PaulMurrayCbr

I might have a look at this over the weekend. Tonight I play D&D, and then go out and get drunk.

Now - this "momentary closed contact" - how "momentary" is momentary? I'll assume that your timer is fast enough to catch a consecutive write of a high and a low: the pulse will be on the order of microseconds.

We don't have a "closed" output. You can have earthed, +5v, or (I think) floating. For instance, we can raise a pin from earth to +5v - the usual case I imagine, but it might be reversed.

Assuming that the referee should be able to press reset at any time.

Assuming that you don't care what happens if a player is holding down their button during the countdown - although I could code in some 'foul!' functionality. Make the guilty player's red light flash, perhaps.

I count 15 pins required to make this go, which is two too many on my arduino UNO. If we combine the timer reset for both players, it's still too many. Cheapest way to fix this is to use the analog inputs for the four buttons. This will require a few resistors.


(EDIT)

Oh, and no - you can't use relays for the lights. Relay coils are a heavy inductive load and draw a lot of current. I have had a lot of success using a 'darlington array' chip. They are five bucks or so.
http://paulmurraycbr.github.io/ArduinoTheOOWay.html

DuaneDegn

#8
Oct 30, 2015, 05:10 pm Last Edit: Oct 30, 2015, 05:13 pm by DuaneDegn
Oh, and no - you can't use relays for the lights. Relay coils are a heavy inductive load and draw a lot of current. I have had a lot of success using a 'darlington array' chip. They are five bucks or so.

Relays work fine for lights. Most relay coils draw more current than you'd want to source from an I/O pin but normally the relay is powered through a transistor. There are lots of relays with a coil current of a few tens of milliamps. Besides the transistor you need a diode to allow the coil's current to continue to flow once the coil is turned off.

If the lights will be on for a long time you don't want to continually power the relay, you could use latching relays. A latching relay requires power to change its state but not to maintain state.

While relays are an option, they may not be the best option. Your original darlington array idea would likely be easier to implement.

Vaclav

sorry...  I've rather pessimistic about this...

Professional programmers generally charge around $100 USD an hour for consulting/contract work  (about the same price as a plumber or auto mechanic).   Most of us here are hobbyists so you can get plenty of free advice and help if you want to do it yourself, or maybe you can hire someone cheaper.  But, a custom program is NEVER a 1-hour job!  You can negotiate whatever you want, but usually these are by-the-hour contracts (not fixed-price), sometimes with a "not to exceed" stipulation.   But, if the programmer agrees not to exceed 8 hours, that doesn't mean the program will meet your expectations in 8 hours...     It means if you want additional work, he can't charge you without your approval.

This might be a one day job if all the specs & requirements are nailed-down, but they usually aren't.   There's usually some back-and-forth, tweaking & debugging and it might turn into 2 or 3 days.

For a microcontroller project, the programmer usually needs his hands on the hardware (or a reasonable approximation/simulation of the final hardware).

Anything for competition usually needs to be calibrated, verified, and certified so that no one questions the timing.  A backup system might be required too.   Nobody is going to trust a homemade timing mechanism.   For "serious" competition, sometimes there is a sanctioning body, and they may need to approve any timing system. 
Excellent and long overdue here. Thanks.

I would add
It is important to have open communication during facts finding and negotiation phase.

The solicitor (?) already failed to answer few questions...

So to paraphrase "Sharks tank" ( popular US TV show ) ... I am out...




PaulMurrayCbr

#10
Nov 01, 2015, 05:02 am Last Edit: Nov 01, 2015, 05:47 am by PaulMurrayCbr
Ok, man: here you go. Sketch attached.

I have added "foul" detection, and I have added logic so that if the player's button is pressed during the "stopped" state, then it blips the timer start/stop pin. Maybe this isn't a good idea, but whatever.

This seems to work ok for me with LEDs. The analog inputs are attached to resistors that are orange-orange-orange-gold, and then those resistors are plugged into 5v. The four input buttons ground the analog out. Seems to work ok. (Instead of buttons, I just touched a wire to the correct side of the resistor. Touch it to the wrong side and the Arduino goes bye-bye for a second or two.)

Issues:

* I can't test that the timer works correctly. I hope it does.

* If one player fouls during the countdown, then the sketch is left in "countdown" state. This means that any press by the other player will also be counted as a foul

If you wanna send me money, we can do it via paypal. 2 hours. Normally I charge $100/hr AUD, but that's for Java at which I have years of experience. For C++ on an arduino - let's say a quarter of that and $50AUD for the two hours and not a word to the tax man.

---

(EDIT) Crap, I forgot to turn debugging off. Just comment out that line where DEBUG gets defined.

(EDIT 2) Video at https://www.youtube.com/watch?v=wcDVXKPXJgQ
http://paulmurraycbr.github.io/ArduinoTheOOWay.html

Vaclav

Ok, man: here you go. Sketch attached.

I have added "foul" detection, and I have added logic so that if the player's button is pressed during the "stopped" state, then it blips the timer start/stop pin. Maybe this isn't a good idea, but whatever.

This seems to work ok for me with LEDs. The analog inputs are attached to resistors that are orange-orange-orange-gold, and then those resistors are plugged into 5v. The four input buttons ground the analog out. Seems to work ok. (Instead of buttons, I just touched a wire to the correct side of the resistor. Touch it to the wrong side and the Arduino goes bye-bye for a second or two.)

Issues:

* I can't test that the timer works correctly. I hope it does.

* If one player fouls during the countdown, then the sketch is left in "countdown" state. This means that any press by the other player will also be counted as a foul

If you wanna send me money, we can do it via paypal. 2 hours. Normally I charge $100/hr AUD, but that's for Java at which I have years of experience. For C++ on an arduino - let's say a quarter of that and $50AUD for the two hours and not a word to the tax man.

---

(EDIT) Crap, I forgot to turn debugging off. Just comment out that line where DEBUG gets defined.

(EDIT 2) Video at https://www.youtube.com/watch?v=wcDVXKPXJgQ

Ok, man: here you go. Sketch attached.

I have added "foul" detection, and I have added logic so that if the player's button is pressed during the "stopped" state, then it blips the timer start/stop pin. Maybe this isn't a good idea, but whatever.

This seems to work ok for me with LEDs. The analog inputs are attached to resistors that are orange-orange-orange-gold, and then those resistors are plugged into 5v. The four input buttons ground the analog out. Seems to work ok. (Instead of buttons, I just touched a wire to the correct side of the resistor. Touch it to the wrong side and the Arduino goes bye-bye for a second or two.)

Issues:

* I can't test that the timer works correctly. I hope it does.

* If one player fouls during the countdown, then the sketch is left in "countdown" state. This means that any press by the other player will also be counted as a foul

If you wanna send me money, we can do it via paypal. 2 hours. Normally I charge $100/hr AUD, but that's for Java at which I have years of experience. For C++ on an arduino - let's say a quarter of that and $50AUD for the two hours and not a word to the tax man.

---

(EDIT) Crap, I forgot to turn debugging off. Just comment out that line where DEBUG gets defined.

(EDIT 2) Video at https://www.youtube.com/watch?v=wcDVXKPXJgQ

Let's get this straight.

The OP asks for programmer.
One of the replies is- "how much will you pay?" .
The OP does not reply / reacts to the "how much " question.
Pretty nice description on how contract programming works is posted.
The OP does not reply / reacts.
"PaulMurray" posts a code, video etc.

What's wrong with the picture?

OP gets free software !

Is this whole discussion ethical?

IMHO not - maybe someone could use few $ , but "PaulMurray" is now a hero.

Or maybe not, OP did not reply / react.





PaulMurrayCbr

#12
Nov 01, 2015, 08:11 pm Last Edit: Nov 01, 2015, 08:24 pm by PaulMurrayCbr
What's wrong with the picture?
OP gets free software !
It's a hobby.
A hobby.

The Arduino platform (software, bootloader, IDE) is not a serious, industrial-grade platform and isn't meant to be. It's about hobby, learning, community. If the OP's problem was a days or weeks of work and required someone who understands the platform more thoroughly than my bit of fooling about with it, well that might be different. But it was a couple of hours on a Sunday while the machines (coincidentally, also powered by microprocessors) did my laundry for me.

If the OP actually goes ahead and pays me, well: I was first in, lowest price. Yay for the free market! Isn't that the way it's meant to be?

I hope people read my code and go "Holy shit! This is tres cool and a fine way to put together moderately complex behaviour!" I will not be charging them tuition.

----

(EDIT) Actually - come to think of it, my washing machine and dryer are powered by clockwork. But that's not the point.
http://paulmurraycbr.github.io/ArduinoTheOOWay.html

Vaclav

It's a hobby.
A hobby.

The Arduino platform (software, bootloader, IDE) is not a serious, industrial-grade platform and isn't meant to be. It's about hobby, learning, community. If the OP's problem was a days or weeks of work and required someone who understands the platform more thoroughly than my bit of fooling about with it, well that might be different. But it was a couple of hours on a Sunday while the machines (coincidentally, also powered by microprocessors) did my laundry for me.

If the OP actually goes ahead and pays me, well: I was first in, lowest price. Yay for the free market! Isn't that the way it's meant to be?

I hope people read my code and go "Holy shit! This is tres cool and a fine way to put together moderately complex behaviour!" I will not be charging them tuition.

----

(EDIT) Actually - come to think of it, my washing machine and dryer are powered by clockwork. But that's not the point.
Indeed "holy shit" !

Hobby or no hobby, you missed my point.
Allow me to do the same - changing the subject and taking things out of context as you did.

If it is a hobby who cares about ethics, right?



tmd3

Is this whole discussion ethical?
Why wouldn't it be?  Which ethical code would apply here?

Go Up