I agree, you should only need to modify the values of the components. However, you might want to add an NPN transistor to the output. Connect a resistor between the signal (labeled "PULSE OUT" in your schematic) and the Base, connect the emitter to Gnd, and use the collector as the output (the pullup in the RCX/NXT will take care of the rest). Doing so would give the same result, pretty much no matter the load you're driving (sensor port etc.), so it would be much more predictable and repeatable.
I tried a 2.2uF cap and it only reached 4V, but a smoother discharge (not fully charged). Both have over 3V for about 5mS. I might try a few more value, but if this doesn't work (I need to work up an interface for the RCX), then I will need to use a one shot.
Actually, I think a transistor is necessary, otherwise the ADC pullup will charge the capacitor, and the voltage will ride at 5v.
For the RCX interface, take a look at some of these sensors. For polarity specific sensors, people usually use six diodes, and for voltage critical stuff, adding an OP Amp is a really good idea. This sensor is a really good example of a simple, yet effective setup, that should work well with the RCX (and the NXT).
I am going abit slow here, which is probably a good thing. I do not own a scope, and this is one of the few projects that I have needed one, so I am able to use my work scope for short checks. But it is slowing me down abit.
Assuming I will get the RCX/NXT interface done, I have been doing some thinking about my SW.
I agree on the Xstr addition. Been thinking I need to work on my charge/discharge time more though. I was going to try a R1 at 50 Ohms and R2 at 8 or 10K . Then I will add the Xstr and check output.
I am familiar with the "powered" sensor bridge and have spent some time on an IR sensor that is working well (now in Kickstarter!!);
https://sourceforge.net/apps/phpbb/mind ... f=2&t=1754
I am hoping to use this sensor as a passive (ie. touch sensor) instead of a powered sensor. So, after the pulse out xstr, I will have a 400Ohm (as measured on my old legacy touch switch) pull down. That should work, eh?
I still need to wire my 9V from my geiger kit to my RCX, and add in a 5V regulator for this circuit. But I was also thinking I could use an RCX output instead of a 5V reg, but the RCX outputs are at about 9V, right? SO, still not sure about the final interface. Will glance at the other sensors again, but looking at those before did not see any that get 5V from the RCX.
Wasn't easy, but great learning experience.
I took 9V into the charge/discharge circuit and used the RCX 5V on the output port across the output transistor as a touch switch.
From the 100us pulse I am able to get about a 5V 20ms pulse on the RCX side! The bad news is it actually looks like you need about a 15ms pulse as a "passive" touch sensor to ensure trigger on the RCX (maybe a good reason to use active "powered" sensors). I saw multiple hits at 10-15 ms that did NOT trigger. Now, I have stretched my pulse to get 100% geiger hits.
Pictures and circuit will be posted soon.
Now that you got it working, I just thought of a slightly more complicated, but potentially much neater design. What about feeding the pulses into something like a 4017 decade counter (with output Q4 tied to RST so that it has 4 states). The four outputs would each be tied to a resistor (each of different value), so that as it gets clocked by the Geiger, it simulates an RCX rotation sensor. In the SW, all you'd have to do is set the RCX sensor as a rotation sensor, and then you could read the "rotation count" to see how many pulses have been received.
Here are some pics for eye candy;
This is the breadboard set up, on the left is the Geiger Counter board built into a Lego chassis. The middle is the circuit. And the right side is the RCX (on the 9V supply).
Notice touch sensor on the right I used first to verify a quick touch sensor application, then replaced with blue wires to RCX port.
This is the screenshot of what the RCX input port sees. Most hits are over 20ms;
Here is the circuit;
Ok, so after more testing with a more detailed program (using Robolab) that includes a dual-timed readout (for last CPM and calculated CPM based on hits timer) on the RCX and a dual LED output off of one output port (to indicate immediate and previous CPM calculations) , I have found the RCX can actually loop around 20-28 times on each hit, which is impressive.
So, slowing down the pulse to >20ms may have been overkill. Nonetheless, I am still getting good pulse response and timing from this set-up.
This was just a good exercise on interfacing and data collection. I'm still tweaking my datalogging SW and display.
Users browsing this forum: No registered users and 4 guests