# Search results

1. ### Maths Problem

I am already running @ 16Mhz & have already changed to a word and decreased the pause from 18 to 2. This gives the ability to measure below 16mph for what its worth on the longest straight section of track. Everybody seems to keep forgetting, it's a N Guage Railway. They don't like running...
2. ### Maths Problem

I will experiment further in a few days, when my new cheap chinese pulse generator arrives, replacing the cheap chinese pulse generator that has just died this morning. Neil.
3. ### Maths Problem

Obviously I missed that bit. I tried what you suggested & it seemed to make accuracy worse at higher speeds for some reason. It doesn't actually have to be that accurate (no speed cameras on a model railway !). So I'll stick with what works, which gives a reading of 16 @ 2sec, 33 @ 1sec and...
4. ### Maths Problem

Thanks, You are of course correct, a logical inversion is not what is needed. I was just playing with numbers. The count for 33mph is 112, 66mph is 55, 16mph is 223. Your solution of b2 = 112*33/b0 is pretty good - simple really, why couldn't I see that !!!!. Now gives 67mph for 0.5 sec &...
5. ### Maths Problem

Following up on my model railway scale speed display, I seem to be having trouble trying to get my head around the maths required. The start & stop timing sensors are 100mm apart, N guage scale is 1:148. So I calculated this to be 1 Sec = 33MPH. The problem I'm having is how calaculate the...
6. ### Ideas for measuring model railway loco speed

Here's what I have come up with. Using a 28x2 with direct drive of 3 x 7 seg 0.3" LED displays. Calibrated with a Xtal'd Pulse Generator & tested at scale speed of 33, 66 & 99, all display within 10% accuracy. #rem 3 Digit 7 Seg Com Cathode display direct drive for display of 0 - 199 with dp's...
7. ### Quick question on pullups

It's easy enough just to add a neodymium magnet to a few wagons / coaches. I don't need to do all of them. Plus the sensors are tiny by comparison to optical. Far easier setup / programming - they either work or they don't.
8. ### Quick question on pullups

A3144 seems to fit the bill, not magnet polarity dependant, non latching, built in schmitt triggerering, work off 4.5v to 24v (I'm using 5v), Open Collector O/P. Datasheet readily available. Not got any of those, but cheap enough to buy. Neil.
9. ### Quick question on pullups

Just tried a quick test using readadc10 Values are approx 800-900 in shade, varying between 100 to 250 when a reflective object placed in front, and down to 27 when pointed at window with blind drawn. So think I'm going to scrap the idea and go with hall effect sensors with a magnet mounted on...
10. ### Quick question on pullups

IN the final position when I mount them, they can / will be set below track level in a hole anyway. So ambient daylight shouldn't be so much of an issue. They don't seem to be affected by artificial LED room lighting much at all (due to light wavelength of course). But I will look into / test...
11. ### Quick question on pullups

Artificial lighting isn't a problem. It's daylight. It may not be a problem when they are located between the tracks. The main issue with my bench testing is - the test bench is in a loft conv with a large roof window. Even with the blind drawn the ambient light is high. The datasheet doesn't...
12. ### Quick question on pullups

They aren't LDR's. They are opto sensors with IR emitter & filtered NPN semiconductor (supposed to be less sensitive to ambient light). Neil.
13. ### Quick question on pullups

I tried with the pullups, but in daylight found they were too sensitive to ambien light, my fixed eternal 47k's were even worse. So, ended up with 22k's & seems quite consistant now in room lighting. Detection range is about 10mm which will be good for when I insert them into the N Guage track...
14. ### Quick question on pullups

Thanks Alan, I might give them a go, 30-35k is perfectly acceptable. Neil
15. ### Quick question on pullups

Anybody know the comparative pullup value between pins on 08M2 pins C.1 & C.2, are they the same or wildly different ?. Or would I be better off using separate resistors, 47k for optical rx collector pullup to 5v. Neil.
16. ### Ideas for measuring model railway loco speed

What an interesting idea. Not sure I can fit that into a 'N' guage wagon though, it's half the size of yours. But I will study the code to see how you did it. Neil.
17. ### Ideas for measuring model railway loco speed

Gents, thanks for the thoughts. Yes, I was going to use either 74HC or 4000 series CMOS gates for the latch. That's fairly easy for me (my original background was TTL logic). Forgot about the pulsin max duration of 650ms, good point. I haven't drilled the holes for the sensors yet, 12 inches...
18. ### Ideas for measuring model railway loco speed

Using an M2, I want to measure loco speeds. I have two IR sensors (TX/RX) in small packages mounted in the track 12 inches apart. So, 1 Foot Per Sec = 0.6818 MPH, for N Scale multiply by 148 gives me scale speed. Should be easy enough. Thinking of using the 'pulsin' command to measure time...
19. ### Using a voltage divider to measure battery voltage

For me, current drain doesn't matter. It's only active when switched on to enable the IRL fets. So no current drain when not in use - just my DIY method of battery protection. What I posted was as an example, not a suggested solution for the original poster.
20. ### Using a voltage divider to measure battery voltage

The above from ip is pretty much what I have done for monitoring various No Cell LiPo's - 3, 4 & 5. Used FVR40968 & ADCConfig %011, although I ran the picaxe of 5v through a 78L05. Just to give me a green for good & red for low / recharge, it was easy enough to work out the adc value for a 1/10...