Lol PLEASE help with prize Challenge!!

useless

Senior Member
HI, um This is my first ever post... lol, Um Theres a little challenge with a prize of lots 6000mcd ultra bright leds to the person who can turn the most leds on seperately (one on at a time) using a 08-m picaxe, naturally I'd like to win (sadly its a young peoples challenge so none of you guys can enter) so could you help me? the best so far is nine

Edited by - useless on 26/08/2006 02:46:27
 

thelabwiz

Senior Member
Maybe a little air code here ;-)

Do the LEDs have to remain on, or just be turned on/off?

For the on/off case, you might be able to handle multiple LEDs on a single PWM output by using a separate series-resonant L/C circuit for each LED that drives a diode rectifier with a small filter capacitor. If the pulse adjustment range is great enough (width + rep rate) you might be able to generate a number of different frequencies.
If you want to try this, use low power LEDs as there won't be much signal level.

By the way, you'll probably need to do a LOT of tinkering to get this to work.

And if you want to see some "gee whiz" electronics, watch the video on this page:
http://cre.ations.net/creation/44
The prototype device sold for over $500US on ebay - wish it had been my idea ;-)
Note to anyone seriousy interested - the PIC functions of the fountain can probably be done with an X-series PICAXE.

John
 

useless

Senior Member
Sorry, whoops forgot to mention, it gets harde, your only allowed to use 1 08-m picaxe and leds (and as much wire as needed)
so no other components and yes they have to go off, so 1 on rest off.
 

useless

Senior Member
Ooooooh its just a little web challenge, There isn't actually a prize I just said there was so you'd help, lol if I win I get higher status
 

Michael 2727

Senior Member
Plot them out yourself.
<code><pre><font size=2 face='Courier'>
| Neg Pos O/O - 0 I/O - 1 I/O - 2 I/O - 4
|
|----------------------------------------------------
O/O - 0 |
|
High=1 |
Low=0 |
|
|----------------------------------------------------
I/O - 1 |
|
High=1 |
Low=0 |
|
|----------------------------------------------------
I/O - 2 |
|
High=1 |
Low=0 |
|
|----------------------------------------------------
I/O - 4 |
|
High=1 |
Low=0 |
|
|---------------------------------------------------- </font></pre></code>
 

hippy

Ex-Staff (retired)
Any chance of a link to where this challenge is, so we can read the exact rules for ourseleves ( your abridged version doesn't seem to allow resistors to be used :-o ) and see how the winner so far managed to do nine LED's ?

I've managed to get up to eight LED's but can't see a way to go above that yet. The 'niner' may have used some neat trick but may not have exploited it to the full yet. Has it been proven to work or is it just theoretical or simply a claimed nine LED's ? I'll admit I'm intrigued.

This hasn't been fully tested, but I did check that a LED via 1K8 from +V to an I/O set as an input didn't come on and does when the output is set low.<code><pre><font size=2 face='Courier'>| O0 O1 O2 O4 |
`---.-------.-------.-------.---'
.|. .|. .|. .|.
| | | | | | | |
|_| |_| |_| |_|
| | | |
A }--|&gt;|--{ | |
| | | |
B `--|&lt;|--{ | |
| | |
C }--|&gt;|--{ |
| | |
D }--|&lt;|--{ |
| | |
E | }--|&gt;|--{
| | |
F | `--|&lt;|--{
| |
G }----------|&gt;|--{
| |
H `----------|&lt;|--' </font></pre></code> <code><pre><font size=2 face='Courier'> A B C D E F G H </font></pre></code> <code><pre><font size=2 face='Courier'>
O4 : I I I I 0 1 0 1
O2 : I I 0 1 1 0 I I
O1 : 0 1 1 0 I I 1 0
O0 : 1 0 1 0 1 0 1 0 </font></pre></code>
If anyone can find a way to turn Output Pin 0 into an Input that will allow 12 LED's. I've tried COUNT and PULSIN but that didn't seem to work.

[Edit] Actually, you'd have to move the R's around because as it is they end up with two LEDs paralleled with a single, so when the single lights so do the other two. SHould work with the LED's moved, but I'm not editing that lot.

Edited by - hippy on 26/08/2006 05:54:16
 

hippy

Ex-Staff (retired)
Michael 2727 : <i>I did a quick count and got 22. Changing that to 19 now. ~ ;o) </i>

But does that fit with the rule &quot;Only one LED on at a time ?&quot;, I suspect not, and that is the hard part.
 

useless

Senior Member
http://www.geocities.com/karlsmindstorms/brightsparks/picaxe_leds.jpg is the link to the schematic for 9 leds, um I just accidentally started a new topic when I was ment to post in here, If it is possible to close inputs (pin 4 in3) then more than 8 will be allowed, I think I have nine though
, but 13 if you can switch inputs off.

Edited by - useless on 26/08/2006 05:51:51

Edited by - useless on 26/08/2006 06:03:18
 

hippy

Ex-Staff (retired)
Yes, that should work. It's almost what I arrived at, but you handled Output 0 better than I did which gains an extra LED. I don't think you'll do better than that. Well done.

You've got the same problem I just spotted minutes ago with my own in placing the resistors. For example, if you light D9 then D5 and D6 are also lit because they are paralleled. Moving the R's ( you'll then need more than four ) will fix it.
 

useless

Senior Member
wait up I might have summit
um this is alot less neater as I just banged it up, arrows point direction. does it need resistors?
http://www.freewebs.com/bartmonkey2/allrobots.htm
make sure you go: in 'all robots'&gt;'last'&gt;'led circuit'&gt; click on picture then click on picture again for closer inspection on shabbyness


Edited by - useless on 26/08/2006 06:29:31
 

useless

Senior Member
wait how about connecting another led straight from output (o/o) to v- and turning all other ports on output low and put high (o/o) this would give you another one
 

Michael 2727

Senior Member
I said it was a quick look -
And assuming Input=Tristate, as opposed to HI or L0W does not light the LED.
It's Saturday relax day not brain twister day, ~ ;o)
This is what I thought.
<code><pre><font size=2 face='Courier'>
| Neg Pos O/O - 0 I/O - 1 I/O - 2 I/O - 4
|
|---V----V------V--------V--------V--------V-- Hi,Low or Tri
O/O - 0 |
|
High=1 | X L L L
Low=0 |
Tri=@ |
|----------------------------------------------------
I/O - 1 |
|
High=1 | X L L
Low=0 | H H
Tri=@ |
|----------------------------------------------------
I/O - 2 |
|
High=1 | X L L
Low=0 | H H
Tri=@ |
|----------------------------------------------------
I/O - 4 |
|
High=1 | X L L
Low=0 | H H
Tri=@ |
|---------------------------------------------------- </font></pre></code>
 

useless

Senior Member
Sorry I have to admit im totally lost with that diagramme, :( whats 'tristate'?,
But ive managed 10 which is the best so far, but probably not for long, can you quickly check it, (not physically with a picaxe but in your head) I can't find anything wrong with it but I don't have a working 08 picaxe to try it (lol the leg broke off) this is the same link as the last one so follow the same guide as pge 1 except its called new circuit:
http://www.freewebs.com/bartmonkey2/allrobots.htm
 

Mycroft2152

Senior Member
WOW! That's gotta be a record! 17 posts in 7 hours, all on the same topic!

The UBT (Useless Brain Trust) has been very busy.

;)

Myc
 

useless

Senior Member
yep, everyones queing up to help me, actually ive only got nine I realise the error in my last posted link-to-circuit.
now im equally winning, michael can you please explain your circuit a bit more?
 

Michael 2727

Senior Member
When a pin on the 08M is made an &quot;Input&quot; it is neither Hi nor Low, e.g. Readadc, it only
senses the input voltage source/sinking only
a minute current.
I have not tried it yet,(very un motivated today, relaxing)
Re: the plot-
If you follow each row across then look at each column down, where there is an X,L,or H
the LED should be lit. If any left over were
made tristate they would prevent the other LEDs going on. O/O = 0 can only ever be an
output. (it is easier to follow with the grid lines ~ ;o))
 

useless

Senior Member
Ok just al little bit confused, could you tell me how many leds this lights at a time so I can work this thing out, I still don't know what tristate is.
 

Michael 2727

Senior Member
Most of the 08M pins are programmable.
There are 4 states they can exist as -
High = +Pos
Low = -Neg
Tri-state = neither Hi or Low, = high impedance floating in the middle somewhere.
N0-state = blown up or fried pin.
If you connect an LED from a High pin to a Low pin you can light the LED.
If you connect an LED from a High pin to Neg you can also light the LED.
If you connect an LED from a Tri-state pin to a Low or High pin you get nothing.
If you connect an LED from a Tri-state pin to Neg or Pos pin you also get nothing.
If you connect a High pin to another High pin nothing.
If you connect a Low pin to another Low pin nothing.
If you connect a High pin to Low pin directly you get a No-state pin.
If you connect a High pin to Neg directly you get a No-state pin.

If you program a pin to be &quot; Input &quot; it will not source/Pos+ or sink/Neg- any current.
In this way you can use an &quot;input pin&quot; as OFF.

The idea is to make a LED light with as many combinations of the Hi, L0, Pos, Neg
and Tri-state pins without making any N0-state pins.


 

Michael 2727

Senior Member
<code><pre><font size=2 face='Courier'>



0= o o 0 =

___ LED
1= Hi o-----o---------|___|----&gt;|------o 1 = Tri LED OFF
|
| ___ LED
2= o o---------| |----&gt;|------o 2 = Low LED ON
|
| ___ LED
4= o o---------|___|----&gt;|------o 4 = Hi LED OFF
|
| ___ LED
Pos= o o---------|___|----|&lt;------o Pos LED OFF


Neg= o o Neg
</font></pre></code>
I also just had another thought -
If you use White LEDs being a device that only conducts @ 3.6V or so, they won't conduct if piggy-backed or feeding through
another LED in the circuit as a Red LED would.
You may be able to squeeze a couple more LDEs in with some clever thinking.
 

hippy

Ex-Staff (retired)
How I'd describe tri-state ...

An output pin can be set high (+V) and it will source (deliver) current, such as when illuminating a LED to 0V. Anything connected to the output will be pulled up towards +V.

An output can be set low (0V) and it will sink current, such as that which flows through a LED connected to +V which will cause it to illuminate. Anything connected to the output will be pulled down towards 0V.

An output can also be 'tri-stated', also known as 'high impedence', 'Hi-Z' or just 'Z'. In this state, the output neither sources nor sinks current. Anything connected to it will 'float' as if it wasn't even connected.

Okay, that's a pefect world and there will be uA's of current flow and a tendancy to pull whatever is connected to +V/2, but it's so small we can ignore it in most cases.

The way the PICAXE/PICmicro works is that it has two internal control lines to affect the output; one will turn on the circuitry which forces it high and sources current, the other will turn on the circuitry which pulls it low and sinks current. If neither control lines are activated the output is neither sourcing nor sinking current and is thus tri-stated.

It just so happens that when a PICAXE 'INPUT' command is used it turns off both control lines, as opposed to the 'HIGH' and 'LOW' which turn one of them on.

Also, because a tri-stated output allows whatever is connected to it to float, whatever that level is can be read back in, using the 'pins' variable.
 

Michael 2727

Senior Member
Very good Hippy,
I didn't want to complicate things any further.
Also I have never delved into the nitty-gritty of the &quot;Input&quot; state anyway.

Usless how's that Rats Nest Looking ?
can imagine.
 

eclectic

Moderator
Useless.

Now that you&#8217;ve got a circuit for nine LED&#8217;s, you could MAKE
your own 7 segment display and driver.

One 08M, and 14 / 21 rectangular LED&#8217;s.
No other chips. No resistors.

For a hint at the programming, see ABS&#8217;s reply in

http://www.rev-ed.co.uk/picaxe/forum/Topic.asp?topic_id=4020&amp;forum_id=21&amp;Topic_Title=Several%2B7%2BSegment%2Bdisplays&amp;forum_title=No+new+posts+please%21+15

And for the display, a simplified version of the circuit shown
in Rick Harris&#8217;s link.

http://www.rev-ed.co.uk/picaxe/forum/Topic.asp?topic_id=4497&amp;forum_id=24&amp;Topic_Title=Driving%2B5%2B7%252Dsegment%2Bdisplays%2Bwith%2Bone%2BPIC%253F&amp;forum_title=No+new+posts+please%21+17

It won&#8217;t be fast. But it&#8217;ll be cheap.
And most importantly, you can say &#8220;I made that.&#8221;

e.


 

useless

Senior Member
Ok I understand tristate, but can you actually put it in tri state? or is it tristate when its an input? - by the way I think I just sucked my LAST o8m up the vacuum cleaner!!!!

Edited by - useless on 27/08/2006 09:49:55
 

manuka

Senior Member
Gasp-with no 08Ms to trial these multi-LED suggestions,perhaps <b>useless </b> will finally be able to focus on earlier projects ! Useless - are you in the Hutt Valley? Want some 08Ms when I get home? I'm based just along the road in Eastbourne, &amp; feel half responsible - as a fellow Kiwi you'll understand- for your design whims...



Edited by - manuka on 27/08/2006 19:27:57
 

wilf_nv

Senior Member
Here is a little schematic of a 08 PICAXE to control 12 LEDs with 4 bidirectional I/O pins:

<A href='http://www.user.dccnet.com/wrigter/picaxe/12LEDpyramid.gif' Target=_Blank>External Web Link</a>

Note the table of output states uses +, - and Z to denote high, low and high Z (input)

Using 1/12 duty cycle multiplexing, any number of LEDs can be on at a time albeit at lower average current

After a belated second look I realize that OUT 0 is not bidirectional but output only. However using 50% duty cycle PWM on pin0 and adding a capacitor to filter the voltage at TPA, 3 voltage levels can be generated: 0V, Vcc and Vcc/2. Given that the LEDs have a 2V forward voltage, this Vcc/2 level simulates the OUT0 hi Z state for the purpose of this circuit.

wilf

(updated schematic with PWM filter)

Edited by - wilf_nv on 28/08/2006 05:29:29

Edited by - wilf_nv on 28/08/2006 06:50:10

Edited by - wilf_nv on 28/08/2006 06:52:05
 

useless

Senior Member
Yesss! I think we have a winner!
Nah im ok for 8 pins lol, ive got an order coming in from south island components,
im in the hutt valley, just in case ur wondering. :)
 
Top