UK Vintage Radio Repair and Restoration Powered By Google Custom Search Vintage Radio and TV Service Data

Go Back   UK Vintage Radio Repair and Restoration Discussion Forum > General Vintage Technology > Components and Circuits

Notices

Components and Circuits For discussions about component types, alternatives and availability, circuit configurations and modifications etc. Discussions here should be of a general nature and not about specific sets.

Closed Thread
 
Thread Tools
Old 13th Feb 2006, 6:50 pm   #1
paulsherwin
Moderator
 
paulsherwin's Avatar
 
Join Date: Jun 2003
Location: Oxford, UK
Posts: 27,970
Default Dropper calculator

I've been meaning to code Paul's dropper calculations in lowest common denominator C for ages, and actually did it in a spare hour this afternoon. I've deliberately left the code simple and easy to read. The program should compile using just about any C compiler and I've built versions for Linux (Slackware 9.1) and DOS (Borland C++ Builder 3).

Let me know your comments (don't ask for lots of fancy GUI stuff, that's the whole point ). Use at your own risk, and double check the results before risking your valve heaters.

It is of course possible to use Paul's original spreadsheet under Linux if you have OpenOffice.

Best regards, Paul

See also this related thread.
Attached Files
File Type: zip dropper.zip (39.0 KB, 123 views)
paulsherwin is offline  
Old 13th Feb 2006, 11:20 pm   #2
Oskar.B
Pentode
 
Oskar.B's Avatar
 
Join Date: Oct 2005
Location: Gargnäs, north of Sweden
Posts: 105
Default Re: Dropper calculator

Hi Paul,

It all compiles fine on Slackware 10.2. With a little warning though :

gcc dropper.c -Wall -o dropper -lm <ENTER>
dropper.c: In function `getval':
dropper.c:38: warning: float format, double arg (arg 3)

Also I can get it to crash on Windows 2k if I enter something strange on the heater current prompt. Possibly I can get it to crash in some other ways also, just a little note I made I did not try to recompile it on Windows, I have no compiler installed on this particular PC.

Some error-handling at the user input would fix this, but you have written you program just like I usually do. Make sure it works, then maybe later add some error-handling and refinements.

In Linux it does not crash, you are meerly presented by negative voltages and power figures!! One more reason to go "penguin".

Sorry, I did not mean to complain or anything, it's a useful program! I have looked at Paul's spreadsheet, and I also had thought an making a small C program.

/Oskar
__________________
Old electronics smell better!

http://gargnas.net
Oskar.B is offline  
Old 14th Feb 2006, 1:04 am   #3
paulsherwin
Moderator
 
paulsherwin's Avatar
 
Join Date: Jun 2003
Location: Oxford, UK
Posts: 27,970
Default Re: Dropper calculator

Yes Oskar, you will get different warnings on different systems. My Linux system warns about assigning a float to an integer. The Windows C++ compiler warns about something else (can't remember what it was now, but it wasn't important).

You are right that there's no error handling at all. The program just tries to find a floating point value from whatever you type in. I'd expect it to use '0.0' if there isn't a valid value there but it may access an invalid memory address or something. I may add some error checking in a future version if there's any interest.

Best regards, Paul
paulsherwin is offline  
Old 14th Feb 2006, 12:11 pm   #4
paulsherwin
Moderator
 
paulsherwin's Avatar
 
Join Date: Jun 2003
Location: Oxford, UK
Posts: 27,970
Default Re: Dropper calculator

The program doesn't work reliably at present because of problems reading user input. I'll post an updated version here when I've fixed it.

Paul
paulsherwin is offline  
Old 14th Feb 2006, 1:30 pm   #5
paulsherwin
Moderator
 
paulsherwin's Avatar
 
Join Date: Jun 2003
Location: Oxford, UK
Posts: 27,970
Default Re: Dropper calculator

This version actually works! I've tested it and everything!

V0.3 fixes user input under DOS/Windows and fixes a coding error in the capacitive dropper calculations.

Paul
Attached Files
File Type: zip dropper.zip (39.2 KB, 91 views)
paulsherwin is offline  
Old 14th Feb 2006, 3:36 pm   #6
Oskar.B
Pentode
 
Oskar.B's Avatar
 
Join Date: Oct 2005
Location: Gargnäs, north of Sweden
Posts: 105
Default Re: Dropper calculator

Looks like those changes you made should have done it. I will compile and test it later this evening maybe. On windows I compile my DOS programs with Delorie DJGPP.

/Oskar
__________________
Old electronics smell better!

http://gargnas.net
Oskar.B is offline  
Closed Thread




All times are GMT +1. The time now is 1:24 pm.


All information and advice on this forum is subject to the WARNING AND DISCLAIMER located at https://www.vintage-radio.net/rules.html.
Failure to heed this warning may result in death or serious injury to yourself and/or others.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright ©2002 - 2023, Paul Stenning.