Let's Make Robots!

displaying numbers

hi this isnt really to do with robots but it is building something with electronics so i thought i'd ask here because i know the users are friendly and someone will probably be able to help me.

so my friend wanted to build a scaletrix track and he's cutting some wood and thats all fine but we are trying to work out how to make a lap counter for multiple lanes. we decided to use picaxe because thats all we really know how to do. so far we have decided on an arch across the track with infra red emmiters and in each slot (it is slot car racing) there will be a hole containing a infra red sensor. the car goes through breaks the beam sort of and the picaxe starts timing. one picaxe per lane so at the end the picaxe chips will know the time for their respective lanes. to keep cost down we hope to be using an 08m if possible to keep the cost down. anyway so the problem is we need some way of displaying the times.

i thought of using the program processing so we could show time difference and positions but i have no idea how to use it (dont bother trying to explain here but if yuo know somewhere that would be able to teach me how to use it with picaxe then that would be great)

so seven segment displays we thought of but they need loads of outputs and using picaxes thet have enough would cost a lot

so a seriallcd display but some one would have to change the wire between the chips to display each timeunless you got one for each lane which again would cost a lot unless they were non serial but agin we have no idea how to use them

so basicly it comes down to lack of knowledge or budget

thanks for reading all this and if you have any ideas or could tell me what you think my best bet is please answer below


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Actually 7 segment displays are cool for this kind of usage. Yes this 7 segment indicator has 7 input-pins (look at the picture below). But all of them are digital.

So if you use a shift register like the 74HC595 the number of pins you use from the microcontroller (your picaxe) is reduced to 3 (look at the second image below). And this stays 3 even if you add a second indicator or more.

Here some information about the shift register and it's wiring. Don't bother that it is an Arduino site. The wiring is the same what ever microcontroller you use.

On ebay you find one shift register for around 1$. The 74HC595 is around 1/4$. After all this is a cheap solution and fun to make. 


Search for CMOS 4026 7-segment-display driver IC. Picaxe manual 3, page 22.

If you have only, say 4 lanes, you could get away with a single picaxe and then serial out from the chip to display. If you are using a micro, you could even display lap times, if you had a big enough display. I would suggest stepping up to a bit larger PICAXE and just use a single chip to power the lap/time display, rather than individual chips per lane. You could even put your display on your overpass.

Just a thought but perhaps some hall effect sensors could be used under each lane to detect the magnets of the cars passing by?

You can use a max7219 that can control up to 8 digits and only requires few lines for control : http://tronixstuff.wordpress.com/2010/07/09/review-maxim-max7219-led-display-driver-ic/ .

I never used a picaxe but if i have to do this with an another micro i would use an interrupt on every car passes and a free runnig timer.

hi thanks for all you replies 

in reply to birdmun i originally wanted to use one picaxe but when one car passes wouldn't it have to stop timing the others whilst it goes through the start new lap time sub script because it would need another variable for each lap time.

if i'm talking giberish please tell me

In my opinion if you want to record for example 4 lanes you should connect the sensor to 4 pin that have an interrupt and then in a interrupt routine of a timer you check if a car passed, if yes you start to increment a variable until the car passed another time, then you reset the variable and restart.


to NilsB

i looked around for help with programming the picaxe with a shift register

there were plenty of sites but none of them said "what this example would do" and is just a load of for next loops

do you, or anyone for that matter, know a site that could help me with this


You want to display numbers.

Is it that you understand how to wire the shift register chip to your Picaxe - but not how to write Picaxe code that lets you display this numbers?

I saw your post and I might have something that is usefull for you, recently i "came across" :) a 4 x 7 segment display that one can control with 8 pins: 4 Pins for Display Selection and 4 Pins to send the numbers you want to show (I used a 7447 BCDto7Seg Disp Driver), and a Picaxe 28X2:Displaying 4 Numbers

The "trick" is to use a timing of 5 micro secs between sending a number and to the desired display.. Basically  the displays are flashing, but it's all so fast that one sees the numbers "always", not flashing.. :p (I think the 4th transistor is not working wery well, that's why the 4th digit light's up weaker, even if the other 3 display's are off.., but that's another story :p ) If it help's I'm glad to post the schematic and code.