In a previous post I described how to align holes without measuring. My original alignment tool was laser cut, but due to lockdown I’ve had to devise a simpler way to acheive the same accuracy using readily available materials – this time I use BluTac and an old milk carton.
Yes it’s just that simple. This method worked first time for me. If you are unsure, drill the -holes a bit smaller and file them out to be in the correct place. A 4 minute video of this process is here.
Sometimes it’s useful to know the activity on the GPIO pins of your microcontroller. This little monitor board is designed specifically for the Wemos D1 mini and has a LED on each GPIO pin to help you visualise what is happening on inputs and outputs.
This monitor is quite useful for checking DC levels and slower pulses such as when controlling servos, relays, etc. For faster pusles it’s best to use a ‘scope or logic analyser.
Microcontroller boards other than the D1 mini can be accommodated by either re-designing the layout for the extra pins, or using extension leads to monitor those pins you are interested in.
LEDs can be disconnected by removing the jumper links, so as not to interfere with other functions. All LED series resistors deliberately have a high value to minimise loading the GPIO pins. The white LEDs drew less than 500 microamps each when used with a 1K series resistor, and they were still quite bright.
The monitor can also act as a small breakout board, extending the Wemos header pins to 2 sockets and 2 pins per GPIO line. This can be handy when developing your project, as Dupont extension leads could be used to connect the monitor board to your PCB.
Construction is simple – besides the header pins and sockets, there are just a dozen SMD resistors and LEDs, mounted on a prototyping board. The underside of the board is where the connections were made, linking pins with single strands taken from a length of scrap multistrand wire.
The video shows the board with jumpers installed for all 9 GPIO ports (D0 to D8). Due to high value series resistors, the LEDs do not interfere with program uploading, and if you install the RX and TX jumpers you can watch the LEDs giving a satisfying twinkle with the upload activity.
Designed and built at the Sheffield Hackspace using an arduino and bits and pieces of things that you might find lying around in your own home…
Here’s the setup:
An arduino (pro mini) for controlling the SG-90 servo motor An ESP8266 for wifi access and neopixel control A piece of gutter and downpipe for the main body A plastic dome sourced from a solar powered garden lamp An Aldi’s peanut butter jam jar lid (crucial) Other bits and bobs scrounged from various unwanted poundland items
If you think this is cool wait until you see the boats!
This project describes an easy way to control a strip or ring of WS2812 LEDs via a web page. It was originally based on the Arduino FastLED library.
Although the FastLed library code gives us a great example of how to control NeoPixel rings and strips, it doesn’t provide for user interaction. So it was decided to add the ability to control the device by wi-fi, and also have a touch switch for local control.
Materials required A Wemos D1 Mini module was used as it consisted of a low-cost ESP8266 wifi chip and antenna, and it can be programmed by the familiar Arduino software. The Wemos module sits in a socket which is soldered to a matrix circuit board. This allows the module to be swapped out if needed, and also makes it easier to connect the touch-switch and neopixel wires.
A touch switch module was chosen rather than a discrete push-switch as it can be hidden behind the acrylic case and should also provide more reliable switching. The 100 x100 x 25mm square case was laser cut from 3mm acrylic, and was designed using the makercase on-line designer. This is the quickest software for making simple boxes. An extra 100mm square piece was cut for the front, with two circular cuts to accommodate the neopixel ring so it can lie flush with the front surface. Later, the touch-switch hole was cut so the sensor sits behind only one thickness of acrylic.
The components fitted easily inside the box – it has plenty of room for a battery pack if you wanted to make it totally portable.
Software overview. The project uses websockets so that any web browsers connected can control (and be controlled) by the device. The touch-switch also controls the software and the settings are communicated to all connected browsers via websockets in real time.
User settings are stored in an object, derived from the ‘userDataClass’. This object stores settings for the brightness, colour, active pattern, demo pattern, provides functions for brightness gamma correction, etc.
The touch-switch code decides whether the switch received a tap or long press. A tap changes the pattern and a long press increases/decreases the brightness. Debouncing the switch was achieved by using a 32 bit integer and bit-shifting each switch reading into it. This method has both the advantage of being able to check for a steady switch state, and to discriminate between a short or long press. A future article will explain exactly how this is done.