perjantai 20. joulukuuta 2019

Controlling things remotely


We have a small "summer cottage" some 100km away from here. Since it has running water, it needs to be heated during winters, and we're using electric heaters for that. This obviously is somewhat expensive and wasteful, since outside temperature can vary a lot; when it's close to zero (celcius), only minimal heating is needed; but when temperature drops below -20, a lot more is needed.

Also, it would be nice if we could up heating remotely. Like a day or so before going there (yes, actually we go there, for a day or two at a time, during winters too) I could set heaters to 20 degrees so it would be a bit warmer when we get there. For this remote control systems exist, but are somewhat expensive to install and run, so I'd like a bit different setup.

So the rough plan is to have "all-time-on" heaters (set to minimal temperature, around 10c) that keep base heat up, and then maybe another set that can be activated when temperature drops too low (additional heating on very cold weather, this will be done automatically by the system), and third set that is set to 20c, to heat place up before we go there. This setup should make huge improvements to both overall energy consumption and comfort.

Of course it would be nice to get fully remote-controlled heaters where both "on/off" and target temperature could be set via remote system, but so far all I've found are proprietary systems that are controlled with their own hub and mandatory cloud bullshit, so that option is off the table -- for now at least.

I already have set up temperature monitoring system there (I can see from home how the temperature actually is - especially inside, in case there are power outages or periods of extreme cold; frozen water pipes is something I absolutely, positive don't want), so I was thinking I could add heater controls to that system. It already has own GPRS module to send temperature data, so it could equally well receive commands back when contacting my server (every few hours or so)

The current heaters, like said, are mains electric powered, 4 total, and their individual power varies from 1000 to 3600 watts, total power being somewhere in 8 kW range. A figure that I take seriously; I don't want anything to overheat or worse, burn if something goes wrong with control systems.

Easiest way is remotely controlled power outlets, and there certainly are many of those available. Many require their own SIM (each, not good) or proprietary protocols (zigbee with central hub) to control them, so those aren't great or easy to use.

Then there are simple sets available from neighboring shop, cost being full 16€ for three 3.6kW-capable outlets and handheld remote control unit, using I think 433 MHz band. I don't even need to mess with outlets (therefore keeping them as safe as they could be), I just can hack the remote!

Remote control comes apart easily, and as expected it's simple unit; single chip as controller, few RF components and buttons. Unfortunately (but I kinda expected it) buttons are in matrix, and after some measurements I determined it's 3 outputs and 4 inputs, for 10 buttons total (channels ABCD on/off, and one master on/off). Single input per button would been easier to interface but this can't be helped.

Buttons are usual type for this kinds of devices; just pads on board, and pressing button shorts them with conductive material. My original idea was to solder a FET on button pads I needed to control (three channels, on/off, so six total), but they are covered with carbon contact material which made this idea impractical (I didn't feel like peeling the carbon off, as it might damage the board/contacts).

So next best option was to put these to separate board, a bit like this:


This is just for first test. I've only connected channel A here (pin 6 being output for first four buttons, and 12/13 inputs for buttons 1/2 and (so far unconnected) 5/6 and also 9/10 (master channel I don't need so I leave unconnected.)  And it works; I can control channel A by pulling gate of those FETs high or low. Nice!

I already placed all needed FETs on small board. On horizontal are "output" channels (I need only two out of three),  and on vertical "input" channels (all four needed). Now I just need to connect remaining wires between these boards, and then FET gates to pins controlling them on third (main controller) board. Remote uses 3v battery, so that power comes from main board as well.

All in all, I should have nice test setup running shortly.


sunnuntai 15. joulukuuta 2019

ATV electric conversion part 3: fitting in


Previous part here .

Last time I mentioned apparent problem, and here it is. The picture shows how I originally planned installing the motor, but note the small arrow indicating rotation direction.


Yeah, that is not going to work. Installed like this the ATV will run in reverse, which is pretty far from my intention. After some reading, it's apparent that this motor type doesn't like running in reverse, as it could just burn out or shorten its lifetime a lot, so that simple solution is out of the question. Not to mention the motor's sprocket attachment nut; it might rotate open and drop off if motor were ran in reverse. So not good.

I considered rotating motor around and adding transfer axle between it and rear sprocket. That is, there is one chain going from motor to this transfer axle, which then and pulls another chain that is in line/connected to rear sprocket. I quickly gave up with that idea though; too much complexity. And finding suitable axles and sprockets ended up being near impossible, as they come with different center holes (star-like attachment; D-shaped hole, double-D/oval shaped and so on. No suitable combination was readily available. I don't consider my machinist skills to be good enough to make adjustments to parts so they should be ready as ordered.


This doesn't show angle very well but you can see the rear axle and chain sprocket behind the motor. Square tube is there to mark straight chain path. This is my alternate plan at the moment. This is under rear mud guard so motor fits there nicely, but so far I haven't figured out how to build new attachment for the motor. Or, more precisely, I have a rough idea how it should be built, but no idea how I make the placement match when attaching everything together in the end.

There's also few other attachment position ideas I have, I need to think about them as well.