Menu building


Closed Thread
Results 1 to 10 of 10

Thread: Menu building

  1. #1
    Join Date
    Apr 2011
    Location
    Welches, Oregon
    Posts
    198

    Default Menu building

    I hope the new year finds everyone well.

    I'm looking for strategy rather than programming help and I hope experience or a clever approach can simplify what has turned into an arduous task. I am building a controller for my aquarium; the first was successful, but new skills motivate me to improve and, well... new features mean complexity.

    In a nutshell, I'm looking for an efficient menu system - a way to set ON and OFF times of lighting, set days of the week that dosing pumps dose, adjust temperature... such as that. On my previous attempt I used 2 methods: a 3 button matrix and a serial connection. The 3 buttons where quick - emergency or simple settings. The serial connection allowed for command line entry and entering multiple parameters when required. Both systems had their drawbacks - the buttons required shuffling through sub-menu after sub-menu; the serial required that I retrieve my laptop...

    I have begun a compromise using an old SONY remote; it works, but I'm not satisfied - buttons are not correctly labeled and shuffling values, strings, DATA and READ statements is tedious beyond endurance. I need to control about a half dozen devices and likely have 3 or 5 mixed WORD and BYTE values to manipulate per device [I.E. an RTC - 6 registers of time, alarms, day and date; 3 12V dosing pumps BYTE days of operation WORD start time WORD duration; 8 plug relay board...]

    I'd ask the group - do you know or have you used something better/ easier/ you'd recommend to a beginner? Perhaps I'm simply approaching this wrong and there are ways (using extended EEPROM, an encoder, or some other "trick or tool" to make this simpler) to minimize or organize my efforts? Maybe the ideal way is Wi-Fi or an Android module and my phone? I'm just finding my PicBasic legs and don't really want to start off in some unsupported direction based on a sales pitch.

    Any advice?

  2. #2
    Join Date
    Sep 2009
    Posts
    737


    Did you find this post helpful? Yes | No

    Default Re: Menu building

    I would use touch screen or bluetooth + App on phone. I don't have experience with WIFI, so...

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,795


    Did you find this post helpful? Yes | No

    Default Re: Menu building

    Maybe a Nextium LCD that works as an HMI?

    Ioannis

  4. #4
    Join Date
    Apr 2011
    Location
    Welches, Oregon
    Posts
    198


    Did you find this post helpful? Yes | No

    Default Re: Menu building

    I am leaning toward a Bluetooth module... as you suggest. I see here (in the forum) there are some discussed, but I know next to nothing for myself. If anyone has an example, a recommendation - or can point to one... or an alternative... I'd appreciate hearing about it.

    As always, thank you.

    Amoque

  5. #5
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,588


    Did you find this post helpful? Yes | No

    Default Re: Menu building

    Here's a challenging option:

    Use an old cell (or even your personal cell) that has android 4 or higher (I think you need that to interface).

    Pick an android BASIC of your choice, and use that as a remote., interfacing via bluetooth to your PIC.

    No need for displays or controllers, your cell acts as an all-in-one, except for the need for a IC that can receive bluetooth, or using a bluetooth interface chip.

    That's how I would do things today.

    Robert



    EDIT: Level 2 challenge:

    Interface via the interwebs so you can change stuff and monitor at will from anywhere.
    Last edited by Demon; - 4th January 2018 at 17:39.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  6. #6
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,588


    Did you find this post helpful? Yes | No

    Default Re: Menu building

    Quote Originally Posted by Amoque View Post
    ...Maybe the ideal way is Wi-Fi or an Android module and my phone?...
    I had missed that. This is the future, at least for quite some time.

    Your phone, android BASIC of your choice (some are free), I had forgot about WIFI, and you need a chip to process bluetooth or wifi, or a PIC that supports these features.

    There has to be samples out there on google. I have yet to embark on this adventure, but it's where I will go one day soon.

    Robert
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  7. #7
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: Menu building

    Amoque, What is, or what are the devices you are setting the on/off/day commands to? I personally have had good experiences using one of the ESP8266 devices with ESPBASIC. That way you can have a WIFI interface to your device. You can set up the web interface with buttons and switches as well as sliders for variable data. ESPBASIC is free and the devices I have used are the ESP8266-1 512k and the LOLIN 4M modules.
    Dave Purola,
    N8NTA
    EN82fn

  8. #8
    Join Date
    Apr 2014
    Location
    OK
    Posts
    557


    Did you find this post helpful? Yes | No

    Default Re: Menu building

    I'll start where Dave led us and raise a few more questions. I create controllers for other people. I ask lots of questions about what they are attempting to accomplish. What determines whether you want a light on or off? What determines whether you want a pump on or off? Is there a target for an analog (PWM) variable output? Many times, the whole process can be automated with absolutely no user input based solely on desired results. Knowing what determines whether a given output should be "1" or "0" (ON or OFF) inspires the addition of an input the PIC can use to make the decision automatically. If you are looking for random changes in outputs, switches and/or pots can generate simple inputs.

    If you could show us an algorithm (flow chart) that describes the ideal scenario, a better solution may become blatantly obvious.

  9. #9
    Join Date
    Apr 2011
    Location
    Welches, Oregon
    Posts
    198


    Did you find this post helpful? Yes | No

    Default Re: Menu building

    Quote Originally Posted by Dave View Post
    Amoque, What is, or what are the devices you are setting the on/off/day commands to? I personally have had good experiences using one of the ESP8266 devices with ESPBASIC. That way you can have a WIFI interface to your device. You can set up the web interface with buttons and switches as well as sliders for variable data. ESPBASIC is free and the devices I have used are the ESP8266-1 512k and the LOLIN 4M modules.
    I have/ am looking at the BASIC ESP modules, but I hesitate to get bogged down with a learning curve - my community of fish are greatly inconvenienced by my lack of knowledge. That said, I am reading up and will leave room for expansion or modification perhaps on a second build or as a wireless serial option. My efforts were an engaging project as a beginner and replacing commercial products with my own was exciting, but I have now come to rely on it and in doing so, I have come to the realization of a significant difference between hobbyist and professional - reliability, reparability, and responsibility. Another lesson learned.

    For now, I think I'll reuse the serial code I used previously to set the clock, set the pattern of the lights, adjust temperature, dose supplements, and other such mundane tasks as distract from my enjoyment of the hobby. It's not so difficult, one of the Chinese 8 relay boards handles the 110V and, other than that there are only five 12V sockets (3 populated with dosing pumps), some status LEDs, and an I2C OLED for output. Input is a few ADC channels, a flow meter, and 3 buttons - and a venerable, but reliable serial channel for communications.

    Each device has its own identifier, device 1 is an RTC, 2 is a light, 3 is a dosing pump, 4 is a heater, 5 is a "top-off" pump... I use a generic string to code/transfer values to read and write values to and from EEPROM. These values are read periodically (once per minute) to control the individual components.

    Last, in regard to the suggestion for Wi-Fi. I think it would be convenient to use a well designed visual interface for monitoring (especially) and control, but mostly this my need is limited to occasionally adjusting the clock, or reducing the dosage of this or increasing the dosage of that... What I would much appreciate is - eventually - a web camera so that I could watch them from afar!

  10. #10
    Join Date
    Apr 2011
    Location
    Welches, Oregon
    Posts
    198


    Did you find this post helpful? Yes | No

    Default Re: Menu building

    Quote Originally Posted by mpgmike View Post
    I'll start where Dave led us and raise a few more questions. I create controllers for other people. I ask lots of questions about what they are attempting to accomplish. What determines whether you want a light on or off? What determines whether you want a pump on or off? Is there a target for an analog (PWM) variable output? Many times, the whole process can be automated with absolutely no user input based solely on desired results. Knowing what determines whether a given output should be "1" or "0" (ON or OFF) inspires the addition of an input the PIC can use to make the decision automatically. If you are looking for random changes in outputs, switches and/or pots can generate simple inputs.

    If you could show us an algorithm (flow chart) that describes the ideal scenario, a better solution may become blatantly obvious.
    You are correct and what you suggest is exactly my strategy. However, it is necessary to have simple means to correct in response to unforeseen circumstances. I often will cancel dosing when I am on vacation, or in response to algae growth. I would guess that 75 - 90% of what I rely on the controller to do is automated. These are time based and there is little logic else to consider.

    I monitor certain basic functions - temperature, water level and flow, and light level (the florescent bulbs I use degrade in output over time). I also track the lifespan of my U/V system, but most of these are alarms or indicator type lights and are not complicated function type decision makers. I suspect if one had several tanks or, if one were far more advanced in knowledge of programming... Besides, I rather enjoy "getting my sleeves wet" and only for the safety and security of my tenants am I mostly concerned.

Similar Threads

  1. Building an I2C monitor ... but i think it is not Slave....
    By LakisFM1 in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 13th March 2012, 07:04
  2. Pulse Capture and byte building
    By boroko in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 21st July 2009, 02:59
  3. Replies: 6
    Last Post: - 1st February 2008, 04:35
  4. building a serial LCD using 16f84a
    By capix in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 4th February 2006, 13:24
  5. building own library with include-files?
    By mischl in forum mel PIC BASIC Pro
    Replies: 25
    Last Post: - 22nd September 2005, 21:46

Members who have read this thread : 2

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts