ECM-1240 counter questions

Working on a home project? Post it here.
Ira
Posts: 53
Joined: Sat Jul 10, 2010 11:06 am

Re: ECM-1240 counter questions

Post by Ira » Thu Jul 29, 2010 9:01 pm

Time for an update...

I've been playing around with the circuits Paul provided for the 74HC393N using a breadboard. Seems to work okay, although I burned up a couple of chips before I got things wired up right.

The 74LV393N flip-flop counter seems to be a new IC. The only place I could find that had them in stock was mouser.com. They should be delivered early next week. They also have the 4N35 optocoupler and 2N3904 transistor in stock.

My plan is to use a board called the "Schmartboard" for the final/permanent version of the device. It's kinda in between a real PCB and a solderless breadboard. Looks like it should work well for what I need.

I got current on all the Brultech software (until I saw there is now a V2.08 for the engine).

I hooked up the EtherPort and ECM I will be using for this project. This is my first time to use the EtherPort for communication, so it was a good exercise to set it up in a test environment (in my "computer room" instead of out in my shop) to make sure I could get it all set up and working. My other three ECM's communicate wirelessly to an EtherBee. The plan is to ultimately have four ECM's in my home communicating via the EtherBee and two ECM's in my shop communicating via the EtherPort.

Ira
Ira
Posts: 53
Joined: Sat Jul 10, 2010 11:06 am

Re: ECM-1240 counter questions

Post by Ira » Fri Jul 30, 2010 11:51 am

The 74LV393N IC's were (unexpectedly) delivered this morning. I used the breadboard to wire everything up according to Paul's diagram entitled "Pulse divider with isolator' (i.e., not using the batteries). I used a 10K ohm resistor on the lead between pin 14 on the 74LV393N and the ECM's AUX5 COM terminal. I used a 5Vdc wall wart with a momentary pushbutton switch in the positive lead to simulate the softener's flow meter. I used pin 3 on the 74LV393N as the "output" to get a "divide by two" outcome.

Everything worked great. I tried different pulse widths (keeping the pushbutton up or down for various intervals) and that worked fine. Using the "Virtual Channels" tab on the Engine screen, I could monitor the pulse counts going up as expected. I also used a "non-1" value in the "One pulse equals" field to simulate multiple pulses per gallon. That worked correctly.

The only things I saw that were wrong so far is the "Seconds since last packet" number and the AUX5 stats on the Tabular Data view. I will start another thread in the ECM-1240 Support subforum for these.

Next step is to work on the softener side. I have some splitters that should allow me to tap into the water softener's flow meter leads without having to cut/splice any wires. My plan is to first hook up just the pulse isolator part of the circuit to make sure that will work without any adverse affects on the softener.

Ira
Ira
Posts: 53
Joined: Sat Jul 10, 2010 11:06 am

Re: ECM-1240 counter questions

Post by Ira » Sat Jul 31, 2010 4:28 pm

Just wondering out loud...

If I want to have a visual indication on my circuit board that everything is working, i.e., put some LED's in various places in the circuits, can I put LED's in these places:

1. Between the ECM's common and ground (on my circuit board) to show that the ECM is providing power. It should be on if the ECM is powered up and connected to my circuit board.

2. Between the ECM's AUX5 terminal and ground to show pulses being "received". It would be in parallel between the ECM and 2N3904 transistor. It would be on or off depending on the state of the flip-flop counter, and would blink on/off while flow was present.

3. In parallel on the flow meter's signal and ground leads. It would blink whenever the flow meter is sending pulses.

If any or all of the above are possible, does it matter what LED I use? I assume it has to have the correct voltage requirement. The flow meter is 5Vdc. What is the AUX5 voltage? Will it provide enough current to handle two small LED's and the flip-flop counter IC?

When I was at Fry's, I was "intrigued" by the function generators. I've never used one, but I was wondering if I could use one to simulate the flow meter pulse. Anyone know if that can be done and if so, how would it be hooked up? The ones I was looking at are the B&K Precision 4001A and 4003A. There manuals are pretty useless, though. The confusing part to me was how to set it up to make it look like a "zero to 5Vdc pulse", if that makes any sense. I think it has something to do with the "offset", but I really couldn't even determine if I can do what I want to do.

Thanks,
Ira
paulb
Posts: 122
Joined: Fri Jun 04, 2010 11:11 am

Re: ECM-1240 counter questions

Post by paulb » Sat Jul 31, 2010 7:13 pm

You should not use the supply voltage from the ECM for anything other than the example circuit. This is not meant to power other devices.... we are slimply leaching some power for the divider circuit because it uses very little current. If you need to use an LED, you will have to do so on the softener side of the opto. You can probably simply put the LED in series with the opto... may need to reduce the resistor value though.


If you have a pulse generator you can certainly use it to test your circuit as long as the frequency drops down to a low value. If your multimeter has a frequency counter (Hz) on the AC scale, you can use this to test your circuit. You can measure the output frequency of the divider on the Hz scale and compare it to that of the pulse generator.

Paul
Ira
Posts: 53
Joined: Sat Jul 10, 2010 11:06 am

Re: ECM-1240 counter questions

Post by Ira » Tue Aug 03, 2010 3:44 pm

I got the pulse generator. It's revealing some strange results. I have the pulse generator set up to create a square wave with a frequency of 1Hz (one pulse per second) and a duty cycle of 85% (the voltage is high -- about 5Vdc 85% of the time and .25Vdc the rest of the time). I checked it out with my multimeter and it ageed. I also have a data acquisition device called a DataQ DS-194 with software that turns my laptop into an oscilliscope at low frequencies (less than 240Hz). After verifying the pulse generator with the multimeter, I hooked it up directly to the DS-194. The "oscilliscope" showed a square wave cycle that agreed with the above numbers.

Next, I hooked up the circuit Paul provided that contains an external power source and does not connect to the ECM's common terminal. That allowed me to test the entire circuit using the pulse generator and the oscilliscope software without involving the ECM or the softener flow generator. The external power source is a 5Vdc wall wart. I used the 74HC instead of the 74LV due to the higher voltage of the wall wart. This is probably the circuit I would ultimately like to use, including the 5Vdc wall wart. I also added a LED across the pulse generator leads so I could visually see the pulses. The results were the same with and without the LED.

So the results...with pin #3 on the 74HC393N as the output, I saw a "one for one" result on the oscilliscope. Every generator pulse resulted in one output pulse from the 2N3904 transistor. Same frequency, same duration. Pin #4 produced the most erratic output. Sometimes there wouldn't be any pulses for over a minute. When there were output pulses the frequency and duration were very random. Pins 5 & 6 were also erratic and random, but not as bad as pin 4.

I've attached a picture of the circuit. From the left side of the board going counterclockwise, the red lead clipped to the resistor is the positive lead from the pulse generator. The black lead conected to the brown wire is the negative lead from the generator. You can also see the LED between the red and black clips. In the bottom middle...the red lead connected to the yellow wire and the black lead connected to the white wire are from the 5Vdc wall wart. On the right side, the green and yellow leads go to the "oscilliscope". It's hard to see, but the green lead is connected to a gray wire which is connected to the right side of the transistor, which is also jumpered to the ground. The yellow clip is connected to the left side of the transistor. Component-wise, the only thing I was unable to find was a ceramic disc capacitor. I ended up using a multi--layer ceramic capacitor.

So...any ideas what I'm doing wrong?


Image
paulb
Posts: 122
Joined: Fri Jun 04, 2010 11:11 am

Re: ECM-1240 counter questions

Post by paulb » Tue Aug 03, 2010 4:09 pm

It appears that you have connected the LED accross the pulse generator output. An LED requires a current limiting resistor in series with it.

As it is the LED would be clamping the 5V pulse to approx 2V (whatever your LED's forward voltage is). This reduction in amplitude would likely prevent the LED internal to the opto from turning on.
Ira
Posts: 53
Joined: Sat Jul 10, 2010 11:06 am

Re: ECM-1240 counter questions

Post by Ira » Tue Aug 03, 2010 5:25 pm

Paul,

I removed the LED and tried it again. It didn't change anything that I could see. Pin 3 output is still one for one with the pulse generator. Pins 4, 5, and 6 are still random and erratic in both frequency and duty cycle, with pin 4 being the worst of the three. I can't see any "repetitiveness" on 4, 5, or 6 even though the generator's pulse frequency/cycle is very stable. Pin 3's waveform is stable and repetitive, but it's not dividing by two.

Also, I've tried this with three completely different "sets" of components (I bought plenty of each since they are so cheap). The only things I reused were the breadboard and jumper wires.

Thanks,
Ira
paulb
Posts: 122
Joined: Fri Jun 04, 2010 11:11 am

Re: ECM-1240 counter questions

Post by paulb » Tue Aug 03, 2010 6:49 pm

If you have a scope, look at pin #1 of your IC where the opto is coupling the pulse. There is a chance that you need to reduce the value of the 10K resistor to 1K to 4.7K. You should have V square wave at that point.

Also with the scope, check the supply for ripple.... fluctuating DC voltage.
Ira
Posts: 53
Joined: Sat Jul 10, 2010 11:06 am

Re: ECM-1240 counter questions

Post by Ira » Wed Aug 04, 2010 1:30 pm

Paul,

By "V square wave", do you mean a "triangle wave"?

Keep in mind that my "scope" is really a data acquisition device (max 240Hz) connected to an old laptop running some "special" software for the device. Not sure how accurate it is, but it seems pretty good. The waveforms I've seen seem to be pretty steady regarding voltage.

When you say "look at pin 1" with the scope, do you mean hook the positive lead from the scope to pin 1 and the negative lead to the same place that the wall wart is grounded? And do this with everything else still in place...right? Just move where the scope is picking up a signal?

I think I have both a 1K ohm and another 4.7K ohm resistor. I will try each one. Does the wattage or the tolerance of the resistors make any difference in this circuit?

Remember that I'm pretty much a novice at a lot of this stuff, so equipment and knowledge are limited.

Thanks,
Ira
Ira
Posts: 53
Joined: Sat Jul 10, 2010 11:06 am

Re: ECM-1240 counter questions

Post by Ira » Wed Aug 04, 2010 3:10 pm

I tried a 1K resistor and a 4.7K resistor in place of the 10K resistor. Didn't see any differences with either when scoping pins 3, 4, 5, or 6 except that with the 1K resistor, the low voltage side was a little "ripply" compared to the 4.7K and 10K resistors.

When I put the scope leads across pin 1 on the flip-flop counter and ground, I saw the opposite of what the pulse generator was outputing. Same frequency (1Hz), but the duty cycle was opposite. Instead of being high (5Vdc) 85% of the time, it was low (.5Vdc) 85% of the time. It was not a "V" wave, especially since it was low 85% of the time. The high was not an inverted "V". It had a noticeable "plateau" at the top of the wave.

Does the above tell you anything?

Thanks,
Ira
Post Reply