JOB: Simple timer project to kick things off

Posted on
  • JOB:
    Greetings,
    I'm a non-coder who has recently taken interest in microcontrollers to help make a few things in my life a bit more efficient. Espruino piqued my interest because I am a bit more familiar with Javascript.
    Anyway, I'd like to see if I could gain from the forum's collective knowledge on how to choose hardware and platform for my project and if there is someone out there that'd like to take on the project, then I'd be happy to grease the wheels with a bit of money. Plus you'd get to be the first developer commissioned via this forum, so basically also eternal bragging rights.

    The basic gist is that I have about 1200 square feet divided up into 5 rooms along with a central hallway. In 4 of the rooms, I'd like to be able to push a button that would trigger events on a display housed in the central hallway and an equivalent display (with slightly different functionality) in the 5th room. Each button/room would have its own channel in whichever button system you choose (and if phase I goes well, it'd be great to be able to expand to 8-10 total channels)

    The buttons would be used to start, stop and mark events throughout a specified time period. Here are the basic steps:

    1. A button associated with a specific room would be pressed to start a timer (on display in hallway and room 5) while the button presser is in that room (one of the rooms 1-4). Ideally a light would flash or some sort of feedback would occur to assure that the receiving display(s) received the start signal. If we can assure that nearly all button presses will be received (because whatever wireless solution you choose is so powerful or because we have receivers in each room), then perhaps we don't need a feedback system telling the button presser that the button press was received.
    2. The button which started the timer would be pressed a second time (in one of the rooms 1-4) to mark a specific event, which generally happens around 25 minutes after the timer is started. Again, we'd want to make sure the signal is successfully transmitted to the display while the button presser is still in one of the 4 rooms. Once the receiver receives this signal, the display just marks the time at which it occurred and continues running
    3. Around 44 minutes into this, the button presser is alerted somehow that they have one minute to get to the room which is about to reach 45 minutes. This alert could occur at the display, but ideally it would also be on a device that the button presser is carrying around while they are moving from room to room. Ideally, the alert would be relatively silent, perhaps a vibration. Flash may work as well.
    4. At 45 minutes, the button presser will perform a task in a room Room 1-4 and then press the button for that room (while they are in that room). This button press would be logged on the display and would also stop the alarm. Perhaps we could have it so the alarm is silenced somehow before this event at 45 minutes is logged.
    5. Around 60 minutes, the button associated with a specific room will be pressed for a final time and cause the timer to stop.
    6. Eventually, the events will be reset and the process starts all over again
    7. Through this whole thing, 4 timers will eventually be running concurrently and the events in steps 1-5 will be triggered at various times in parallel. Each room timer runs independently but each room 1-4 is equivalent and all 4 timers are displayed on the same displays (housed in the hallway and room 5)

    I hope that makes sense. It is essentially 4 timers running concurrently on two displays with fancy 'lap' features and each timer is controlled by a separate button.

    Button hardware needed?

    1. Pucks? I was initially thinking that the Puck.js would be ideal for this and it could be. If Pucks were used, then each button would have to stay in each room 1-4.
    2. Remotes? It may also be possible to use a solution like this: http://www.espruino.com/Remote+Control+SĀ­ockets and use one of these remotes https://www.adafruit.com/category/259. This way the buttons could be carried from room to room. There may also be a way to find a similar remote with 8 buttons and this would make it easier to have a button which starts the timer, marks the first event then a second button that marks the second event and turns off the timer (with various short or long presses).
    3. Something else that I'm not thinking of? Perhaps Wifi or 2.4 gigahertz portable phone channels to guaranteed coverage through all of the rooms. Walls are drywall btw

    Display?

    1. I'm flexible here. Web Bluetooth Website and a standalone always on device each have pros and cons.

    Ok, what do you think? I'll take any sort of advice and/or bids. Thank you!

  • This is how I'd approach it, at a high level.

    Since I'm unsure how the Pucks' signal would fare over the distances and through walls I'd suggest each of the four rooms has Puck button and a Raspberry Pi Zero W acting as a receiver. Pucks could be carried in a similar fashion to your remotes around and between rooms.

    Each Pi Zero W could listen on BLE for the Puck associated with its room, or probably better, to all Pucks to ensure good coverage. Pi Zero W boards are all connected via LAN.

    Puck button events are relayed to Pi Zero W. A received confirmation could be sent back over to the puck over the same service. - probably UART would suffice to simply light up the LED. The Pi Zero W relay events over MQTT (or similar), to a server application on one of the Pi Zeros (primary) attached to a display running a web or console based UI there.

    Second display probably runs another Pi Zero W as a slave and listens for update signals from primary to update it's own web or console based UI. Websockets will do here.

    There's a starter for ten. Maybe others can finesse the approach.

  • Thank you very much for the suggestions! It does seem like I will have to have a receiver in each room and I hadn't looked into the Pi Zero W yet. Looks like a cost-effective choice

  • What hardware and communications to pick depends also on the means / skills that are or have to be made available for the building, operating and maintaining and the physical constraints for 'the button'. About the latter you have not elaborated much yet.

    As @Ollie points out, Bluetooth BLE may not work across the whole space because of the obstructions. Therefore, at one point you need Wifi.

    The lesser variation in hardware and communication you have, the 'easier' and more cost effective is it to build, operate and maintain your system.

    If you do not have real physical constraints for 'the button', I would use only as hardware just Espruino-Wifi run by two standard/exchangeable 18650 LiIon batteries. All this fits in a small box you still can carry in you pocket. Espruino-Wifi is 30mm x 23mm (1.2 x 0.9 inch), 18650 LiIon is 18mm diameter x 66mm long (in inches: 0.7 diameter x 2.6 long). All in all about 1.5 x 3.6 x 0.8 inch. All buttons look the same, have the same software installed, etc. On power up, a sequence of (electrical) button presses makes the buttons to be what they supposed to be: button in rooms, button on bearers, 'button' in hallway as monitoring central station.

    For display, you have multiple options:

    Frugal option:

    • For button:

      • for application/user feedback in the buttons, use built-in green and red LEDs
      • for communication/connection status, use built-in blue LED

    • For central station:

      • for application/user feedback for monitor and control operator: simplest variation is making central station run as a Web server (and optionally also access point), serving the buttons as well as a Wifi device with display, such as a phone or tablet, for the central station display.
      • for communication/connection status, use built-in blue LED

    If you want to have a dedicated display, you may connect (plug-in) a TDF or OLED or LCD display.

    If you want to spend a display on all buttons, put an OLED or LCD display in every device. If you pick a TFT, it uses a bit more power, but has the advantage of having a (resistive) touch screen... and the things are cheap.

    With an OLED or LCD -but not touch - in each button, a 4 way with enter button fits and you may make it even a 'game boy'...

    Since batteries can be exchanged, you can have enough charged spares available, and to operate reliably, you just built 10..12 buttons.

    As a last comment: take a look at upcoming Espruino Pixl.js - just too bad that runs BLE only - but would have all what you need... Adding the batteries and a cheap ESP8266 ESP-01 serially connected with the Pixl.js will also give what you need... more than you need... and it is really a cool thing... see the fun NodeConf badge by @Gordon ... you will enjoy and be inspired... (and choose how to move forward).

  • This is fantastic! Thank you very much. It seems clear that WiFi is the way to go.

    I used this information to beef up my project description and have now found someone to take on the job. I hope to have this up and running soon so thank you quite a bit!

  • Great, looking forward to progress reports... in this thread / msg ;-)

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

JOB: Simple timer project to kick things off

Posted by Avatar for user87884 @user87884

Actions