-
Added pushbutton, new case
01/02/2015 at 06:52 • 0 commentsThe previous case sucked, never stayed together properly. The new case is great, a single piece except for the lid, which snaps on with the power of magnets. I've also added a push button to calibrate the red light distance because I was making one for my dad and it's a bit much to expect him to reflash the firmware if he wants the trip distance changed. The setting will be saved in EEPROM, so will last through battery changes.
-
Alternative printed case
07/25/2014 at 13:51 • 0 commentsI've added an alternative case design, which lays out the battery holder and the boards side by side rather than stacked. It makes for a wider but thinner case. The battery is held on a slide out compartment.
-
Power savings success
07/19/2014 at 05:23 • 0 commentsJust got the latest revision from the fab. Using a low side MOSFET switch does indeed turn the power usage down to unmeasurable levels. There are a few considerations.
You must disconnect the trigger pin by setting it to an input (and setting it back to an output when turning the sensor on) or else it will find GND through that pin and consume power.
Also, the sensor doesn't like being connected to VCC first without getting GND. Several of the available datasheets warn against doing this, with unspecified consequences. Well, one consequence is that the echo pin stays high through the first ping after wakeup, resulting in a short read. I've found a sequence of wakeup, short delay (20 ms), and a sacrificial ping resets the sensor to a working state.
The board has been tightened up some for v1.3, but the enclosure remains the same external size as the length is dictated more by the battery dimensions.
There is also now a trace from VIN to an analog pin, to track battery voltage. It will report out the current battery state when in the parked state every minute by flashing red for the number of integer volts, and green for the first decimal place. When voltage drops to less than 2, it will stop working and flash red three times every few seconds, reminding you to change the battery until it dies.
-
Added MOSFET
07/01/2014 at 14:23 • 0 commentsUpdated board layout with a pull up resistor and a low side switch to power down the sensor. Hoping the external pull up will reduce the timeouts and checksum errors I still get occasionally. Waiting on PCBs now to test what I hope will be the final revision.
Also made the layout a little denser, to reduce board size.
-
Not enough power
06/26/2014 at 18:41 • 0 commentsDriving the HC-SR04 from a digital pin doesn't work. From a thread on avrfreaks, it appears it can draw up to 100 mA peak power, which is more than a digital pin can provide. Soldering a large cap across the VCC and GND pins lets it work when powered continuously, but causes it to return nonsense values when trying to turn it on and off. Need to put in a transistor as a switch.
-
Too much power
06/14/2014 at 02:07 • 0 commentsTurns out the whole circuit draws 11 mA from the batteries when the ultrasonic sensor is plugged in, even when idle. I have respun the board to power the sensor through a pin instead of directly from VCC, so I can shut it off when not ranging.