Michael 2727
Senior Member
IR Capture project/software
I found this - http://www.compendiumarcana.com/irwidget/
Wonder if it's picaxable
I found this - http://www.compendiumarcana.com/irwidget/
Wonder if it's picaxable
I made this and the output looks the best I have achieved so far. Alas, the camera ignores it.Well, I've had another go.
You can adjust the IR LED current by varying the 100 ohm resistor. You could probably up the base resistor value without problem. And you could change the BJT to a 2N7000 mosfet, as Michael2727 suggests, too.
The base resistor and the 1N4148 diode provide AND logic.
Edit: You could probably drop the 100 ohm altogether by using a larger resistor on the base of the transistor. I know from experience that 100k on the base of a BC548 will limit the collector current to around 20mA or thereabouts. I'm not sure what 47k might limit it to, but you could have a play.
Another unknown is how a large base resistor might affect the PWM waveform that comes through to the transistor. The large resistor and any internal transistor capacitance might create an unacceptable delay, and kill the PWM signal.
I will try to post the program.tt92.
When I built my Nikon circuit, it worked at short range.
Therefore, I can now "Amplify" the current, when I pinch one of the circuits offered.
However, your problem appears to be code.
More questions.
1. Can you post the program you are using?
2. Can you borrow, or gain access to, a "real" storage oscilloscope.
Then do accurate measurement and comparison of the two wave-forms.
e
'G4pulsetest
'with PWM
'14-9-08 19:00
'Send a series of pulses to an infrared LED
symbol outpin = 4
symbol ledpin = 1
symbol startlength = 360 'was 240
symbol onelength = 180 'was 120
symbol zerolength = 90 'was 60
symbol silence = 60 'Inter-bit pause
output outpin
'========================================
low outpin 'set start status of outpin
pwmout 2,25,0
'=======================================
'delay in here. Red LED for three seconds
'for fiddling time
high ledpin
pause 2000
'==========================
pwmout 2,25,53
pause 1000
'==========================
'___________________________________________
low ledpin
main:
for b2 = 1 to 5
pulsout outpin,startlength
'538D F807 0101 0011 1000 1101 1111 1000 0000 0111
pulsout outpin,zerolength
pulsout outpin,onelength
pulsout outpin,zerolength
pulsout outpin,onelength
pulsout outpin,zerolength
pulsout outpin,zerolength
pulsout outpin,onelength
pulsout outpin,onelength
pulsout outpin,onelength
pulsout outpin,zerolength
pulsout outpin,zerolength
pulsout outpin,zerolength
pulsout outpin,onelength
pulsout outpin,onelength
pulsout outpin,zerolength
pulsout outpin,onelength
pulsout outpin,onelength
pulsout outpin,onelength
pulsout outpin,onelength
pulsout outpin,onelength
pulsout outpin,onelength
pulsout outpin,zerolength
pulsout outpin,zerolength
pulsout outpin,zerolength
pulsout outpin,zerolength
pulsout outpin,zerolength
pulsout outpin,zerolength
pulsout outpin,zerolength
pulsout outpin,zerolength
pulsout outpin,onelength
pulsout outpin,onelength
pulsout outpin,onelength
pause 100
'========================
next b2
'========================
'temporary endloop
endloop:
high ledpin
pause 100
low ledpin
pause 100
goto endloop
goto main
'Canon Camera Remote for Picaxe 18X
'Version 1
'Oct 2008
'Bytes used 214
'
'Output Connections
'Pin 4 must not be used
'Pin 3 = PWM to base of Darlington BCX38B via 1K
'Pin 1 = Connection to base of BCX38B via 1N4148
'diode pointing towards Pin 1
'IR LED connected between +V and BCX38B collector
'via a 100R resistor
'BCX38B emitter to 0V
'
'Timing Data all in 5us units
symbol header1 = 1770
symbol header2 = 780
symbol space = 105
symbol zero = 25
symbol one = 242
symbol footer1 = 7786
symbol footer2 = 1780
symbol footer3 = 350
symbol footer4 = 120
'
'Programme
init:
setfreq m8 'set Picaxe frequency to 8MHz
'
start:
pwmout 3,52,105 '38kHz for 8MHz clock speed
low 1 'IR LED off
pause 200 'arbitrary pause
'
pulse_stream:
pulsout 1,header1 'IR at 38KHz on for 9000us
pulsout 4,header2 'IR off for 4400us
pulsout 1,space
pulsout 4,zero '0
pulsout 1,space
pulsout 4,one '1
pulsout 1,space
pulsout 4,zero '0
pulsout 1,space
pulsout 4,one '1
pulsout 1,space
pulsout 4,zero '0
pulsout 1,space
pulsout 4,zero '0
pulsout 1,space
pulsout 4,one '1
pulsout 1,space
pulsout 4,one '1
pulsout 1,space
pulsout 4,one '1
pulsout 1,space
pulsout 4,zero '0
pulsout 1,space
pulsout 4,zero '0
pulsout 1,space
pulsout 4,zero '0
pulsout 1,space
pulsout 4,one '1
pulsout 1,space
pulsout 4,one '1
pulsout 1,space
pulsout 4,zero '0
pulsout 1,space
pulsout 4,one '1
pulsout 1,space
pulsout 4,one '1
pulsout 1,space
pulsout 4,one '1
pulsout 1,space
pulsout 4,one '1
pulsout 1,space
pulsout 4,one '1
pulsout 1,space
pulsout 4,one '1
pulsout 1,space
pulsout 4,zero '0
pulsout 1,space
pulsout 4,zero '0
pulsout 1,space
pulsout 4,zero '0
pulsout 1,space
pulsout 4,zero '0
pulsout 1,space
pulsout 4,zero '0
pulsout 1,space
pulsout 4,zero '0
pulsout 1,space
pulsout 4,zero '0
pulsout 1,space
pulsout 4,zero '0
pulsout 1,space
pulsout 4,one '1
pulsout 1,space
pulsout 4,one '1
pulsout 1,space
pulsout 4,one '1
pulsout 1,space
pulsout 4,footer1 'IR off for 40000us
pulsout 1,footer2 'IR on for 9000us
pulsout 4,footer3 'IR off for 2125us
pulsout 1,footer4 'IR off for 640us
pause 500 'arbitrary pause
end
Use at least 10R but not down to no resistor at all.If I don't use any resistor, the flash looks about as bright as the Canon remote looks, and the device works as well as it does with 100R but no better.
The Canon remote seems to have a sequence of flickering flashes and my little device has one flash with no discernable flickering. Sending the pulse sequence two or three times in a row seems to make no difference to the hit rate.
Curiouser and curiouser.