Animated preview

Animated preview (click!)

More work on the Fried Circuits OLED backpack! These latest firmware improvements add the following:

  • Multiscreen support: you can now use the button on the OLED backpack to cycle between 6 screens that give you various readings.
  • Energy measurement: the OLED backpack now measures energy and charge in Wh and Ah.
  • Interrupt-based reading: use a timer & interrupts to measure voltage & current at a fixed interval

Multiscreen support

Below are screenshots of the new multiscreen feature: you can use the button to cycle between six screens.

Scope view

Scope view

Scope view

Similar to the unique screen in previous versions of the firmware, you get a scope-like (with autoscale from 200mA to 5A) display of current measurement.

Energy reading

Energy reading

Energy reading

This screen displays the following readings:
– Energy that went through the tester since power up in Wh
– Charge that went through the tester since power up in mAh – useful for battery charging
– Peak power that went through the tester since power up, and voltage & current readings at that point

Peak and Min values

Peak and Min

Peak and Min

This screen displays the peak current and minimum voltages measured since power up. Along with peak current and min voltage, the corresponding voltage & current readings at that point are recorded

“Big” Watts, milliamps and volts

IMG_20130908_115424

IMG_20130908_115217

IMG_20130908_115208
Big readings

Those three screens simply display those three readings in a larger font, actually very useful when the backpack is used for quick monitoring, as those fonts are very readable.

Interrupt-based reading

This is a technical but nice improvement on the firmware: rather that simply loop screen refreshes and current/voltage reading, this new firmware uses an AVR timer to read current and voltage at a fixed interval, 100ms by default. The main benefit is that it makes it possible to compute energy & charge readings since we have a fixed time base.

I did a few measurements of the accuracy of those readings: it is just as good as most charge meters out there, if not better: both current and voltage measurements are within 1% of my Fluke 289 readings around 500mA. Both the “Watt’s Up” and the “Powerlog” RC energy monitors I have in my toolbox give me less accurate readings.

If you look at the code, you will notice that I toggle PD5 at the start and end of each measurement, to check on a scope the length of this interrupt routine. Not a major concern since we only interrupt every 100ms. In practice, the interrupt barely takes 2ms, we are are completely fine:

OLED Backpack measurement timing

Conclusion

With this latest firmware update, which you can get on Github, the OLED backpack is now becoming a fairly complete tool. Since it is entirely written using the Arduino IDE, it is also very easy to modify and extend if you want to create other screens – if you do, please share!

12 comments on “Fried Circuits tester: multiscreen and energy measurement

  • Pingback: FriedCircuits Docs

  • February 4, 2014 at 06:46
    Permalink

    Hi Ed,

    Love the tester but found a bug. Sometimes when one connects the display and MCU to the base tester board, it pulls D- up from 2.0V to ~3.3V. Removing it allows D- to return to normal.

    Any ideas what may be the culprit?

    Thanks,

    -Nathan

    Reply
    • February 4, 2014 at 06:49
      Permalink

      Interesting: do you know what version of the firmware you are running? And what is the version of the OLED backpack – 32 pixel or 64 pixel screen – The latest firmware version might have compatibility issues with the v1.0 backpack, I need to double check…

      Reply
    • February 4, 2014 at 06:57
      Permalink

      That is strange, especially since everything is running at 5V.

      Are devices connected through the base still recognized by a host?

      Maybe you can take a picture of your setup and email us. support friedcircuits us

      Reply
  • February 5, 2014 at 22:13
    Permalink

    be nice to incorporate I2C & Serial (right now I go through USB converters)

    Reply
    • February 5, 2014 at 22:17
      Permalink

      Good point! Actually, the OLED backpack breaks out some of the AVR IO pins at the bottom, so you might be able to do just that. Bitbanged serial should be quite feasible, not 100% about I2C. RAM might be an issue, the screen framebuffer takes its toll…

      Reply
    • February 6, 2014 at 02:00
      Permalink

      Actually serial is broken out above the button. Its labeled TX\RX. This is different than the USB serial output.

      I2C is more difficult to access. Its used by the current IC. But you make be able to tap it at the pull up resistors.

      I will keep it in mind for future revisions.

      Reply
  • June 29, 2014 at 14:03
    Permalink

    Hi, Very nice update – thank you :-)

    Sorry for a simple question but I’m getting a compile error with Arduino 1.05/Leonardo and the Adafruit_SSD1306.h library:

    arduino-1.0.5\libraries\Robot_Control\ArduinoRobot.cpp:22: error: ‘BUZZ’ was not declared in this scope

    etc….

    Any clues as to what simple error I’m making?

    Thanks.

    Reply
  • June 29, 2014 at 23:28
    Permalink

    Ah-ha, fixed this – seems that 1.05 has some naming clash with one of the Robot and Adafruit Libraries and removing the Robot Library solved the problem :-) Hope this helps.

    Reply
    • June 29, 2014 at 23:37
      Permalink

      Actually – an easier fix is to use Arduino 1.03.

      Reply
  • June 29, 2014 at 23:37
    Permalink

    I have the latest firmware dated 2013.04.11 running on the USB Tester OLED V1.3 (128×32) but the display is not right – it’s readable-ish but looks like both half of the screens are being written to the top half? Any clues to a fix? Cheers.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *