Split times

Chief Geek
Posts: 302
Joined: Sun Feb 07, 2010 2:36 pm
AntiSpam: No

Re: Split times

Post by Chief Geek »

Next Chapter: The 2013 Plan

Because we don't have a way to transmit data along the wire (yet), I'm continuing along my old design route. The plan is to have sensors around the hill (including "special" ones at start & finish) that each have their own real-time clock and removable "memory card". I can gather the memory cards at lunch and the end of the day and coallate the data in to splits from there. Time & enthusiasm permitting, Kevin & I may be able to unify the split times & overall times.

Paul
"Christina", New #13/#55x, '90 Miata: In progress
"Keiko", Old #13x/#55x, '96 Miata: R.I.P.
Daily Driver: '11 Mazda2 (small cars... some men have nothing to compensate for)
Chief Geek
Posts: 302
Joined: Sun Feb 07, 2010 2:36 pm
AntiSpam: No

Re: Split times

Post by Chief Geek »

Real Time Clocks:

For everything to work, each sensor must "know" exactly what time it is. Thanks to the electronic-ization of our lives, there are dozens of cheap real time clock (RTC) chip that are pretty cheap. I can sync each sensor's RTCs against a master clock in the morning when I turn the system on. All we need is for them to stay in sync for 10 hours, max.

After testing som $3 clock chips, I've figured out that these won't do what I want. The best I could do was to keep 4 individual RTCs within 0.4 sec over 10 hours. Not good enough for timing down to tenths of a second.

I've getting some samples of $9 clock chips that are 25x more accurate. This should be easily give us 0.1 sec precision, probably 0.05, maybe 0.01.

We'll see what arrives in the mail.

Paul

PS For the serious geeks: The 1st chips were DS1305 & DS1307 with +/- 50 counts per million accuracy xtals, (@ room temperature). The newer chips (DS3232) are good to within +/- 2 counts per million and are temperature compensated from 32 - 120 degF.
Last edited by Chief Geek on Tue Mar 19, 2013 8:02 pm, edited 2 times in total.
"Christina", New #13/#55x, '90 Miata: In progress
"Keiko", Old #13x/#55x, '96 Miata: R.I.P.
Daily Driver: '11 Mazda2 (small cars... some men have nothing to compensate for)
Chief Geek
Posts: 302
Joined: Sun Feb 07, 2010 2:36 pm
AntiSpam: No

Re: Split times

Post by Chief Geek »

NEHA Memory Cards:

Now that a sensor can see the cars and knows what time it is, the last step to record the "event".

The 2012 system used SD cards which are good & bad. Good because they have HUGE capacity (I never used more than a few percent of an ancient 32 MByte card). Bad because they are picky about the voltage used (3.1-3.3V) and the SD card sockets are not as cheap as you'd think and are large (increasing circuit board cost).

USB memory sticks are also huge and smaller, but the hardware and software to required to read and write to them are magic to me. (Any advanced technology is indisinguishable from magic by the uneducated.)

Luckily, small EEPROM chips are really cheap and easy to read and write. After trying a few different storage formats on a spreadsheet, I've found one that will store 300 timestamped events in 12K.

I found a library that writes to these I2C EEPROM chips and works well. 64 Kbyte chips (hello Commodore 64) are a couple of bucks and are available in old-style DIP chip packages (the ones where I can see the pins without a magnifier).

So... I downloaded the gEDA schematic and circuit board software, barged around in it, and designed this little board. I also found a small-run PCB service that will make me 12 of these for $12 in 3 weeks. I've never had boards made before, nor have I ever designed one, so I'm totally prepaired to set $12 on fire.

This is what my imagination, and computer, think they will look like. We'll see when they arrive.

Front:
Image

Back:
Image

Paul

PS In case I need more storage, I designed them to be stackable and, because they have 3 address pins, jumpers can be installed to give each card/chip the right addressing. For now, I'll just solder the jumpers I need for one card per sensor and leave the back connector off.
"Christina", New #13/#55x, '90 Miata: In progress
"Keiko", Old #13x/#55x, '96 Miata: R.I.P.
Daily Driver: '11 Mazda2 (small cars... some men have nothing to compensate for)
User avatar
KevinGale
Posts: 836
Joined: Thu Sep 04, 2003 3:01 pm
Location: Sutton, NH

Re: Split times

Post by KevinGale »

Chief Geek wrote:Next Chapter: The 2013 Plan
Time & enthusiasm permitting, Kevin & I may be able to unify the split times & overall times.
Yeah that's about how it works. :lol: It certainly seems like we should be able to merge these into one database.

Lately I've been thinking of rewriting the whole race application again. I'll probably wait until we update the finish hardware so we have a RTC there as well. The app is written in a pretty much obsolete language and I'd like to get it on a more current platform. My first choice would probably be C# but Java might be a good choice as well. No experience in Java but it's not that different than C#. Java might be more accessible to others if something ever happens to me.

I feel I should also remove the Microsoft Office dependencies. MS Office isn't free and it's required right now to create results. That might be harder. I use some interesting office tricks to make things fit smoothly on a page. For example I can adjust the spacing between lines to make things fit or use a fractional font size like 10.5. I'm hoping to find a PDF library that will allow me to generate PDF files directly and fine tune the formatting until things fit correctly.

The data is also stored in a MS Access format database. I'd probably change that over to Firebird since it's rock solid and open source.
User avatar
Challenger392
Posts: 254
Joined: Tue Aug 14, 2012 11:52 pm
AntiSpam: No

Re: Split times

Post by Challenger392 »

I'm not sure what dependencies your dealing with. But If your looking for good software for dealing with MS office files, OpenOffice is great freeware that is two way compatible (as far as I know) with MS office, and since it is open source software you can get all the latest greatest updates and bug fixes all the time. Might be something to look into to curtail any MS office dependancies.
Luke Moultroup
Technical Support
Pratt & Whitney Engine Services

http://moultroupracing.blogspot.com/

2012 Dodge Challenger SRT8 392
1972 Dodge Challenger 318
2006 Jeep Grand Cherokee 5.7
2004 Mazda 6
Howe Modified
1989 Suzuki GSXR1100K
User avatar
walterclark
Posts: 1442
Joined: Sun Feb 08, 2009 12:57 pm
Location: Dover, MA.
Contact:

Re: Split times

Post by walterclark »

I will second the nod to OpenOffice. I started using it maybe 2 years ago. Real complete package, including a database, direct PDF export and a lot of custom fonts and characters.

I have had a bug on my desktop for maybe 6 months now where OO often crashes soon after opening it for the first time after a Windows reboot, but it self-recovers OK. And it doesnt do it again until after another re-boot. It doesnt do it every time either. I dont lose anything its just irritating.
The older I get the better I was.
User avatar
KevinGale
Posts: 836
Joined: Thu Sep 04, 2003 3:01 pm
Location: Sutton, NH

Re: Split times

Post by KevinGale »

The dependency is that the software uses MS Word to generate the results. Not the file format but Word itself. The NEHA race app connects to MS Word and creates a document on the fly. The software is fairly complex because it generates multiple documents to find a best fit. On the fly it adjusts things like inter-line spacing, margins and font sizes (including half point sizes) to find the best fit. It's fun to watch. It's like watching someone type in a document and format it at super human speeds.

MS Word is an incredible report generator when used this way. You can do pretty much anything you can imagine. I think the best way to replace it will be generating a PDF directly but that remains to be seen.
Chief Geek
Posts: 302
Joined: Sun Feb 07, 2010 2:36 pm
AntiSpam: No

Re: Split times

Post by Chief Geek »

Add my name to the list of people that hasn't used MS Office in forever. I switched to OpenOffice 6 or 7 years ago and followed the OpenSource/GPL crowd to LibreOffice when Oracle bought Sun and tried to "monetize" everything.

Kevin
I'm betting that OpenOffice/LibreOffice as well as several printing/pdf libraries will do what you want. If it helps, LibreOffice (and Open Office, I think) uses Java for scripting. As usual, I'm betting your only real constraint will be familiarity with the new tool, not feature-set. Ah, if only spare time would grow on trees.

If SQL is one of your easy alternatives for the DB, I'll help however I can. I built our companies project management & production scheduling apps with Java and SQL (derby).

Being someone that benefits from working in environments that encourage proper structure, I've found Java to be pretty elegant.

We have many different OSs at work (including at least 4 geneations of Windows). I've heard complaints from "real" developers about Java's "write once, run everywhere" scheme. Within what I've done, everything has worked flawlessly.

Paul
"Christina", New #13/#55x, '90 Miata: In progress
"Keiko", Old #13x/#55x, '96 Miata: R.I.P.
Daily Driver: '11 Mazda2 (small cars... some men have nothing to compensate for)
Chief Geek
Posts: 302
Joined: Sun Feb 07, 2010 2:36 pm
AntiSpam: No

Electrical engineering help

Post by Chief Geek »

I'm finalizing the design of the Gen2 NEHA car sensor and am working on the IR emitter.

How do I size/specify the incoming DC power capacitor when the average current is ~30 mA and the peak current is >1000 mA?

The IR LEDs have a very low duty cycle, like 2% of every 26 msec period (38 kHz). 98% of the time, the current consumption is ~10mA (timer chip). The other 2% of the time, the load is 1000 or 1500 mA, depending on how many banks of LEDs are enabled.

There is no voltage regulator anywhere because, as I understand it, the 556 timer chip doesn't seem to care what supply voltage is, so long as it's within the chips limits. Also, I have a current limiter (FET-based) for the IR LEDs so this current should be fairly independent of voltage.

I'm trying to have one design that can use any of the following power sources:
- car battery
- 4 AA alkiline batts
- 5 or 6 AA regarchable batts
- 1 or 2 of the 6V lantern batteries
- cheap 7.2V remote control car batteries (cheap & high capacity)
- Any other 6-12VDC power source I can scrounge up for $0

On my prototype board, a 47uF power cap seems to work well with 4 AA alkilines and both 1 and 2 lantern batteries (from Walter). The only logic behind using that one was that it was the largest one laying on the bench. My prototype seemed quite tolerant so I'm guessing that wide range of cap sizes will work.

Part of my mind thinks that, so long as the cap is larger than a magic value, and it's resistance isn't too high, it doesn't matter what cap is used. BTW, the only reason I'm not just going huge is because low volume/qty PCBs are billed by the square inch. Finally, I put 0.47uF cap. across the timer chip's power supply pins because it seemed like a good idea.

If anyone can give me an off-the-cuff estimate or point me to a plain-English explanation of how to work it out, I'd appreciate it.

Paul
"Christina", New #13/#55x, '90 Miata: In progress
"Keiko", Old #13x/#55x, '96 Miata: R.I.P.
Daily Driver: '11 Mazda2 (small cars... some men have nothing to compensate for)
User avatar
walterclark
Posts: 1442
Joined: Sun Feb 08, 2009 12:57 pm
Location: Dover, MA.
Contact:

Re: Split times

Post by walterclark »

The first ting is to clarify the pulse rate. You state the emitter has a period of 26ms (38kHz). The 1/26ms frequency is 38Hz. What is the 38KHz?
The older I get the better I was.
Post Reply