Monday, December 9, 2013

Inside stuff: 0-30V cheap panel voltmeter

This is just a reiteration of my post on http://www.eevblog.com/forum/. Since then some people have picked up the challenged and designed new firmware for the microcontroller. Let me explain.

The module is a cheap (2-3$) 0-30V voltmeter. It has a 3-digit output, is pretty accurate and begs curiosity with it's TXD/RXD soldermask labels.


The inside sports an STM800S3F3 chip with nice features:

  • 2.95-5.5V supply voltage
  • 16 Mhz internal oscillator
  • 3 timers
  • 4 CCP/PWM modules
  • 5-channel 10-bit ADC
  • UART, SPI, I2C
  • 8k Flash, 1k RAM
Thoughtfully, the programming/debug port is also broken out, just not labeled. The pinout would then be:


  SWIM / PD1 (HS)
  TX / AIN5(HS) / PD5
  RX / AIN6 (HS) / PD6
  NRST
  VDD
  VSS

The board also includes a 3V/30mA linear regulator that can take up to 30V. All-in-all a very cheap development board that can be used for a lot of stuff


Here's a close-up picture of the board under strong light so you can reference the double-sided PCB without taking the thing apart:


And if you want to dig into this deeper just have a look at http://smokedprojects.blogspot.ca/2013/08/i2c-led-display-from-hacked-voltmeter.html and http://hackaday.com/2013/08/25/turning-cheap-voltmeters-into-i2c-displays/.

The board in the article looks slightly different than mine, but I just bought the cheapest one I could find on ebay.

Saturday, December 7, 2013

Inside stuff - smoke/fire detector FireAngel ST-620

Update: if you came here looking for a fix to the annoying beep I might have one - if you are feeling handy: take the unit apart, desolder one wire from the battery terminal, discharge the capacitor (by touching the disconnected wire to the other wire) and solder it back on.
Take care not to short the battery, you only want to discharge the circuit with the battery disconnected.
If you do not understand perfectly what you need to do then please do not attempt this!
This has 'fixed' one of my units (since 6 months) and has quitened another one for ~2 months.

Back to the original post:
On of the my smoke detectors - installed by the landlord under legal obligation - started acting up by emitting annoying short beeps and random intervals, moreso during the night.

The producer boasts a 10-year service lifetime, smoke detection as well as heat detection.
Since they are the "non-user-serviceable" type nothing else remains than to take it apart and see what makes it tick. Spoiler: it's less complicated than you might think.


The housing comes apart by first prying the small plastic retainers on the underside edge. Apart from the VERY LOUD piezo, a CR123 battery and a "snooze" button there's not much too see. But all the interesting stuff is beneath the button so we need to take that plastic frame off.

Peeling off the sticker reveals some other 3 retaining clips which means the mainboard sitting under the button can be simply unscrewed off. You do not need to peel the sticker, it's enough to just screw the button assembly counter-clockwise.


Oh, the big plastic lever above is pressed in when the sensor is affixed to the ceiling mount. This in turn presses up the metal tongue below, breaking off a contact on the board and waking up the sensor.


Piezo sensor - part 1

I'm working on a small project in which I'm trying to find out if I can output a sound on a piezo while reading the force exerted on it. It's like a small piano where the input is also the output.

I did something similar with LEDs where I measured the light level by first reverse polarising the led and then measuring the discharge time (capacitance).

To have an idea with what levels I'm dealing some measurements were in order. Two sets of measurements were taken, one with the original molded plastic housing and one with the housing removed and two wires solder to the piezo. I'm using a normal buzzer, the cheapest I could find, so that I can buy several of them. Raw buzzers should be 10x cheaper than what I paid.


This is a light tap on the table while the sensor is sitting about 1m away pressed against the table. The housing was on. Around 1Nm of force from a lighter.



A stronger tap under the same conditions, around 5Nm.


The same stronger tap 15cm away from the sensor.



This strange waveform was measured while I was cracking the housing open with a plier. The peaks are over 40V.



With the sensor exposed I pressed lightly with the finger (first peak) then removed the finger and applied constant pressure.



With the piezo placed under a notebook (the paper one) I first very lightly tapped the notebook and then applied increasing pressure. The signals are much stronger, probably because the crystal and vibrations are better confined.



With the sensor held by wires in blew air lightly on it and then a bit stronger.

Findings

In trying to break the piezo out of the housing I bent it quite badly. I believe as long as the crystal is not badly damaged (in my case only the metal substrate was bent) the sensor will still work just fine.

The housing connected the buzzer via small springs. Soldering wires on the exposed piezo can be hard but doable as long as you only tack some solder and then the wire. Keeping temperature too long will likely cause the crystal to lift off the substrate.

The voltage response from the piezo is much higher when used without the (resonant?) housing. It is also much higher when confined within a space but I doubt it's ability to output sound with a 3.3-5V signal. Luckily, the sensor responds really well to taps in free air as well.

The force response is surprisingly accurate. You can detect slight vibrandos in the finger, air pressure changes possibly even heart pulse. Unfortunately it's DC-centered so it cannot be used for absolute measurements. However its AC response is really good and linear.

I can see a lot of applications for these kind of sensors in areas where they might be yet used:

  • wind/pressure changes
  • tap sensing
  • heartbeat monitor
  • traffic weight detection
  • MAF (mass air flow) sensors since the pressure is varying on each stroke
  • active vibration dampening systems (vehicle suspensions)
  • detecting noises and resonance for sound applications
I have an idea where they might be currently used:

  • window breaking detection
  • vehicle traffic counter
  • vibration sensor for alarms
I was using the 1Mohm input from the oscilloscope so a 5-20k input from a microcontroller might yield unmeasurable signals. Still, I will try to achieve some levels of input without any other active components. The clamping diodes on the microcontroller should handle the HV peaks just fine.