apos / rapid-bulky-wshc-by-apos

4 stars 0 forks source link

Rapid bulky wSHC by apos (RPB wSHC)

Smallest version with external power bank or 6-16V DC. Version with 1,54'' OLED

Version with 2,4'' OLED

A very early prototype :-)
src="media/ESP32-30pin-BO1-Rapid_Bulky_wSHC_V13_01.jpg" width="300">

3D models

YouTube video

In a hurry?: This video is 50minutes long :-) But you can skip some chapters if you are only interested in certain aspects (see timeline in video). But be warned: you might miss important informations, especially if you are new to the subject ;-)

I recommend to read this page carefully afterwards to understand what to order and what to expect :-)

The video gives all informations needed from Adam to Eve, also includes an explanation of ESP32 form factors. But it is not on programming the SHC code onto the ESP32 with Arduino or Platform.IO IDE - only for assembling the parts.

Have fun.

UPDATES on the "rapid bulky wSHC"

Preface

This is for building a wireless Smart Hand Controller (wSHC) for the OnStep telescope controller doing rapid prototyping method with

You need:

  1. A working OnStep with wireless functionality (no simulation mode possible - you will not get over the start screen in SHC)
  2. Knowing how to configure the Smart Hand Controller and the ability to program the ESP32 and upload it (Arduino IDE, Platform.io).

Many thanks to Howard Dutton which is the founder and lead developer of the OnStep telescope controller. He did the main work on altering the source code so that things are working with the joystick shield (which they did not in the first place).

Annotation: this is not the documentation for an SHC implementation. This project only gives you reference designs among many others and a combination of hardware that is tested and works, a 3d model to print and some hints about getting things done.

Further reading on Onstep.groups.io

I never had a SHC because I did not want to build it. I already did this with OnStep and every half a year a new vervsion, PCB came out and there had been many problems. Therefore I built my OnStep with given hardware (Engraver boards). So I thought about the same for a SHC and everything started with the OnStep chat topic: "wSHC (wireless Smart Hand Controller) with standard ESP32-Board and standard joystick shield (anyone?)". I had laying around some ESP32 and a joystick board with buttons. When I found out, that the SHC is simply that, I liked the idea for prototyping or even more. I did not order a PCB, extra parts or doing welding at the weekend just to get started with an wSHC when the list of components seem to be so simple. This lead to this project.

CS Axel

Purpose

Be able to rapidly build a wireless Smart Hand Controller with common standard parts and a oystick shield:

The intended usage is prototyping, testing. But it also meets the requirements to use it in the field as a full featured and robust wSHC.

The model is bulky, because of the use of standard breakout boards and shields. There exist others which use PCB's. This project gives you the time to do a more sophisticated wSHC without having one in the meantime :-)

What you need

It depends on the reference design (version) of the "bulky wSHC" you like to build.

But it boils down to:

  1. Access to a 3D printer with PLA (or other materials which can be fine printed) or you have another housing which you can use.
  2. A standard ESP32 with 30 or 38 pins best with USB-C jack
  3. A breakout board for the ESP32 with USB-C (V) and a standard 5/2.1 mm jack (4.5 to 16V) - other breakout boards might fit. But these are very common.
  4. A Arduino form factor Joystick shield
  5. An OLED 1,3, (1,54 or 2,4 not tested) inch screen (I use a white colored one and put a red foil on it for the night)
  6. 10-15 cm long Dupont cables (female 2 female for breakout board 1). Or use a crimp toolset and cables to make your own length (which is better). You can save a lot of time, if you buy preconfigured dupont cables (2,4,5 bundled). If you use headers, that include a whole row of pins, this is more robust and also will lead to less misconfiguration.
  7. A standard USB powerbank, battery pack or for the breakout board no. 1 an 6,5 to 16V DC input (standard 5/2.1 mm jack) - until now there is no much space for a battery.
  8. A matching USB-cable for programming and loading the ESP32 / Board (USB-C, Micro-USB, Mini-USB)

Costs

Total costs

Total per unit Version Notes
15-20 € V01 if you are in a hurry (Amazon/Ebay) and well suited otherwise (battery, cables)
under 10 € V01 if you have time and will save a lot of costs you can get everything from China sellers. This is intersting, if you have a class, order more than one parts and want to build this for a group of people.
30+ € All More, if you start from scatch and need cables, battery pack, crimp tool

All Versions (parts needed)

Part Version Notes Cost
Cables All Use only good quality, standard dupont cables 10 to 15 cm long or use preconfigured 2,3,4,5 pin ones. It is wise to use cable headers. Single connections could be troublesome. Cents
Cables All (opt.) Crimpset, this is a good investment for many projects 30-50 €
Battery Pack All Power supply, 5V powerbank (USB-C/Micro-USB), 5mm/2.1mm jack (6 to 14,5 V) depends if you have to buy or can reuse

Reference design 01 (V01)

Part Version Notes Cost
ESP32 V01 30pin 5-7 €
Breakout board V01 for ESP32/30pin Arduino form factor 5 €
Joystick shield V01 ITEAD (seems to be not avaiable very easy). Very slim design. Arduino form factor 5 €
OLED V01 1,3 inch 5 €
OLED V01 2,4 inch 15 €
Filament V01 PLA 2-3 €
Cables V01 10 to 15 cm long (female to female) Cents

Build Time

Preparation

3d printing parts

Cables

Classroom project

If you already implemented an OnStep controller with people of you astronomy club, it is very easy now to get everything running with a wireless SHC. You will be surprised how much more intuitive this is, than using the handy app.

If you are well prepared (get cables ready, print parts) you will make this in a 3 hour workshop. Included a pause, 30min intro and 30 minutes for asking questions.

You can save really a lot of money if you order the parts in China (takes usually 2 weeks shipping).

More to come

Reference designs

Any ESP32 and joystick board should work. For real world usage, there should be no bulky things on the top of the board! Probably you have to cut off the pins and headers. Within the folder structure in this repository you will find the different versions (hardware, configuration and 3d model).

Feature list

Hardware components overview

This is the most compact combination of hardware I could find out there:

ESP32

There are a lot of form factors for ESP32 out there (see here):

Every ESP32 will do, but we have some constraints depending on the breakout board you will use. Especially, if you consider to use the ESPDuino-32 form factor, be aware, that you have to solder extra pins onto the board, since not all necassary pins will be there.

Breakout board

30pin breakout board with DC converter for the 30pin ESP32 (RECOMMENDED)

This board has many advantages:

grafik

38pin breakout board with DC converter for a 38pin (!) ESP32

Work in Progress - but should simply work. Same features as the board above. Might be a solution for the ESP32 38 pin versions which come with the JST 2.0 port for a battery.

These types of breakout boards I only found on Ebay and in China.

30 or 38pin breakout board with clamps

You can use this for prototyping or for getting almost any ESP32 to run (depends on the width!). You can also add a simple battery loading circuit. This board is simply different

Joystick shield

Joystick shield 1 - very short, Arduino form factor (RECOMMENDED)

This design uses an ITEAD joystick shield and pinmapping - see ITEAD PDF manual in the the media folder. Unfortunately these Joystick boards seem not to be produced any more. V02 will use another shield.

It look like so

Joystick shield 2 - bigger, but very common shield

This is work in progress (see issues). Have to wait until hardware arrives.


OLED

Please consider wleding right angled pins (7pin header or 4 header) onto the board (facing inwards) which could give you more space e. g. later on for a battery pack. The even ones delivered with them are not very good for the building into the housing.

Use the correct 3d model (2,4) for the OLD housing.

Use I2C OLEDs (not SPI, you have to convert them by soldering).

1,3 inch OLED

Please consider welding right angled pins (4pin header) onto the board (facing inwards) which could give you more space e. g. later on for a battery pack. Use the correct 3d model (1,3) for the OLD housing.

1,54 inch OLED

Type SSD1306

4 pin models (I2C) are not easy to get and expensive. 7 pins are SPI - see 2,42 inch OLED. Until now I do not own one ... so can not test it. Therefore no 3d model at the time of writing. Please contribute, if you like and file an issue with the solution here in GitHub.

2,4 inch OLED I2C (RECOMMENDED)

Type SSD1309

Important notice: there are SPI (7 pin) and I2C (4 pin) models out there - be very careful, which version to choose (e. g. here von Ali).

I have tested and successfully converted two DIYmore SSD1309 from SPI to I2C:


Conversion steps (soldering of very tiny smd parts required - see video linked above):
  1. shorted R5 and R7 with a little piece of cable
  2. moved R4 to position R3 (R4 will be left open)
  3. IMPORTANT: you have to use pin16 for reset (default in SHC code), otherwise the display will keep blank

Model for 3D printer

The models are more or less versatile.

V01

The smallest RPB wSHC housing. Used for the smaller ITEAD joystick shield which is very small. Has also a "closed" top for your own design.

V02

Used for the bigger Joystick "Arduino" Joystick shields which are a little bigger (87mm long instead of 70mm). Also the base is bigger, which gives space for a lithium battery pack. Has also a "closed" top for your own design.

V03

Work in progress to use with avaiable Joysticks and buttons with Dupont connectors.

Other Versions: please contribute you Ideas

Please contribute at the tread wSHC (wireless Smart Hand Controller) with standard ESP32-Board and standard joystick shield (anyone?).

Supply case version from Matthias

The case is finished and it works. I glued the red ring on as a "design extra". The case is an old power supply case, which I still had left over.

He also used an old handy accu an integrated a loading circuit. After the prototyping phase he soldered everything. Good idea! See https://onstep.groups.io/g/main/message/51556

Instructions

Basically orient yourself on the pinmap of the SHC code for ESP32 and you read the look at the wirering plan in the media directory for the ITEAD joystick shield.

Dragons ahead

Everything will be reusable for a other projects and can be put apart totally. Nothing is soldered.

Basically you can do this now with every ESP32 and Joystick board, BUT: you should know what you are doing and the 3D model probably will not fit.

Source code

Dealing with the source code is not easy, especially if you are new to OnStep, to ESP32 development, or to the Arduino IDE.

  1. You need to read carefully the main SHC instructions howto install the software on the OnStep site -> right side -> Smart Hand Controller.
  2. At time of writing you have to use the main tree of the SHC software code to get things running as stated in the instructions. This and only this branch contains the necessary code to get things running
  3. You need to add special configuration code to your Config.h (section // KEYPAD) to get things running. Especially the joystick probably needs fine tuning (hysteresis) and the buttons debounce settings. Probably you need to alter the Joysticks direction (#define X_PIN#_ACTIVE...). You can find my Config.h in the config directory within this repository.
    • The additional Config.h settings do not exist per default, when you checkout the code. You have to add dem manually.
    • Again: probably it is wise to have a look into the starter thread on OnStep chat like mentioned above.

This is work in progress, here and in the OnStep SHC source code (tree main). Until now it is limited to special hardware.

Program ESP32 - Platform.io

I use the Visual Studio code plugin for platform.io. Arduino IDE is enough though (and the new 2.0 version works perfectly).

If you work with Platform.io you need:

BE AWARE: sometimes you have to press the "Download" button on the ESP32 to upload the code. You also need the correct driver depending on the chipset beeing used. Normally the USB-C variants are newer and have no problems.

3D-printer model and parts

You find all 3d files for Fusion360 and the 3MF/STL in the directory "3d" in this repository. Each one is for a certain version. These files are work in progress. I design with Fusion360 and will update the files after every major milestone.

The parts are very tight (no gap design). I like to use as less as possible screws (if possible no). Some parts have to be glued together.

The model is bulky, because of the use of standard breakout boards and shields.

Important:

Optional print parts

Pin inlets for different breakout boards

Universal hold

Straps

Put a strong nylon cable into the two holes at the back of the base. You can simply break through the holes with a screw driver. 4mm diameter is default, but you can easily make the bore narrower or bigger.