I hooked up the sensor for the first time, I measured the voltage to be 4.94 which should be pretty good ?
Still i got strange readings, all of them at 121 inches no matter how and what i put in front of the sensor.
I had a bit of fluctuation but it did not make any sense.
I tried analog with averaging (i know, not recommended)
I tried PWM with two variants of the median/mode filters.None of them made much sense, the PWM with median filter gave somewhat better results but far from usable.
I used the code from the thread where the Maxbotix guy helps out some people so it should be good.
These models (LV) are supposed to be factory calibrated right ?
There is not much background noise, except for a pretty silent laptop.
What was your source for the 5v ? If you used the Arduino’s regulated supply or the USB supply, you are probably having “brown outs”. The peak current demand, when the transducer is transmitting, is high. Other people have reported problems using the aforementioned sources. Try using a separate battery pack to run (only) the EZ1.
I see. I was using Arduinos’s 5V pin only, first with USB then with the regulated supply at 9V. I’ll try hooking up a separate power source and report back. Thanks for the reply!
What do you have for diodes hanging about ? A big fat beefy power diode would drop that 6v down to <5.5v (and a bit more under, under peak demand). Even if all you have are some 1N4001 types, 2 or 3 in parallel should work well enough for a trial. You’ll also find that under peak demand the internal resistance of the batteries will drop that 6v, moreso for standard alkalines than rechargable NiMh’s.
Assuming that your 9V power supply can deliver enough current, why not just add a 5V regulator to supply the sensor? The browning-out you’re seeing now is probably due to the regulator on the Arduino rather than the 9V supply. Also, adding a decent (hundreds of microfarads) capacitor on the 5V rail will help, since the sensor will draw power in short bursts.
Mee_n_Mac:
What do you have for diodes hanging about ? A big fat beefy power diode would drop that 6v down to <5.5v (and a bit more under, under peak demand). Even if all you have are some 1N4001 types, 2 or 3 in parallel should work well enough for a trial. You’ll also find that under peak demand the internal resistance of the batteries will drop that 6v, moreso for standard alkalines than rechargable NiMh’s.
I only have the diode that came with the Sparkfun Inventors Kit. (i havent even checked it out yet)
And a 104k capacitor that i desoldered from some device.
I do however have a bunch of old decomissioned PC motherboards, there would probably be something i could use there that i could desolder
MichaelN:
Assuming that your 9V power supply can deliver enough current, why not just add a 5V regulator to supply the sensor? The browning-out you’re seeing now is probably due to the regulator on the Arduino rather than the 9V supply. Also, adding a decent (hundreds of microfarads) capacitor on the 5V rail will help, since the sensor will draw power in short bursts.
I dont have any regulators, except maybe for some on some old PC motherboards. I would need some brand logos/markings to look for then i could desolder them.
ok hold on a sec, i got some pictures, just have to crop them.
i did google diodes, i came up with a bunch of stuff that looked like transistors actually, and some of the things i am about to post. stay tuned another 10-20 mins if you can:)
'(btw this is an AM2 socket mainboard that is dead fro some reason. too bad since i have a functioning CPU for it. not even my specialzied POST analysis tools gets any info out of this. just powers up the usual way, then doesnt post. if anyone wants parts or somthing, let me know maybe we can trade some stuff ")
KirkHamster:
I only have the diode that came with the Sparkfun Inventors Kit. (i havent even checked it out yet)
And a 104k capacitor that i desoldered from some device.
I do however have a bunch of old decomissioned PC motherboards, there would probably be something i could use there that i could desolder. What should i look for ? What markings ?
The diodes that came with the SIK are supposed to be 1N4148's. Those are a bit "weak" for what I think is the peak current drawn by the EZ1, but in a pinch they might do. Afterall the goal right now it to figure out where the problem lies. If you find this fixes the problem, then you can go about making a more permanent solution. Parallel up the diodes (making sure they are oriented correctly) and put them inline. See what happens. The worst is that the diodes get hot and burn-up and we have to figure out another way to test the "brownout" hypothesis.
As for harvesting the MBs, I’m not sure what to tell you to look for. The surface mount (SMT) parts are tiny and it’ll be hard to find, and use, any diodes that might be present. There isn’t the equivalent of a RadioShack where you live ? If you have any old “wall wart” type power supplies, they might have some useful diodes in them.
From googling a bit. i cant really tell the difference between some resistors and diodes. also some caps showed up when i searched for diodes… / confused.
The top one there that has a forware voltage drop op 0.7V so if i get one of those, should be able to drop it to 5.3. (in which case i probably have to scale down my results in the code by a tiny percentage if the sensor only operates perfectly at exactly 5V)
Maybe not the top one, thats rated 5 AMPS.
Maybe any diode will work? It says them all reduces voltage by 0.7…
KirkHamster:
I dont have any regulators, except maybe for some on some old PC motherboards. I would need some brand logos/markings to look for then i could desolder them.
You could just buy one for <$1 from a shop like Radioshack…
I live in a pretty desolate place in norway, and pretty much the only by-post supplier here charges an arm and a leg for shipping… so i often prefer to order big to minimze shipping overhead, or to scavenge when i am in low-economy mode (like now!)
I found an old datasheet for the sensor that lists the peak current at only 100 mA. That’s less than the almost 1A I thought it might be. The result is that using even just one of the 1N4148 diodes included in the SIK should work fine and drop the voltage by about 0.7V (give or take). I also suspect that when everything is connected, you’ll find the supplied voltage at the sensor would have been less than the 6V open circuit voltage you measured. But adding a diode will ensure the voltage is < 5.5V.
Adding a big cap, say 100 uF, on the EZ1 side of the diode should also help. From what I can read, the sensor transmits 13 cycles of a 42kHz waveform. That’s when the most current is drawn. That should last only for about 0.3 mS.
Mee_n_Mac:
I found an old datasheet for the sensor that lists the peak current at only 100 mA. That’s less than the almost 1A I thought it might be. The result is that using even just one of the 1N4148 diodes included in the SIK should work fine and drop the voltage by about 0.7V (give or take). I also suspect that when everything is connected, you’ll find the supplied voltage at the sensor would have been less than the 6V open circuit voltage you measured. But adding a diode will ensure the voltage is < 5.5V.
Adding a big cap, say 100 uF, on the EZ1 side of the diode should also help. From what I can read, the sensor transmits 13 cycles of a 42kHz waveform. That’s when the most current is drawn. That should last only for about 0.3 mS.