8)
8)Now thats interesting,
Now thats interesting,
and all this time I thought you were just a follower ;)
Tinsel, Crystal radio ? I guess FM Band ? Nice setup, does it have the jumper for the LED or radio selection ?Yes, crystal receiver. No, not FM, just ordinary AM standard broadcast band. I do have a couple of designs for FM broadcast crystal sets but they are something else entirely, requiring careful construction because of the high frequencies.
More power in the transmission perhaps, but harder to deal with using "garage technology" because of the high frequencies. Also more subject to line-of-sight transmission paths. You don't get much "skip" at FM broadcast frequencies, but sometimes you can pick up strong AM standard broadcast stations for thousands of miles.
If I had a better function generator I would go for a mHz radio because there is more power there I think, some of the mHz stations just south of here are a lot higher power than the one AM station just north of here, when i say just north it's 30 klm and south is about the same or a bit more.
Can you explain the arrangement for me please, it is relevant due to being an emergency source of light and radio messages of a safety nature.Sure, I didn't mean to hijack your thread, but as you say it's relevant, and illustrates several important principles, like sympathetic resonance and the use of natural materials, and of course the "variometer coil" tuning trick. This is kind of a single-coil that allows one to flip over half of it without disconnecting. I think a properly built one could smoothly transition between fully "bifilar" behaviour (very small inductance) to full monfilar multilayer air-core behaviour with relatively large inductance. This one goes from about 100 uH to about 160 uH ( or at least it did before I took a few turns off for tuning to 1200 kHz. A little lower figures now.)
All low voltage sources of power around that we can use will apply to these circuits, thanks for posting. Safety is always relevant.
Cheers
Wow does SMD stand for "Super Minute Devices" or "surface mount devices", these things look like fleas stuck to a piece of tape.
I'll need to sharpen my soldering iron point, find some tweezers and solder some pins on one of each part to prototype with. Or maybe I can make some tiny adapters with little bits of circuit board. I've got PCB making gear to make a simple tiny board.
My oh my so tiny. :) Will make a compact circuit though.
..
I've got BAT54C's on the way, in the bag with the mosfets. I think they are the correct one for that bootstrapping. The BAT54S's would be handy as well for protecting the logic gate output of a "drain feedback setup" maybe.Great. I am glad you are having fun with the project.
It does seem to be remarkably efficient already and it's on the solderless board with wire everywhere, on a 1 inch square PCB it should be spot on. If it will fit with the output connector and the AAA won't fit on 1 x 1 inch either, oh well. It's capable of a reasonable output with 1.3 volts input and more on time.
..
The dirty trick that you might wish to try is to use a pair of Schottky diodes and a 0.1uF capacitor to form a bootstrap supply for your logic gate. The Schottky cathodes would be common to your logic gate Vcc. One anode goes to your battery, the other your output. The capacitor goes from the cathodes / IC Vcc to ground. You will have to be careful about exceeding the IC maximum voltage. An LM4040 has a pretty small minimum current and would work to regulate the output.
Would it be possible to use one of those LM404's to turn off the oscillator when the desired voltage is reached ? Connect the cathode to the output and the anode to a logic gate input ? Maybe with an additional resistor or two.Yes, you can use it to kill the oscillations instead of just loading the source.
..
It takes a little time to turn the Arduino output on and off, so at very short intervals the actual pulse you get is longer than the "delayMicroseconds" would imply. This is why you need to check with a scope and fine-tune to your exact requirements by "fudging" the dwell and gap values until your actual output is what you want.This assembly code can be called using the following prototype with values from 1 to 256 (pass in 0) and will generate a delay of 8N ticks including the basic call and return overhead. If you need a very specific absolute and short delay of M clocks, then you can insert in-line assembly of RJMPs and NOPs. RJMPs take two clocks and NOPs one clock. Or you can code RJMPs in C:
For example, here's what you get with gap = dwell = 2 "microseconds".
Tinsel doesn't the Arduino software have a "pwm wizard" to calculate and produce the required code for specific frequency and dutyNo, the Arduino handles PWM differently, I think. It produces either the "fast PWM" at 62.5 kHz or "phase correct PWM" at 31.25 kHz and provides 256 levels of duty cycle from 0 to 100 percent at those frequencies, on all 6 of the PWM-enabled pins. "analogWrite(pin, value);" is all that's needed to set the PWM output in code. The actual PWM frequency can be "hacked" by more complex coding to produce other frequencies but this is waay beyond where I'm at.
cycle for pwm capable outputs ?
Seems like one advantage of the picaxe is that it can run from 5.5 volts down to 3 volts. And pwm outputs only require that two fields be entered into the pwm wizard, the frequency and the duty, it then gives the code to paste into the program.
The pwm output never exactly matches what we want unless all the timings add up neatly. That is the one thing, but it does get very close.
..
This assembly code can be called using the following prototype with values from 1 to 256 (pass in 0) and will generate a delay of 8N ticks including the basic call and return overhead. If you need a very specific absolute and short delay of M clocks, then you can insert in-line assembly of RJMPs and NOPs. RJMPs take two clocks and NOPs one clock. Or you can code RJMPs in C:
goto mylabel01 ;
mylabel01:
goto mylabel02 ;
mylabel02:
...
goto mylabelx ;
mylabelx:
The overhead may be higher in Arduino land. It takes a grand total of 12 bytes instruction memory.
void delay8NTicks( unsigned char n ) ;
//----------------------------------------------------------------------------------------------------------------------------------
// delay8NTicks
//
.nocc_start
_delay8NTicksLoop:
rjmp _delay8NTicks01 ;
_delay8NTicks01:
rjmp _delay8NTicks ;
_delay8NTicks::
dec R16 ;
tst R16 ;
brne _delay8NTicksLoop ;
ret ;
.nocc_end
Thanks... but that's a bit over my pay grade, I'm afraid. Stirs up some deeply buried memories of long nights, cold pizza and warm Pepsi, coding nightmares better left buried and forgotten. I'll stick to my freshman Fortran-style flow that I can translate into pseudo-c++ for the Arduino IDE, and leave the Real Programming to the Real Programmers!The Arduino language supports the Goto statement. You should try something like:
;)
OK, that I can understand. Here's the code fully "arduinoized" and tested, runs a nice square pulse with minimal jitter at 104.8 kHz.I am glad that it helps. I have yet to dig into how Arduino code compiles. I was hoping that the compiler would be smart enough to reduce the goto's to the next line into RJMP +0 assembly instructions. It looks like the compiler is inserting overhead of more than 30 instructions.
//------------------------------------------
//----MarkE's Pulser Code
//----gives 104.8 kHz
//------------------------------------------
void setup(){
pinMode(6,OUTPUT);
}
void loop() {
delay00:
digitalWrite( 6, HIGH ) ;
goto delay01 ;
delay01:
goto delay02 ;
delay02:
digitalWrite( 6, LOW ) ;
goto delay05 ;
delay05:
goto delay00 ;
}
//-----------------------------------------
Thanks !
(ETA: This appears to be the fastest with this method, even if I only use a single goto:delay pair for HIGH and LOW, it still runs at 104.8 kHz.)
(ETA2: Atmel 328P)
I am glad that it helps. I have yet to dig into how Arduino code compiles. I was hoping that the compiler would be smart enough to reduce the goto's to the next line into RJMP +0 assembly instructions. It looks like the compiler is inserting overhead of more than 30 instructions.I can't see any big change in frequency when I use 4 or 6 pairs of goto:label statements, and since the main loop with just the write instructions is actually slower than the goto loop, I think that the extra overhead is mostly in the write statements. I might do some additive tests to see how many goto pairs I have to put in before the frequency changes much.
Here's a higher resolution shot of the wave form, just need to work out how to make it display more info.