Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive
 
Contents[Show]

An example of a minimized menu system

Microprocessor based electronics often have jumpers or dip switches for settings. But on very small PCBs there is not enough place, see for instance my Yamaha battery dongle:

Menu system with only one button and one LED
Menu system with only one button and one LED


I have therefore developed a menu system that requires just one button and one LED. In the user manual below you can see how the menu works. The one button menu is also a cheap alternative to dip switches, especially 1.27mm pitch dip switches are expensive:

DIP switches with ultla low profile and half pitch
DIP switches with ultla low profile and half pitch

User manual for the Yamaha battery dongle and the Wattmeter 

Menu selection

There are 5 menus. Click the button for 2 seconds to select. The leds will now flash. Example: to select menu 2, click after the 2e flash, The selected menu will be executed now.

Menu 1-5

  1. Set the specified battery capacity in Ampere hour [Ah]. This is default set to 12Ah. See also “Set battery capacity”. To show the Ah value, see menu 2.
  2. Show the specified battery capacity in [Ah]. See also “Show values”.
  3. Set the fuel gauge temporarily to full.
  4. Set a new charge cutoff voltage. Enter this menu when the battery is fully charged. The battery voltage will be measured and stored automaticly. The default value is 43V.
  5. Show the charge cutoff voltage. See also “Show values”.

1 Set the specified battery capacity

We have to set the battery capacity manually before use. The default value is 12Ah. The allowed range is from 1.0Ah to 69.0 Ah.

  • The ledbar flashes fast.
  • Enter the tens 1*)
  • The ledbar flashes fast.
  • Enter units.
  • The ledbar flashes fast.
  • Enter the decimal. You can skip the decimal by doing nothing anymore.

1*) For a zero: click the button immediately after the ledbar flashes fast. For a number n from 1-9: click after n flashes.

Example 23Ah

  • The ledbar flashes fast.
  • Count 2 led flashes and then click.
  • The ledbar flashes fast.
  • Count 3 led flashes and then click.
  • The ledbar flashes fast.
  • Click the button immediately or do nothing anymore.

Example 20Ah

  • The ledbar flashes fast.
  • Count 2 led flashes and then click.
  • The ledbar flashes fast.
  • Click the button immediately for the zero.
  • The ledbar flashes fast.
  • Click the button immediately or do nothing anymore.

Example 1.2Ah:

  • The ledbar flashes fast.
  • Click the button immediately (since tens = 0)
  • The ledbar flashes fast.
  • Count 1 led flash and then click.
  • The ledbar flashes fast.
  • Count 2 led flashes and then click.

Example 300mAh = 0.3Ah

  • The ledbar flashes fast.
  • Click the button immediately (since tens = 0)
  • The ledbar flashes fast.
  • Click the button immediately (since tens = 0)
  • The ledbar flashes fast.
  • Count 3 led flashes and then click.

If the battery capacity is set too low, the fuel gauge will display 0% while the battery is still not empty. This is shown with a blinking red led.

Show values

This works in the same way as setting the specified battery capacity but with just showing flashing leds.

Example 45Ah

  • The ledbar flashes fast.
  • The led flashes 4x.
  • The ledbar flashes fast.
  • The led flashes 5x.
  • The ledbar flashes fast.
  • No flashes since there are no decimals
  • The ledbar flashes fast.

Example 4.6Ah

  • The ledbar flashes fast.
  • No flashes since there are no tens.
  • The ledbar flashes fast.
  • The led flashes 4x.
  • The ledbar flashes fast.
  • The led flashes 6x.

Do you have any comments about the website? Please let me know.