In previous posts we showed how to build a vibrating sex toy in principle as part of the Internet of Things (IOT). In addition we have selected a hardware platform – the popular ESP8266 – for controlling a vibrator motor, gathering motion data and connecting to the internet. Now we want to build the toy itself.
part 1: Basic Node for the Internet of Sex Toys
part 2: Molding the Basic Node
part 3: Software for the Basic Node
Brief Review of development boards
There are a lot of development boards which are equipped with the ESP8266. The popular NodeMCU was already introduced here. Here is a quick overview and comparison:
- plus: very popular, cheap, USB connector for programming
- minus: quite large (for being part of a sex toy), no support for battery charging
- plus: USB connector for programming and battery charging, smart form factor (only 23 mm wide), very good support (libraries, tutorials)
- minus: quite expensive
- plus: very cheap, USB connector for programming, additional stackable modules (eg. battery charging, TFT screens, motor driver), good form factor
- minus: no real support (but there is a forum, problems with modules reported
ESP8285 (variant of the ESP8266)
- plus: really small (!!!) and smart form factor, USB programming and battery charging, optional sensors on board (but no motion sensors)
- minus: quite expensive, only 1MB memory (nevertheless enough for a lot of application)
For our project we selected the WeMos mini cause we get almost everything we need:
- USB connector for programming
- module for battery charging
- module for a motor driver
- good form factor (eg. to be put in a vibrator handle or in the base of a dildo)
- cheap, fast delivery
But there is no shield for motion detection (accelerometer,gyroscope). So we have to use an additional board eg equipped with the MPU9250.
But there is a problem with the WeMos motor shield: After a few seconds it stopped working. And in addition the MPU9250 stopped working, too. Hours and hours we tried different configurations, changed the libraries … The problem was the motor driver shield itself. Fortunately there is an easy work around. Read here.
Another issue is the battery shield. It has an extra USB connector for charging the battery. So you have two USB connectors (one for battery charging and one for uploading). Two USB connectors are not handy. Fortunately we can do without the USB connector for uploading as it is possible to update the software over the air (OTA) using WiFi.
As the body interaction philosophy uses motion for controlling the device we have to add the MPU. Again we use the MPU9250 which has an accelerometer, gyroscope and magnetometer.
Another insight was that you need at least a switch for rebooting. As we want to mold everything the switch must meet the IP67 requirements, which means it is water- (and silicone) proof. If you don’t want to mold the electronics you can use the RESET button on the WeMos mini board.
A perfect basic node has a wireless charging option, too.
Material list for the basic node:
- Wemos mini board
- Wemos motor driver shield
- Wemos battery shield
- Wemos prototyping board
- Wemos set of pins
- LiPo battery (eg. 3,7V 650mAh, 2C, JST plug, available at ebay)
- MPU 9250 board (for motion control)
- 1 or 2 encapsulated vibration motors, 3V, available at Alibabaexpress
- Optional: Switch IP 67 protected (eg. Cherry Switches DC1C-K8AA IP67) – for molding
- Optional: Wireless charging receiver 5V eg from Seeed Studio
Soldering the basic node
We use one connector (part of the Wemos set of pins) to connect the Wemos mini with the battery shield and the motor shield. This is done to save space. If your application has enough space you would use one connector for every shield.
Now have a look at the bottom side where the motor shield should be. We can connect up to 2 motors. Solder motor 1 to A1 and A2. Motor 2 has to be soldered to B1 and B2. In addition we need input power for the motor. We just use the 5V provided by the Wemos mini battery shield. Connect 5V to VM and GND (from the pins) and GND. But you could use other (more powerful) power sources, too.
Wemos offers a prototyping board. We use it for mounting the switch and for the MPU9250. Connect the MPU9250 to the bottom side of the prototyping board. Therefore 4 pins have to be soldered
Now look at the bottom side of the prototyping board. Put the MPU 9250 so that VCC, GND, SDA, SCL are connected to the pins.
Next, solder the MPU 9250.
Then add more pins to the prototyping board at both sides. The picture shows the bottom side of the prototyping board.
Now wire the prototyping board. The picture shows the top side.
Now you can add the switch. Place it in the middle of the board on the top side. Connect GND and RST to the switch. Now you have a switch for rebooting which can be molded.
Now we have both parts ready and can stack them together.
Now add the LiPo battery, which should have a JST header. Now your basic node is ready.
Wireless charging option
Especially for sex toys a wireless charging option is reasonable as this is a requirement for silicone molding of the toy. And when the toy is molded it is safe and washable.
The wireless charging module consists of a sender (or transmitter module) and a receiver module. You have to solder the receiver module to the battery shield. Don’t mix the modules.
unfortunately there is only a USB connector. If you don’t want to remove the USB connector you can solder the red (+) wire to the R330 resistor as shown on the pictures. The black (-) wire can be soldered to any pin labeled (GND).
Now put the receiver module on top of the battery module.
Now stack the protoytping board on top of the battery shield. And connect the battery.To charge the battery connect the sender (or transmitter) module to 5V. To power the sender module you may use a USB port power source which has about 500mAh or more. Place sender and receiver coil about each other. For a more professional charging solution you need a charging station. The making of a charging station using 3d printing is described here.
Learn how to construct the mold form in part 2:
part 2: Molding the basic node
part 3: Software for the basic node
One thought on “Basic Node for the Internet of Sex Toys (part 1)”