Paying $30 for someone to write me a fairly simple mega 2560 program

I am rebuilding a DC calibrator that has 7, 10 position binary coded decimal (BCD) rotary switches. All of the switches have problems and I would prefer to just convert this to digital control. I have wired out the 8421 feeds and I have the mega board. I have 15 push button momentary contact switches, one for up one for down for each of the 7 rotary dials and 1 for all zero. I am willing to pay $30 (Paypal) for someone to write the Arduino code to make this work. 0-9 up 9-0 down for each of the 7u/7d switches and a single 15th switch to zero them all. If anyone is interested please let me know. Attached is the schematic, the switches I want to replace are MSD through Range SW, left to right, and to program a non existent complete Zero switch that i will add.

It is standard 8421 BCD 0-9, I have been testing by just linking up the bare wires I installed in the 8421 positions to the CC or common, and it functions as it should. I have not setup anything on the Arduino yet, I assumed I would just connect it up for what the code is programmed for. I have never used an Arduino before this and I just don't have time to learn the programming right now, thus why I am willing to pay someone. I'd love to tinker with these things someday, but right now my priority is to get this calibrator functioning correctly.

It is +5v and common for the connection and very low current draw as it just feeds the IC's that control the actual switching and 7 segment LEDs

Attached is the switching schematic. I appreciate anyone willing to help. Thank You.

-RP

Switching.pdf (39.1 KB)

This belongs in the "gigs and collaborations" forum. Good luck, you're not offering very much for a job like that.

aarg:
This belongs in the "gigs and collaborations" forum. Good luck, you're not offering very much for a job like that.

Are you kidding? Its the same script on 7 switches with 1 or 2 wires hot at a time to make 10 digits. This should be a 10 minute job for someone who knows the language. If someone can please move this, I apologize for putting it in the wrong section.

Binary-Codes-3-1341077807_350_230.gif

yeah... but does your needle move for $30? mines don't. I'm not s programmer but for what I do do I don't do it for less than $100 even if it is just a 5 minute job.

A squirt of contact cleaner in each switch might be easier/cheaper.
Leo..

With $30 offered, don't hold your breath.

If you want the thread moved, click on "Report to moderator" and ask.

Your project is more complex than you imagine.

You specify Up/Down counters without any user feedback (display). This alone is a killer for me.

You don't specify error conditions. What happens when the MEGA fails, hangs in reset with all outputs HIGH (1111) which is not a valid BCD character?

What is the ESD environment? Is it in a clean room, or an industrial (dirty, wet, Shakey, Hot, Cold) environment?

You don't specify initial Conditions, min/max ranges.

You don't specify the hardware refresh rate used to read the switches.

How many nanoseconds does the Mega have to update its 4pin BCD output?

Does the hardware 'read' the switches in any specific order.

Are you going to provide hardware for testing?

What is the 'DANGER' quotient? Does this device control mechanisms that have the possibility to endanger, injure humans?

color me gone.

Chuck.

Wawa:
A squirt of contact cleaner in each switch might be easier/cheaper.
Leo..

I think you should bill him for that advice. :slight_smile:

aarg:
I think you should bill him for that advice. :slight_smile:

+1 :slight_smile:

$30 for ten minutes work? Ok, that's 180 an hour. Not bad, slightly more than I make at my job. So yeah, I'll do it.

My attorney insists that we have a written agreement though. Would this be ok with you? She says $30 for the first 10 minutes, then $270 an hour (her 33% fee has to come out of it) for anything over 10 minutes. PM me your information and she will send you a contract.

Who will bet Chris would stall after 10 minutes... :wink:

I still can't figure out the schematic posted, and it would take me at least 10 minutes of research to look up the various parts so that I understand the logic. For example, what does "wire C" from each switch to the display element do and where does the tap from C go?

jremington:
Who will bet Chris would stall after 10 minutes... :wink:

I still can't figure out the schematic posted, and it would take me at least 10 minutes of research to look up the various parts so that I understand the logic. For example, what does "wire C" from each switch to the display element do and where does the tap from C go?

Not "stall". QC.

$30 just gets the lid of the laptop opened - as long as it is one that is easy to open.

...R

understanding that schema will take more than 10 mins.

Chris, first i thought you came up with some clever tag line :slight_smile:

Robin2:
$30 just gets the lid of the laptop opened - as long as it is one that is easy to open.

...R

Robin, I would not want from you to open my laptop. :slight_smile: (sorry for OT)

You guys are out of control... This is not rocket science. I will do it myself if no one wants the $30 by this weekend. I figured something like this; a high school kid could get a case of beer, a box of rubbers and a joint for the weekend. I didn't expect to hire a professional, it's really not a difficult program.

chucktodd, I have the answers to all your questions; but I was waiting for someone to say they are interested. The schematic shows the display, it is a 7 segment LED that is already tied in automatically, it will show the digits as they are selected, no issues. It has a control IC and amplifier, the Arduino does not need to supply any measurable power. I have tested all the digits,numbers and switching across all 7 selectors already with the 4 - 8421 wires and putting them by hand to the common pin. This unit is from the early 90's very well built, but also very hard to find parts for. I rebuilt the whole thing pretty much, minus the transformer, non-critical tolerance resistors and the reference Zener. It took about 30 0.01% resistors alone. The switches are shot, I did it the right way and opened them up to clean them. The gold coating on the rotary disc has been completely etched away. You don't spend $300 in precision parts just to squirt piss in the switches and hope for the best. This is a 3 parts per million precision calibrator and I intend to have for the rest of my life when I finish it. Replacement of the switches would cost $27/Each, and really have no benefit over it being digitally controlled. The unit is slow, 200ms refresh time reading changed inputs. In fact it takes 24hrs just to warm up before it can reach it's 3ppm spec. It is controlling voltage up to 1000V, but the amperage isn't enough to electrocute a common house fly. It will be used exclusively in my home lab to calibrate my test equipment; except when taken to the calibrators to verify spec. I re-built this unit from the ground up, I would hardly blame the programmer of the $30 toy that runs the switching if there was a problem. Like I said, It is fully functional now, I just have to hand jumper the wires.

Now, on to the simplicity of the programming, it's just this easy.... 1 common per switch, four 5V hot per switch. 0-9 per switch up, down in the opposite order, 1 number per push. 4 hots to common is zero, all hot to common except lead 1 is the number 1. all hot to common except lead 2 is the number 2. 8 & 4 hot, 2 and 1 not is the number 3, and so on. same for all 7 places/switches. Not difficult at all, I just know absolutely nothing about the Arduino programming language. So obviously it would be a learning curve for me. I'm assuming I will need to either install, or program for a pull up/down resistor for stability.

almstsobur:
Are you kidding? Its the same script on 7 switches with 1 or 2 wires hot at a time to make 10 digits.

Make 10 digits from just 7 single-digit BCD encoder switches? How that?

YOU ARE KIDDING!

almstsobur:
I will do it myself if no one wants the $30 by this weekend.

Good luck!

jurs:
Make 10 digits from just 7 single-digit BCD encoder switches? How that?

YOU ARE KIDDING!

You lost me?? It's 7 individual "BCD rotary coded switches" each capable of 10 single digits. 0,1,2,3,4,5,6,7,8,9 using the 8421 BCD format. It requires 5 wires per "switch" 4 5V hot, 1 common, thus why I got the Mega.

@almstsobur, if you know nothing about C++ programming for an Arduino, how could you know just how easy (or hard) it is?

You've heard the general consensus - $30 is an insult.

This describes the wiring, not the code:-

Now, on to the simplicity of the programming, it's just this easy.... 1 common per switch, four 5V hot per switch. 0-9 per switch up, down in the opposite order, 1 number per push. 4 hots to common is zero, all hot to common except lead 1 is the number 1. all hot to common except lead 2 is the number 2. 8 & 4 hot, 2 and 1 not is the number 3, and so on. same for all 7 places/switches.

And this doesn't even make sense:-

8 & 4 hot, 2 and 1 not is the number 3, and so on.

Good luck writing your own code.

That's an ancient piece of equipment you've got.
To get you started, here is how you could replace the MSD switch as an example
Remove the switch and connect the 5 wires to the selected Adruino pins via 1K resistors.
Wire your 2 new buttons between ground and the selected Adruino pins via 1K resistors.
See comments in the sample sketch for the pin numbers.
Power your Arduino from the 5V supply of the control board on ensure the grounds are common.

Disclaimer. This is a hobby activity without any guarantees.
The example sketch does not scale up very well as it is currently written.
You should use tricks with the analog pins to have multiple buttons on one pin.
You have to retain the diodes between the bus and the Arduino pins in this example.
You may want to store the values of your buttons in EEprom.
The button debounce part need to be written. Don't use delays or you may interfere with the strobe cycle.
And don't PM me about it.

// See disclamer

const int msd_button_up = 4 ;
const int msd_button_down = 5 ;
const int msd_strobe = 10 ;   // marked C

const int bus_8 = 6 ;  // retain the diodes
const int bus_4 = 7 ;
const int bus_2 = 8 ;
const int bus_1 = 9 ;

unsigned int msd_value = 0 ;  // 0..9


void setup() {
   
    pinMode ( msd_button_up , INPUT_PULLUP ) ;
    pinMode ( msd_button_down , INPUT_PULLUP ) ;
    pinMode ( msd_strobe , INPUT_PULLUP ) ;
    pinMode ( bus_8 , OUTPUT ) ;
    pinMode ( bus_4 , OUTPUT ) ;    
    pinMode ( bus_2 , OUTPUT ) ;
    pinMode ( bus_1 , OUTPUT ) ;
}

void loop() {
   // no delays tolerated.
   if ( debounced( msd_button_up ) ) {
       if (msd_value < 9 ) { msd_value ++ ; } 
       else { msd_value = 0 ; }
   }
   if ( debounced( msd_button_down ) ) {
       if (msd_value > 0 ) { msd_value -- ; } 
       else { msd_value = 9 ; }
   }
   if ( msd_strobe == LOW ) {
       digitalWrite( bus_8 , ! bitRead( msd_value, 3 ) ) ; 
       digitalWrite( bus_4 , ! bitRead( msd_value, 2 ) ) ; 
       digitalWrite( bus_2 , ! bitRead( msd_value, 1 ) ) ; 
       digitalWrite( bus_1 , ! bitRead( msd_value, 0 ) ) ; 
   }
   else {
       digitalWrite( bus_8 , HIGH ) ; 
       digitalWrite( bus_4 , HIGH ) ; 
       digitalWrite( bus_2 , HIGH ) ; 
       digitalWrite( bus_1 , HIGH ) ; 
   }

}