Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Bicycle POV

Status
Not open for further replies.

Macka

New Member
Hey guys,

I’m looking to build a very cheap POV device for a Human Powered Vehicle (basically a recumbent bicycle) if you want a bit of an idea on what I’m planning on putting this on then go here **broken link removed**.

Anyway, I need a little help designing it.

I want the LED's to be mounted either vertically on the body of the vehicle OR along the spokes of a wheel, however, I am not sure which will be better, as I don’t know whether its mounting position will effect the speed we must be travelling at to get clear "images" (text), whether the LED’s are at risk of serious damage (the vehicles roll frequently) and whether the weight will have a significant effect on the balance of the wheel.

So my first question is where do you think the best mounting point is (body or wheel)?

I have been doing some research looking at various similar projects, in particular https://www.ladyada.net/make/spokepov/index.html, which uses a Serial to Parallel Latch, what does this do, and is my project likely to need one?

The main functions I want to incorporate into this device are periodic display of team name (and possibly school name as well), periodic display of current speed, periodic display of total distance/lap count and maybe some team sponsors too.

If the laps are counted I want to be able to store them before power down and be retrievable from a PC (although this isnt a must-have)

These are a few constraints that I think I will have to follow to make sure it is cheap, effective and allowed to be mounted.

Constraints:
Small
Lite
8 LED’s (or a few more) (must not be Red, should avoid White this is to keep it within the competition rules)
Smallest number of components possible (to keep the size/weight/cost down)
Batteries last ~25 hours (length of the race is 24, lights on for 12 6pm-6am)
Cheap < AU$20 (or as close as possible)
Auto adjust for speed (to keep the display clear and consistent)
Must be completed and debugged by 5th of September 2007 (at the very latest)
Easy to program/reprogram
Operational display between 18Km/h and 40Km/h (lower speeds too, if possible)



I plan to get my MCU for free using samples, however I’m not sure which one to go for, must be sampleable, must have enough pins and must be fast enough to be able to monitor speed and update display. The one that seems to be most commonly used is the ATtiny2313, is this a good MCU to use? any better suggestions?

I don’t have a programmer apart from a PICAXE programmer, and I want to be able to do in-circuit programming if possible.

I also need to choose a language to program it in, I don’t know ASM or C (although I think I could pick up C) and i have never used Basic on a MCU, although i do use VB6 and have used PICAXE Basic (neither of which count for much)

Are there any disadvantages/advantages to using Basic over C?

Lastly, now that I think I have worked out my design specs, where do I start in building the circuitry?

Thankyou

PS Sorry for the long post.
 
Yes best place it to mount in the wheel.Mounting position won't give any effect.But speed is the most important to display the stuff.

You can get some ideas from this link.Its all based on propeller clock by Bob Blick.

**broken link removed**
 
Ok, thankyou, i'll have a look at that.

probably should also have mentioned that the wheels will most likely be 16" (the car is still being built, but we are 99.99% certain we will be using 16")
 
led's don't weigh anything basically, so balance won't be a problem, unless you mount 40 to one side:D :D and they are very strong, so rolling won't be a prob


oooh my 403 post:D
 
gratz on the 403rd post

well, mostly i was worried about them being scraped along on the road, because you can slide when you roll, i snapped the brake mount off 2 years ago doing that, so i am a touch worried about the effects of bitumen vs LED's

but i guess it wont be too much of a problem.

btw, whats the weather like in Melbourne - its freezing here
 
it's kinda cold here, but not to bad (i'm inside):D :D Led's can be scratched, minimizing the light output, but you have to travel pretty far in the vehicle tipped on its side to actually "damage" the leds. you can run over led's in a truck, and they will still be good:D Also led's don't cost much if you find a good supplier, so make them easy to replace just in case;)
 
wow, i didnt realise they were so durable, they always seemed pretty soft to me.

will probably mount them in a piece of corflute, we usually use a disk for a hubcap of sorts.

Ok, so where do I go from here?
I suppose the next step is probably determining the MCU to use, and whether or not I need those latches.

So, anyone know which would be the best MCU? im leaning towards the ATtiny2313, purely because it doesnt need a complex programmer, just a Parallel port.
 
andrew12345678 said:
I have been doing some research looking at various similar projects, in particular https://www.ladyada.net/make/spokepov/index.html, which uses a Serial to Parallel Latch, what does this do, and is my project likely to need one?

(snip)

Auto adjust for speed (to keep the display clear and consistent)

1) a serial to parallel latch aka shift register is an inexpensive way to add lots of output to an otherwise output limited system. for example an 8 pin UC couldn't hope to control 32 leds, despite it being fast enough to do so. the shift register (i really like the 74HC595) allows you to almost effortlessly add eight outputs at a time. and they daisy chain, so you can add eight, sixteen, etc, without changing your programming at all.

2) speed sensing is a matter of input and timing. Ada's gizmo senses impulses from a magnet, and adjusts the refresh rate of the display accordingly. basically you keep a timer in your code and reset it with the magnet. the code then makes sure to display the entire message in the time allotted. The slower the wheel turns, the fewer times per second the code will be able to display the message, resulting in a poor POV effect, especially in high light conditions. Ada overcomes this by linking multiple displays. Each display starts at the 12 o'clock position (for example), so with two displays, you end up doubling the frames per second, four displays, quadruple. This allows the wheel to turn much slower, but still present enough data the eye can integrate it into an image.

Getting this finished in a month is certainly possible, provided you're fluent in programming :)
 
justDIY said:
Getting this finished in a month is certainly possible, provided you're fluent in programming :)

If a PIC could run VB i could write the code in my sleep, and i think using a version of Basic for PIC's i could do it with a small amount of effort and maybe 2 or 3 days work. The main problem I can see with the coding is I will have to learn the commands that the PIC version of the language needs.

I think with the limited time I will have to go with Basic, however if i had the time I would have liked to try my hand at C.


Thanks for the info on the Latch, i wanst able to find it by googling, so im glad you were able to tell me. I dont think i will need 1 because i dont intend to use too many LEDs (need to save batteries).

Do you have any advice on the MCU?

For the timing I was going to set a timer and see how many seconds elapsed between pulses (i plan to use a hall effect sensor, as a reedeswitch seems unreliable) and then calculate speed with the circumfrence (guess thats the only way to do it anyway).

Thankyou

PS you wouldnt happen to be anti-DRM would you?
 
check out Mikroelectronika's basic:

**broken link removed**

their free trial version is quite generous in what it can do.

I like the Microchip PIC series of microcontrollers. I'm not going to argue they're better or worse than any other brand, I just started using them long ago, and stuck with it. the 16F88 is a popular chip for starting out. It has enough IO to handle eight leds directly, and if eight is your magic number, you can deal with bitmapped image data as single bytes, making it easy to store and manage. Displaying the data will be easy too, loading a byte onto one of the '88s 8 bit ports.
 
Awesome, thanks, I was going to ask Somone Electro which one he uses, because I think it is 100% free, but this will do if his isnt free.

Are there any drawbacks to using Basic?

Also, is a programmer required for the 16F88? or can it be done like the Atmel chip?
 
OK, It seems if I go with the 16F88 I have a choice of the following chips

---------------pin---Package
---------------count--type

PIC16F88-I/P-----18----PDIP
PIC16F88-I/SO---18----SOIC
PIC16F88-I/SS---20----SSOP

What is the difference betwen package types? and which should I use?

(dashes are because the forum removes spaces and i wanted a table)
 
I think you're going to have a tough time building a POV device for only $20 AUD. A good PIC or AVR programmer will cost you at least half that much.

Being able to use the PICAXE programmer you already have will help you cut costs. You'll probably have to use a 600-line capable chip to do everything you want. Also, I would go with one that has as many I/O lines as you can afford. You can augment your output capability with shift registers, but if you're only buying one or two they'll wind up costing about $3-$4 a piece after shipping is figured in.

A minimal display for text would be about 8 leds - twice that if you want it to be double sided. If the PICAXE is fast enough to multiplex the display you can get away with only needing 8 output lines even for a double sided board. Otherwise you'll need 16 output lines just for the leds. Add an input line for the magnetic sensor and you're up to 17 I/O lines. I'd get the 28X or 40X. Even if you don't make it double sided, it will be nice to have the option to do so later (or to increase the display size of a single sided display.)

A 28X costs 4.35 British pounds according to this price sheet:

https://www.electro-tech-online.com/custompdfs/2007/08/micro_pricelist.pdf

I've never bought PICAXE processors before, so maybe there's a cheaper supplier.

Then you'll have to buy:
- prototyping board (pad-per hole or strip board)
- IC socket for PICAXE
- Hall effect sensor or magnetic reed switch
- strong (neodymium) magnet
- maybe a transistor or two (if you multiplex the display)
- some resistors
- battery holder

and, of course, the LEDs.

You'll want to get ultra-bright LEDs, especially since you'll only have a single POV device. I would expect to spend at least $5 US on the LEDS (shipping incl.) You can probably get a lot more than you need for that price (check on ebay, for instance auctions like this one:

**broken link removed**
**broken link removed**

), but I don't you'll be able to spend less than that even if you only want 8 LEDs.

(If you go for the cheap Chinese LEDs you'll want to buy extras anyway - invariably I've gotten a few defective ones with every order I've placed.)

I don't know what we're up to, but I think it's easy to see that it's going to be hard to come in under your $20 AUD budget.

As for battery life, if you use AA batteries (~2500+ mAH), you should have no problem powering it for entire duration of the race.
 
justDIY said:
google or wikipedia will give you all sorts of information on IC package types.

I recommend the PDIP - plastic dual in line package ... you can plug it into a breadboard and start building your pov prototype.

Ah, so that’s what it stands for! I had no idea what the acronyms were. Yeah, i wouldn’t go for anything except PDIP at this Stage, as I plan to use strip board.

pc88 said:
I think you're going to have a tough time building a POV device for only $20 AUD. A good PIC or AVR programmer will cost you at least half that much.

Will using an in-circuit programmer make it cheaper, or is it going to cost the same, or maybe not even be possible?

pc88 said:
Being able to use the PICAXE programmer you already have will help you cut costs. You'll probably have to use a 600-line capable chip to do everything you want. Also, I would go with one that has as many I/O lines as you can afford. You can augment your output capability with shift registers, but if you're only buying one or two they'll wind up costing about $3-$4 a piece after shipping is figured in.

I have no intention to use a PICAXE, after making a simple electronic die with one, I decided I would try to avoid them as they impose too many limitations such as speed, instruction count (due to memory space) and number of I/O pins available.

pc88 said:
A minimal display for text would be about 8 leds - twice that if you want it to be double sided. If the PICAXE is fast enough to multiplex the display you can get away with only needing 8 output lines even for a double sided board.
Otherwise you'll need 16 output lines just for the leds. Add an input line for the magnetic sensor and you're up to 17 I/O lines. I'd get the 28X or 40X. Even if you don't make it double sided, it will be nice to have the option to do so later (or to increase the display size of a single sided display.)

Well, I will probably have to be only 8 LED’s, but if I decide we need more I think I could double it and bind them in pairs, so each pin runs 2 LED’s or if necessary each pin will run a transistor that runs 2 LED's the other option, as you said would be to use a shift register. Double sided is a waste as one side would only be able to be seen inside the vehicle, which is pointless.

pc88 said:
A 28X costs 4.35 British pounds according to this price sheet:
https://www.electro-tech-online.com/custompdfs/2007/08/micro_pricelist-1.pdf I've never bought PICAXE processors before, so maybe there's a cheaper supplier.

As above, I am doing my best to not use a PICAXE, also I plan to sample the PIC, and if the final project works well, I might buy some more chips, since our school has 4 vehicles.

pc88 said:
Then you'll have to buy:
- prototyping board (pad-per hole or strip board)
- IC socket for PICAXE
- Hall effect sensor or magnetic reed switch
- strong (neodymium) magnet
- maybe a transistor or two (if you multiplex the display)
- some resistors
- battery holder

Strip board is relatively cheap, and if I wanted to I think I could get a bit of UV sensitive board off my electronics teacher (he has a bit to do with our school teams). At Dick Smith Electronics strip board is AU$2.99 (76mm x 88mm, with 2.54mm hole) or at Jay Car Electronics it is $3.80 (95MM X 76MM). I would purchase it from a store, since I am limited with online payments and it means no shipping time/costs.

I may also be able to get an IC socket off the electronics teacher, or at Jay Car I can get an 18 pin socket for $2.00 (or not even use one)

The Hall Effect sensor is a bit more expensive, at Jay Car $4.95 and at Dick Smith's $3.95 (wonder if I can sample one from somewhere...)

Strong magnet - this is the hardest part, I'm not sure if I can use one from a Bike Computer and mount to the frame or if I will need to buy one. Dick Smith's doesn’t sell them, but Jay car has a pack of 12 heavy duty magnets (10mm x 10mm x 10mm) for $3.75, however I’m not sure if they will be strong enough here is a link, so if you know about sensitivity of the sensor you may know if these will be good enough **broken link removed**

Transistors are cheap, ~$0.25 each or a bag of 50 assorted for $6.50

Resistors are also cheap $0.04 each.

Battery holder - (most likely going to be makeshift, a couple of cable ties through holes in the strip board/PCB). Contacts will either be soldered or stiff wire sticking out of the board with electrical tape to hold them onto the contacts), If you have a better suggestion, let me know.

pc88 said:
and, of course, the LEDs.

You'll want to get ultra-bright LEDs, especially since you'll only have a single POV device. I would expect to spend at least
$5 US on the LEDS (shipping incl.) You can probably get a lot more than you need for that price (check on ebay, for instance auctions like this one:
**broken link removed**
**broken link removed**

), but I don't you'll be able to spend less than that even if you only want 8 LEDs. (If you go for the cheap Chinese LEDs you'll want to buy extras anyway - invariably I've gotten a few defective ones with every order I've placed.)

I don't know what we're up to, but I think it's easy to see that it's going to be hard to come in under your $20 AUD budget.

As for battery life, if you use AA batteries (~2500+ mAH), you should have no problem powering it for entire duration of the race.

How many lumens/mcd do you think I’ll need? I want it to be bright, but not too bright as I don’t want to blind overtaking vehicles and I think I will need diffused LED's or something... I don’t know much about LED's to be honest... will look at pricing though.

Ignoring LED's though, my total tally so far comes to ~$15.69, assuming I need 8 transistors, 20 resistors and that those magnets are ok. That’s not too far from my budget, and if I can get hold of a 20 pin IC socket for free, then that brings the price down to ~$13.69 however the costs of a programmer will probably fix that :(

My main problems now are:
Programming the chip, I want to use in-circuit programming, unless that ends up being more expensive
The actual circuit design.


Thankyou for your input, it helped me quite a bit; especially since I hadn’t really priced anything or thought too much about the magnet.
 
Last edited:
is the race at daytime? if so, the led's will not nearly blind anyone, in fact, they will only just be visible:eek:
 
24-hour-straight race, starts at either noon or 1 PM on the saturday and finishes at either noon or 1 PM on the sunday, the LEDs will only be running at night (between say 6 PM and 6 AM) but i am hoping (assuming i have enough battery power) to have the rest of the PIC running during the day, so that it can lap count based on distance (track is approx 2.4 Km from memory)

I have been looking for a simple programmer for the 16F88, but i cant find one :( I assume they dont exist.

can anyone recommend a programmer (it only hast to do this 1 model of chip and I need it to be cheap)

this is the one I was looking at https://www.best-microcontroller-projects.com/pic-programmer-circuit.html but i fear it may be a little expensive and needs a high voltage (15V)...


I also just realised that MikroBasic programs via the USB port, but Im not sue if i will need drivers and a special programmer to use it, however it can build the code, so I assume i could use another piece of software to programm the chip, whilst writing and compiling the code in Mikrobasic. is this correct?
 
if you use a pic, it has outputs strong enough to drive standard leds, without transistors. if you run your pic at 5v, you can run two red / yellow leds off each output, regardless if you do doubled sided or not, it doesn't "cost" anything extra power wise to run two leds, and you get double the brightness from it.

a good pic programmer will be expensive. I think this is mainly why atmel chips have been becoming more popular, they are cheaper to program. perhaps your teacher or school has a programmer you can use?

the magnet doesn't have to be super powerful. just make sure you get a more sensitive hall effect sensor. they come in different gauss / tor ratings, so weaker magnet = more sensitive sensor. also remember the inverse square law, double the distance between sensor and magnet, 1/4 the field strength. so the closer you can align the magnet to pass the sensor (without nocking into it), the more powerful the field strength will be.
 
justDIY said:
if you use a pic, it has outputs strong enough to drive standard leds, without transistors. if you run your pic at 5v, you can run two red / yellow leds off each output, regardless if you do doubled sided or not, it doesn't "cost" anything extra power wise to run two leds, and you get double the brightness from it.

a good pic programmer will be expensive. I think this is mainly why atmel chips have been becoming more popular, they are cheaper to program. perhaps your teacher or school has a programmer you can use?

the magnet doesn't have to be super powerful. just make sure you get a more sensitive hall effect sensor. they come in different gauss / tor ratings, so weaker magnet = more sensitive sensor. also remember the inverse square law, double the distance between sensor and magnet, 1/4 the field strength. so the closer you can align the magnet to pass the sensor (without nocking into it), the more powerful the field strength will be.

well, i cant use red, red can only be used at the back of the vehicle, but yellow should be ok. running at 5V will mean extra batteries, but hey, if its not too heavy and the batteries last the 24 hours with 12 hours LED time then im happy to use them - thats 4 batteries to get the full 5 volts, but i think 3 will have to be the maximum.

As for the programmer, im going to try and find a cheap-ish one, i just need a decent schematic. The price of the programmer isnt critical, cause i can use it for other projects so th price isnt too much of an issue.

The teacher may have one, but i doubt the school will, as they dont teach digital electronics since no one signs up for it (its a Hess R subject, which i bad if you want to go to Uni, so no one takes it).

I have ordered 3 16F88 so i will be definately using a PIC.

I guess i'll have to test the magnets and if they arent strong enough i can mount them closer. Good thing you reminded me about the inverse square law, i'll need that for end of year exams :D
 
if you're using throwaway batteries, 4 of them will get you about 6v, which is OK for the pic. it also will give you more runtime as the voltage sags.

three batteries won't give you enough to run two leds in series (yellow has a Vf of 2v), and just running one yellow you're wasting 1.6v on a resistor. you could switch to green, but then you're cutting it close on the voltage, assuming a Vf of 3.3 for green/blue/white leds.

there's lots of threads on this board regarding cheap pic programmers, just browse around the micro controller forum a little.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top