PDA

View Full Version : Discussion Ideas/plans/suggestions wanted for a muli-tone generator warning indicator


jesolins
Dec 12, 2007, 11:51 AM
I want to add different tones/buzzer when the LED lights come on (This is for my use in a Draganflyer application to let me know when it is in different modes and low batt, but may have other uses. The LEDs on the DF are difficult to see in the daylight and an audible signal would work better). I am looking for ideas from this great knowledge source! I want to generate/hear a different momentary tone for each of the 3 LEDs when they come on.
I have seen a piezo buzzer from UK with three tone capability and some piezo driver ICs that might work. The stand alone buzzer would have to have some kind of db attenuation and a way to make it momentary when the LED is on constantly.
I would appreciate any plans or ideas or points to a solution.
Cheers,
Jim

orraman
Dec 13, 2007, 07:53 AM
Could you post a link to the UK device you mention and say what you like and dislike about it?

Dave

jesolins
Dec 13, 2007, 08:08 AM
Hello,
Here is the link: http://www.maplin.co.uk/module.aspx?TabID=1&criteria=usb&ModuleNo=4835&doy=search&C=SO&U=Strat15

But now that I look at it, the 3 colored wires have to be in certain combination to produce the tones, so it may not work as I intended at least not without some other eletrical component that routes the signals and isolates and combines the wire to get the proper tones from each of the three outputs I would like to have. I guess if I got three buzzers and put one on each of the led outputs it would work, but I would still have to get it to only be a momentary tone (not constant) when the LEDs are on solid. Otherwise it would become pretty obnoxcious...;) When I first looked at this, it appeared that each of the wire to a hot would cause a second tone. That was wishful thinking;)
Thanks,
Jim
Could you post a link to the UK device you mention and say what you like and dislike about it?

Dave

Brandano
Dec 13, 2007, 09:36 AM
if weight is important you could hack some of those novelty greeting cards that come with a piezo buzzer and a melody generator. They are really small, but you'd have to recognize the melody quickly to know what state are you in. There's also some that are embedded within birthday candles, but they're usually limited to the "happy birthday to you" tune. Also, you could look at the circuitry on some toy gun, they come with a variety of preprogrammed sound effects, and some are selectable. On some others you might be able to make them selectable by shortening or cutting specific circuit paths.
edit:
just to be more specific: the toy guns normally use potted version of a chip with multiple effects. These can either be addressed by a binary code or random, with random usually being a specific binary address. Let's suppose 3 wires are used to select an effect. In that case you could have 8 combinations
000 effect0 (random?)
001 effect1
010 effect2
011 ...
and so on and so forth until 111
this means that 001, 010 and 100 are all mapped to different effects and may be sufficient to obtain the effect you need. The trouble is that since these chips are bonded directly to the circuit board and potted in resin it might be impossible to get to the actual pins, since these might be shorted as needed during the manufacturing process. if you can get a toy that has a different sound for each button pressed it might work better for you. Toy piano?

jesolins
Dec 13, 2007, 10:29 AM
Thank you for these ideas! Yes, minimal weight is an objective. I'll definitely have to attempt something with one of those musical cards. That is about the right volume as an audible indicator too. I still would have the issue of the "music" being on continuously when the LEDs are on constant, but it might be an interesting effect starting and stopping the music when they blink:) Maybe I can find a toy piano type (tone generator?) in a small lightweigtht card and somehow make a digital switch to the key pad from the LED power?
Keep 'em coming!
Cheers,
Jim

lazy-b
Dec 14, 2007, 04:37 AM
Guys, I guess, its more simple just to use a simple LED. The Time Delay between Flash will give you a different Level or different status, look like it quite easily to differentiate within 1 second interval.

Been thinking of using this as by Battery Level Indicator, currently I been using 10 pcs LED indicator to show from 4.5 to 5.4 Volts.......been thinking of using just single LED, say if the time delay between Blink is 5 Second, thats about Level 5 or 4.9 Volts.

its very easy to count just say "One Thousand One, One Thousand Two.......until One Thousand Ten"

Maybe a 5 level is enough......just need to wait for 5 second only.

Ellion

jesolins
Dec 14, 2007, 09:08 AM
@lazy-b
Thanks for your input. Yes LEDs are great indicators, but in the Draganflyer (the quadrocopter) the LEDs are very difficult to see in the sunshine. That, and the fact that when you calibrate the Thermal Intelligence, you have to hold the frame up and away from you where you can't see them. Then you push this tiny button on the pcb to calibrate the TI. There is no indication that this is being done other than the red LED on the topside away from you stops blinking during this cal. An audio indication of it stopping the blinking would at least let me know that my fat finger has succeeded in pressing the switch (a surface mount button) sufficiently to trigger the cal. I am theorizing that some of the folks who fly this and have the TI not work as it should are not pressing the button sufficiently to activate the TI cal, even though they think they are pressing the button, which again they can't see because of the way you have to hold the DF away form you to do this calibration correctly so that your own IR signature does not screw it up. I have thought about running another LED so that it can be seen from the bottom as you hold it up to do the cal, but I would still have the issue of it being hard to see in the bright sunshine.
Any more ideas or suggestions out there? Maybe one of those keychain sound effects fobs could be hacked?
Cheers,
Jim

Brandano
Dec 14, 2007, 10:04 AM
you could route the LED's to be underneath the quadrocopter? Just an idea...

jesolins
Dec 14, 2007, 10:22 AM
Yes, I will do this too, but they are very difficult to see in the sunshine, so I would still have that issue. I did a search on EBay and found and purchased a credit card "piano" for $2. Your earlier suggestion triggered me, thanks;) I am going to see if I can hack that for the different tones too. I am presuming that the "keys" are momentary to ground and probably can only generate one tone at a time. My challenge will be to get it to work using the on/off LED power. Would this be a AND gate of some sort?
Cheers,
Jim
you could route the LED's to be underneath the quadrocopter? Just an idea...

orraman
Dec 14, 2007, 11:51 AM
An 8pin picaxe should be capable of doing what you want, would you be interested in going that way with help?

Dave

jesolins
Dec 14, 2007, 02:27 PM
Absolutely! I do have a PICkit2 from another navigation light project. Will that work for programming the 8 pin? What do you have in mind??
Thanks,
Jim
An 8pin picaxe should be capable of doing what you want, would you be interested in going that way with help?

Dave

rmteo
Dec 14, 2007, 03:27 PM
Jim,

Since you already have a Pickit2, you can use just about any PIC to do want you want - an 8-pin will work fine. Look at the input state of 3 pins (connected to the LED's) and output a tone on a 4th. output pin. Take a look here:
http://www.oshonsoft.com/pic.html

You can download a free full-featured trial version that is good for 30 days. It has command that will output a tone at a frequency that you want. You can probably write the code for your application in less than 10 lines.

orraman
Dec 14, 2007, 06:20 PM
Jim,
I have no knowledge of the DF so,
do you have access to a 5v supply from the receiver?
do you have easy access to the voltage source before the dropping resistors of the LEDs, or could you measure the voltage of the LEDs to ground, which I assume is common?
Could you consider using a sounder and driver of the type well tested in the Microscream thread but pulsed in a separate code for each LED?
Would you clarify the operation and timings of the LEDs as they are originally said to be constant and later to be pulsing?
If coded pulses are acceptable I would knock up a breadboard and test viability as I have the parts to hand.

Dave

rmteo,
Your link is very good value but for a compiler I would use
http://www.crownhill.co.uk/downloads.php
they also have a Lite Version that is free and handles 50 lines of basic with good RC functions. It works with the 12F675 which should fit this application.

Picaxe chips contain an interpreter which has some shortcomings but has very good RC functions, the 8 pin 08M is well suited for RC work with 80 programme lines, is available in surface mount and programme changes are simply downloaded while the original is running.
http://www.rev-ed.co.uk/picaxe/

Dave

lazy-b
Dec 15, 2007, 04:20 AM
Jesolins: Is that a DragonFlyer 4 Rotor by Mike Dammer? anyway, I have purchase a NEW LED thats Really Bright, even under a 12 noon Sun Light.......can also use a 3 Watts LED, I have this Single AA size Battery that use 3 Watts LED......Sound Alert is good only for Short Distance.

jesolins
Dec 15, 2007, 12:33 PM
Dave,
This is the quad-copter Draganflyer made by Mike Dammer.
Yes, there is 5v output available and easy to get to via either the board, or separate receiver. Yes, the ground is common. Yes, the microscream idea would probably work too, with some modifcations to trigger it at the much lower LED voltage.
The red LED on top varies the blink rate with receiver on/off detection. It stops blinking when you do the Thermal Intelligence calibration.
The two green LEDs have several indications. They will stay on steady if you arm the system intentionally with TI off. They will stay constant until the battery gets low, then they will blink together. With TI on, depending on the quality of the IR it is able to calibrate with (i.e., weather conditions outside), either one, or both, or neither will be lit.
Thanks for your help!
Cheers,
Jim
Jim,
I have no knowledge of the DF so,
do you have access to a 5v supply from the receiver?
do you have easy access to the voltage source before the dropping resistors of the LEDs, or could you measure the voltage of the LEDs to ground, which I assume is common?
Could you consider using a sounder and driver of the type well tested in the Microscream thread but pulsed in a separate code for each LED?
Would you clarify the operation and timings of the LEDs as they are originally said to be constant and later to be pulsing?
If coded pulses are acceptable I would knock up a breadboard and test viability as I have the parts to hand.

Dave

rmteo,
Your link is very good value but for a compiler I would use
http://www.crownhill.co.uk/downloads.php
they also have a Lite Version that is free and handles 50 lines of basic with good RC functions. It works with the 12F675 which should fit this application.

Picaxe chips contain an interpreter which has some shortcomings but has very good RC functions, the 8 pin 08M is well suited for RC work with 80 programme lines, is available in surface mount and programme changes are simply downloaded while the original is running.
http://www.rev-ed.co.uk/picaxe/

Dave

jesolins
Dec 15, 2007, 12:40 PM
Yes, it is Mike Dammers q-copter Draganflyer. I tried an LED wired in parallel with the top red LED so it be visible from the bottom when doing the TI cal. It is still almost impossibe to see in the daylight, although it is a cool lighting effect at night. Maybe there is a way to shade it or use a color that you can tell is on in the sunlight? What color worked for you at "high-noon"..;) I really only need the short distance tone for the TI cal. Louder tones for the low battery would be a plus though.
Cheers,
Jim
Jesolins: Is that a DragonFlyer 4 Rotor by Mike Dammer? anyway, I have purchase a NEW LED thats Really Bright, even under a 12 noon Sun Light.......can also use a 3 Watts LED, I have this Single AA size Battery that use 3 Watts LED......Sound Alert is good only for Short Distance.

orraman
Dec 15, 2007, 05:22 PM
Jim,
On the TTL pins of most pics input voltages between about 0.8v and 2v can not be read reliably by the pic and the voltage across a red LED is normally about 1.6v putting it into the uncertain region. The voltage across a green LED can be about 2v and might be reliably read.
It was for this reason that I asked
"do you have easy access to the voltage source before the dropping resistors of the LEDs, or could you measure the voltage of the LEDs to ground,"
It ought to be possible to read low voltages into the ADC and jump above a set number but this is slower than a simple read on a pin and we will be poling pins for pulses.
Can you measure the different rates that the LEDs flash at to find if using the ADC is viable and set timing requirements?
Level shifting with transistors is another possibility but requires extra parts and board complexity.
Would it be possible to change the type or colour of the LED to raise the voltage above 2v?

Dave

lazy-b
Dec 17, 2007, 12:01 AM
Jesoline: Ok....I know that Guy, we meet through a Yahoo Groups. We are bought working on our Single Seater Ultra Light Mini 500 Helicoper.

its not recommend to connect the 2 LED in Parallel, you need to install a single resistor in series, then connect the 2 LED with Resistor in Parallel.

Some LED need as much as 3 Volt.......I guess, you need to experimentally select a Value of Resistor to give you a very Bright Light:

Here is the approximate value in ohms

R = (V supply - V led) / I
R= resistor Value in Ohms
V supply = is the Supply Voltage , usually 5 Volts
V led = is the Rated Voltage of LED ( 2 volts)
R = (5 votls - 2 volts ) / 0.01 = 300 ohms (may be you can use 270 ohms)
I = recommended current, usually 0.01 Amps or 10 milliamps

jesolins
Dec 19, 2007, 01:09 PM
Hello Dave,
I measured the red LED blinking at approx 1.5V to ground. It comes off of a pin on an IC (op amp?) which is marked with these numbers: AD8552, A#552, C1023. (the IC also goes to the themal sensors) The pin that goes to the red LED has a pull up 1K resistor on it from 5V(yes easy access). The rates are from about twice a second to once a second, but varies with the mode it is in. The green LEDs have approx 2V, measured to ground, going to them. The rates for the green are from off to random blinking to steady. (varies with the quality of IR signal picked up by the sensors) I would change the color to one that is more visible in the daylight too if possible.
Thanks for your help!
JIm
Jim,
On the TTL pins of most pics input voltages between about 0.8v and 2v can not be read reliably by the pic and the voltage across a red LED is normally about 1.6v putting it into the uncertain region. The voltage across a green LED can be about 2v and might be reliably read.
It was for this reason that I asked
"do you have easy access to the voltage source before the dropping resistors of the LEDs, or could you measure the voltage of the LEDs to ground,"
It ought to be possible to read low voltages into the ADC and jump above a set number but this is slower than a simple read on a pin and we will be poling pins for pulses.
Can you measure the different rates that the LEDs flash at to find if using the ADC is viable and set timing requirements?
Level shifting with transistors is another possibility but requires extra parts and board complexity.
Would it be possible to change the type or colour of the LED to raise the voltage above 2v?

Dave

orraman
Dec 19, 2007, 06:19 PM
Jim,
I have an 8 pin picaxe 08M chip on a breadboard that is pulsing a 1k resistor through a red LED to ground that mimics your controller.
It repeatedly flashes at 2 flashes per second for a short while and then 1 flash per second for a while.
The junction of the resistor and the LED is connected to the ADC of another 08M which flashes another LED slaved to the first.
There is a delay of a about 3ms but to the eye they are in unison.
If the chip you mention is as you suggest, that could account for the relatively low drive current of 3.5mA through the existing LED.

Sensing your controller as above the 08M can supply about 20mA at near 5v to flash a bright LED and at the same time could drive a 90db sounder via an FET.

A direct connection to the controller pin would be preferable to using the ADC as one picaxe pin is a dedicated digital input.
So far so good, if the red LED is only used before the flight starts this part seems viable.

Dave

Brandano
Dec 19, 2007, 06:19 PM
If you have to add a micro-controller anyway you can just drive a piezo buzzer directly or through a buffer stage with a square wave signal. I remember when computers only had the square wave to play with. We even had (very poor) voice synthesis on some ZX Spectrum programs! I am sure that you could use one half of a dual op-amp to condition the signal from the LED and the other to drive a buzzer.

jesolins
Dec 19, 2007, 06:42 PM
Dave,
Great. After the initial TI cal, I don't care how the light blinks. Yes I thought the ma current rating was low as I attempted to drive a piezo buzzer directly and it stopped the light from blinking. It did sound when I hooked it to the green LEDs, but then because they are on solid until the battery gets low, it was a continuous squeal. I need a time out or something for that to work. The delay is fine, as long as it stays off when the top LED is off.
JCheers,
Jim
Jim,
I have an 8 pin picaxe 08M chip on a breadboard that is pulsing a 1k resistor through a red LED to ground that mimics your controller.
It repeatedly flashes at 2 flashes per second for a short while and then 1 flash per second for a while.
The junction of the resistor and the LED is connected to the ADC of another 08M which flashes another LED slaved to the first.
There is a delay of a about 3ms but to the eye they are in unison.
If the chip you mention is as you suggest, that could account for the relatively low drive current of 3.5mA through the existing LED.

Sensing your controller as above the 08M can supply about 20mA at near 5v to flash a bright LED and at the same time could drive a 90db sounder via an FET.

A direct connection to the controller pin would be preferable to using the ADC as one picaxe pin is a dedicated digital input.
So far so good, if the red LED is only used before the flight starts this part seems viable.

Dave

jesolins
Dec 19, 2007, 06:45 PM
Hi,
So I would somehow wire on opamp to the existing opamp? Any particular rating/type of opamp that would be required?
Cheers,
Jim
If you have to add a micro-controller anyway you can just drive a piezo buzzer directly or through a buffer stage with a square wave signal. I remember when computers only had the square wave to play with. We even had (very poor) voice synthesis on some ZX Spectrum programs! I am sure that you could use one half of a dual op-amp to condition the signal from the LED and the other to drive a buzzer.

orraman
Dec 20, 2007, 07:21 AM
Jim,
You said
"After the initial TI cal, I don't care how the light blinks."

Does it blink after calibration?
If it does not blink after calibration there will be no input to the pic and therefore no output.
If it does blink after calibration is there any change in the manner of blinking that could be detected to shut down the sounder and the LED and terminate this section of the programme?

Assuming that this is achievable and that you want some indication of the state of the green LEDs could you describe for a logical idiot (the pic? :D ) the states and timings?

Dave

jesolins
Dec 20, 2007, 08:02 AM
Dave,
For the red LED, if it makes no sound and/or no repeater LED after two minutes,(even though it still would be blinking) that would be OK as it would hopefully be well in the air by that time. For the green LEDs, if they sounded a buzzer tone for the first 2 seconds that the lights were on solid, then stopped sounding until the next green light function, either off or blinking that would be good. When the green lights blink at about a 1 per second rate, that indicates low battery, so it would be good if that buzzer tone kept going until it landed (can the tones be changed with the pic too? Maybe a faster rate of beeps/tones?
Thanks,
Jim
Jim,
You said
"After the initial TI cal, I don't care how the light blinks."

Does it blink after calibration?
If it does not blink after calibration there will be no input to the pic and therefore no output.
If it does blink after calibration is there any change in the manner of blinking that could be detected to shut down the sounder and the LED and terminate this section of the programme?

Assuming that this is achievable and that you want some indication of the state of the green LEDs could you describe for a logical idiot (the pic? :D ) the states and timings?

Dave

orraman
Dec 20, 2007, 01:21 PM
Jim,
Rereading your posts, particularly #7.

Breadboard as before, programme now running =

Red LED flashing 1 or 2 times per second as per your controller.
The picaxe monitors the red LED without output.
When the picaxe sees no flash for (1.5?) seconds (calibrate time?) it switches an output ~ LED, sounder? ~ ON for (2?) seconds then OFF, after which it ignores the red LED.

Would this be a reasonable start?

Tones are no problem for the Picaxe, it even contains 4 tunes which I have played through a piezo disk but amplification would be essential and even then output is likely to be low for a given weight.
The sounders have their own internal drivers and you might be better to use two sounders with different frequencies to better effect.

Dave

jesolins
Dec 20, 2007, 03:06 PM
Dave,
What you described would be good. It is recommended to hold the TI cal switch for 3 seconds, so maybe that would be a better time before a tone is generated. The db level does not have to be incredibly loud for this as the old ear is only a foot and a half away from the DF.
Thanks!
Jim

orraman
Dec 20, 2007, 05:23 PM
Jim,
Three seconds for calibration would give more leeway in detecting the no pulse condition.
Is it reasonable to deal with the green LEDs after we have finished with the red?
Are you are expecting both of the green LEDs to be on solid after calibration and do you want a sound for each to confirm this or would a single sound suffice?
At low battery do they blink in unison?
Would a sound each time they blink after low battery suffice?
Tones and volume are will be compromise of your preference of weight, function and programming space, Murphy permitting.
Dave

jesolins
Dec 20, 2007, 06:28 PM
Dave,
Comments embedded.Jim,
Three seconds for calibration would give more leeway in detecting the no pulse condition. Great!
Is it reasonable to deal with the green LEDs after we have finished with the red? Sure!
Are you are expecting both of the green LEDs to be on solid after calibration and do you want a sound for each to confirm this or would a single sound suffice? Yes, both should remain solid after calibration. During cal none, one or both will be on depending on the weather and IR difference between sky and ground.
At low battery do they blink in unison? Yes they do.
Would a sound each time they blink after low battery suffice? Yes.
Tones and volume are will be compromise of your preference of weight, function and programming space, Murphy permitting.
Dave
Thanks Dave,
Jim

orraman
Dec 21, 2007, 05:39 PM
Jim,

Breadboard, the picaxe that is trying to mimic your controller now has a potentiometer that I use to select the state of the green LEDs before each trial run.
Green LED states = 1off and 2off ~ 1on and 2off ~ 1on and 2on ~ 1off and 2on. The selected state is applied automatically after "calibration".

As before red flashes from 1 to 2 per second are monitored by the "working" picaxe which waits for loss of pulses during "calibration".
Red LED is manually switched OFF for 3 seconds to mimic "calibration".
Detected by working picaxe which flashes for 1 second.

Selected green LEDs on continuously.
At present I have the working picaxe wait 4 seconds before reading the green LEDs and flashing a related code.

I had problems with signal levels (unreliable detection) when taking the signals from the junction of the current limiting resistors and the LEDs.
Now taking direct from the output of the pic chip with good results but there are no interference sources nearby.

I know that the green LEDs flash about once per second as a low battery warning but do not know the exact sequence that they go through beforehand.

Dave

jesolins
Dec 21, 2007, 10:35 PM
Dave,
The geen LEDs are both solid on before the low battery blinking starts. Would there be an option to play a tone with a buzzer when the red LED is off?
Thanks,
JimJim,

Breadboard, the picaxe that is trying to mimic your controller now has a potentiometer that I use to select the state of the green LEDs before each trial run.
Green LED states = 1off and 2off ~ 1on and 2off ~ 1on and 2on ~ 1off and 2on. The selected state is applied automatically after "calibration".

As before red flashes from 1 to 2 per second are monitored by the "working" picaxe which waits for loss of pulses during "calibration".
Red LED is manually switched OFF for 3 seconds to mimic "calibration".
Detected by working picaxe which flashes for 1 second.

Selected green LEDs on continuously.
At present I have the working picaxe wait 4 seconds before reading the green LEDs and flashing a related code.

I had problems with signal levels (unreliable detection) when taking the signals from the junction of the current limiting resistors and the LEDs.
Now taking direct from the output of the pic chip with good results but there are no interference sources nearby.

I know that the green LEDs flash about once per second as a low battery warning but do not know the exact sequence that they go through beforehand.

Dave

orraman
Dec 22, 2007, 07:49 AM
Jim,
Green LEDs.

From post #15 after calibration either one, or both, or neither will be lit.
From your last post "both solid on before the low battery blinking starts.
I don't know how or when the changes occur. What happens if neither is lit?

I had expected that the state of the LEDs would remain stable after calibration until low battery.
Without knowing every possible sequence of the LEDs I am unable to detect them.
Once the expected state has been detected by the picaxe it can output it's programmed response.

In the present programme the 08M monitors the LEDs on three input pins and has two other pins for output.

Initially it only 'looks' only at the +5v pulses that come in when the red LED flashes.
When these pulses are interrupted for three seconds by 'calibration' it places a 5V 'signal' on both output pins.
This 'signal' could be different on each output. I am using a normal LED for convenience.
It could be a steady +5v DC that could drive a bright LED and a fixed tone sounder.
It could be a 5v square wave at any possible audio frequency for tone generation.
After this the red LED is ignored and there is a 4 second pause.

The 5v inputs from the green LEDs are individually detected and placed in variables.
Depending on which combination of LEDs are lit an identifying sequence of flashes is output to the LED.

Up to this point is this an accurate representation of what your controller puts out?

Perhaps you would care to visit the Picaxe Forum, at the centre of the headings is a button for Manuals.
They are a grand introduction to micros but No2 Basic Commands has Play, Sound and Tune which plays your notes and flashes a LED.

http://www.picaxeforum.co.uk/

Dave

jesolins
Dec 22, 2007, 10:14 AM
Dave,
The state of the green LEDs before the calibration is either one on (either one), both on, or none on (depends on the quality of the difference sensed between the ground and sky). After cal they are both on steady until the battery low is indicated by the red and green LEDs blinking in unison at about one blink every 2.5 seconds (just remeasured). Prior to this the red LED binks once every 1.5 seconds (just remeasured). So it actually slows down a bit when all the LEDs start blinking in unison indicating when the battery is low. Your representation sounds great to me! Thanks for your time in this. It will be fun to test it out. I will go to the link you provided to get more info on this.
To recap, the ideal outcome would be: (a.) an indication (repeater LED and or tone) of the state of the green LEDs, (none on, one on, both on). (b.) an indication that the red LED is off or on steady for three seconds or more. (edit: I just dicovered that the red light will stay on or off depending on whether it was on or off when you press the arming switch to calibrate TI) (repeater LED and or tone tells me it is calibrating) (c.) an indication when the green and red LEDs are blinking in unison for low battery warning (loud tone(s))
Cheers and thanks much!
Jim
Jim,
Green LEDs.

From post #15 after calibration either one, or both, or neither will be lit.
From your last post "both solid on before the low battery blinking starts.
I don't know how or when the changes occur. What happens if neither is lit?
I had expected that the state of the LEDs would remain stable after calibration until low battery.
Without knowing every possible sequence of the LEDs I am unable to detect them.
Once the expected state has been detected by the picaxe it can output it's programmed response.

In the present programme the 08M monitors the LEDs on three input pins and has two other pins for output.

Initially it only 'looks' only at the +5v pulses that come in when the red LED flashes.
When these pulses are interrupted for three seconds by 'calibration' it places a 5V 'signal' on both output pins.
This 'signal' could be different on each output. I am using a normal LED for convenience.
It could be a steady +5v DC that could drive a bright LED and a fixed tone sounder.
It could be a 5v square wave at any possible audio frequency for tone generation.
After this the red LED is ignored and there is a 4 second pause.

The 5v inputs from the green LEDs are individually detected and placed in variables.
Depending on which combination of LEDs are lit an identifying sequence of flashes is output to the LED.

Up to this point is this an accurate representation of what your controller puts out?

Perhaps you would care to visit the Picaxe Forum, at the centre of the headings is a button for Manuals.
They are a grand introduction to micros but No2 Basic Commands has Play, Sound and Tune which plays your notes and flashes a LED.

http://www.picaxeforum.co.uk/

Dave

orraman
Dec 22, 2007, 01:49 PM
Jim,

From post #29
Is it reasonable to deal with the green LEDs after we have finished with the red? Sure!

Your recent post indicates that the green LEDs are only active and working up until the calculate switch is pressed when they both become solid.

The present programme (as per #29) ignores the green LEDs and starts by testing the red LED for no pulse condition that indicates the calibration switch has been pressed.
It does this by polling the port in a tight loop and counting the number of loops where there is no signal and in doing this it can do nothing else at the same time.

One way around this would be if it were possible to get a signal (high or low) from either side of the calibration switch when it should be possible to get a 'snapshot' of the green LEDs then signal that the switch had been operated and then signal the state of the green LEDs.

Another possibility would be a small picaxe for each set of LEDs one to continuously report on the state of the greens, the other to test the red.

Dave

orraman
Dec 22, 2007, 03:49 PM
Will try Peeking the port.

Dave

orraman
Dec 26, 2007, 04:23 AM
Jim,
New system.

Tested against physical LEDs reproducing the output of the Draganflyer as described.

At switch on the green LEDs are continuously recorded and the red LED tested without output.
When the calibration switch is pressed the state of the green LEDs is output with an identifiable code at low volume.
Low battery is detected as flashing LEDs and a high volume signal is output in time with the LEDs.

Size
1.1 x 0.6 x0.6 inches
Weight
3.5 gms
Smaller and lighter if surface mount.
Cost
Components £3

Dave

jesolins
Dec 27, 2007, 09:22 PM
Sounds good Dave...any more details?
Thanks,
Jim

orraman
Dec 28, 2007, 07:39 AM
Jim,

A solderless breadboard, on the left,
Draganflyer emulator =
Picaxe 08M = pic12F683 with interpreter
3 LEDs with resistors for output
Potentiometer to select 0 to 2 green LEDs
Red flashing once per second.
2 resistors = required for picaxe download

Overhanging the right edge my Sideboard (c) (0.8 x 0.4 inches)
=Picaxe with download resistors and sockets.
LED to simulate output, pins 7 and 3 = (GPIO 0 and 4)

Emulator green pins direct to pins 6 and 5 = (GPIO 1 and 2) red pin to pin 4 = (GPIO 3)

Programme
LEDs are sampled and stored in a variable which is tested till the red LED stops flashing simulating con
The last state of the green LEDs is output and repeated 3 times =
Single long signal for 1 LED, double short for 2, multiple short for no LED

The red LED is monitored for when it starts flashing at low battery which is signalled in sympathy.

Extreme right is 9 pin serial download socket, 3 wires going direct to Picaxe, all that is required.

Earlier dimensions were for a similar hybrid SM / Through Hole stripboard camera switch .

The photo? you want neat? Google orraman mcdonald

Dave
The Orraman