We are planning to redo our garden. And I am making a water and light plan for it.
I thought I could do it myself using 12V and RS485/Modbus.
So these are my plans. (NOTE, this is a work in progress)
I’m going to put 4-wire ground cable in our garden, and a RS485/Modbus master controller in my shed. 4 Wires will have 12V low voltage, ground and RS485 A/B wires. This way I can control till 64 devices on a single cable.
Below, a USB stick to connect the RS485 cables to a Raspberry Pi? Software is probably going to be a NodeRed instance connected to Home Assistant.
On/Off lights using a RS485 board and relay. These can be bought on a single PCB and can control 220V. I am probably going to use generic outside lamps and refit them for 12V led or 220v, with those RS485 controllers.
Test PCB
The above left part will be encased in resin or alike. Right PCB is for testing only.
For dimming RGB lights, I made the below design.
NOTE: This needs 120ohm end resistor and capacitors over the 7805.
12V to 5V using a 7805, RS485 8pin DIL/DIP and a ATTiny85 8pin DIL/DIP. Plus a 4×4 RGB Matrix. These also encased in resin.
More information on the ATTiny85 and programmer can be found here:
The plan is to make a flame sensor, with in combination with my presence sensor will alert me when we leave the room and candles are on, give us a notification.
Above is the schematic. A Wemos mini (left over from another project), an analog multiplexer and a cheap 5 times flame detector. There is a potentiometer on this board to change the sensitivity.
Search “Infrared Ir Flame Sensor Detector Fire Detection Module 5 Channel” on Aliexpress. These are 1 euro.
Deeply impressed by your blog content which means a lot to electronic enthusiasts.
I'd like to sponsor your project by providing free PCB prototyping,
ROM SWITCHER
I made a rom switcher in the past. Now I’m using an Arduino to switch Kernal and Character rom. (Partly idea from Adrian)
Where the F* is my schematic. Ah here it is.
Above right picture:
Tactile button (emulates restore key)
Red led – reset
Yellow led – Exrom
Blue leds, Address lines select ROM part in 27512 EPROM
Green leds, Address lines select ROM part Character ROM
Motorized Fader Potentiometer
I don’t trust some B&B’s so I made a camera detector. (I always scan the wifi and Access Points) This one lets you know if there are IR enabled camera’s. (Night vision)
Picture 1:
1 = org camera module, IR filter is hard to remove. (See pink color)
2 = other module, IR filter is at bottom
3 = IR Filter, I removed this.
Picture 2:
IR light blast from a “hidden” camera. (I need to adjust focus of lens)
While I made this for my Commodore C64, it is applicable for many things.
It started with some cheap displays from Ali, and some leftover Wemos D1 from my Pressure Lab project.
I Started measuring the audio output from sound devices and from my C64. I soon discovered that I needed some way to get the offset and amplification correct for the analogue input of a Wemos. (0-3v3)
So a little op-amp circuit was born, but not without some struggles. I forgot many things about amplifiers. It was one of the first school books I got rid of. (Sorry mister Rafaela)
After searching the internet and posting a question on Reddit I ended up with the following.
R1 and R2 are 100M. The potentiometer P1 allows me to set the offset. R3 is 1M C1 is 100nF to decouple the audio signal from the RCA.
R4 is 47K and C2 is 330nF (thanks tycho205) Cimportant=1/(2πfR2) where f is the lowest frequency of interest. In this case Cimportant should be about 330nF
LM324 is a quad amplifier, leftover from another project. Note, the SINGLE RAIL power.
P2 potentiometer is 2M (leftover) and gives me a variable amplifying opportunity.
A = Audio input
B = Setting the offset with P1
C = Setting the amplification
Below input signal (note negative values) above amplified signal with offset!
The displays are 3 Wemos controllers with a cheap I2C display. These are just fast enough to do FFT.
Analogue in is the output from the OP-amp offsetter ..
CODE
Needs cleaning up, and a better stabilize routine.
Yesterday I got my new signal generator (FY6900), my DIY version was missing functions. Now I can test my op-amp schematic I’ve been posting about.
MIDI Controller
Next, for my YM2203 player, I wanted to make this Midi Controllable. But I don’t have a Midi Controller which has enough knobs and keys. Besides that, I thought it was cool to build my own.
Teensy 4.0 (because I needed multiple analogue inputs, I used another controller before, with an analogue multiplexer. But I wanted to use the easy method to use USB as midi also. The board will also have midi connectors, but not populated yet. So you can use both.
SSD1306 display (for now) Showing note being played and two potentiometer values.
Two potentiometers (for now) I can use these separately. But when pressing the last key on the key matrix, it will change the CC Channel of the first pot. (Using the value of the second)
4×4 Matrix keyboard being read by a MCP23017 I2C 16-bit GPIO Expander. Both display and GPIO expander are on the same bus.
MCP23017 pinout
I used some pullups on : /RESET and GPA0-3 Pullups not needed on SDA/CLK because these are on the display board.
Damn, I couldn’t do this stuff in school. Tried to forget it all … now I need it!
Top of this image shows what I want to accomplish. Audio or other input which has negative values also, convert to another voltage range to be read by analog read on an Wemos. These can only read 0-3v3
I took yesterday’s setup and added polyphonic Midi.
Schematic same as previous post, just added a Midi Shield.
I can use my QY100 as midi keyboard. But playing midi files is also fun!
Because it isn’t using the right instrument and not all channels are being used.
I wanted to make a register replacer, which utilizes a sdcard reader and music dump to play songs. But I think I’m going to make a full-blown Midi song player for the YM2203.
"If something is worth doing, it's worth overdoing."