Here be stuff that should be turned into pages or blog posts, but is mostly lacking pictures.

WIP list

STM8 sim

Beware, that many of these links lead to sf.net. Remember that friends don't let friends use Sourceforge.

SDCC project has a simulator and a debugger. I hadn't got around to testing it, yet. Now I thought I'd have a look around to see if it supports stm8 and how much.

$ cd sdcc-examples-stm8/
$ make
make: Nothing to be done for 'all'.

$ sdcdb -mstm8 blinky
file "blinky.ihx"
SDCDB is free software and you are welcome to distribute copies of it
under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for SDCDB; type "show warranty" for
details.
SDCDB 0.9. Copyright (C) 1999 Sandeep Dutta (sandeep.dutta@usa.net)
Type ? for help
WARNING: SDCDB is EXPERIMENTAL.
(sdcdb) r
Starting program
addr 0x0 in no module/function (runtime env?)
Simulator stopped at Address 0x0000

$ sstm8 blinky.ihx
uCsim 0.5.4, Copyright (C) 1997 Daniel Drotos, Talker Bt.
uCsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
194 words read from blinky.ihx
******************** leave the RAM dirty now

Sadly the documents and command output are all pretty useless. How to even specify the arch? All switches are ignored. Shelving this for now.

Automated hallway light

The area just inside my front door is a small dark space with a stupidly chosen fluorescent light fixture that takes forever to light. I'd like a system that, when a door opens, turns on some small LED light to provide enough illumination for finding the light switch or setting the house alarm. This would be particularly useful when getting out of the house.

So, an idea: A reflected light sensor is used to watch the two doors leading into the space. When a level indicating an open door is detected, a LED is turned on. Timer will count down some number of seconds, possibly from start or from when the door was opened. When the timer expires, the LED is turned off again. The system is battery powered and spends most of its time asleep and has very low duty cycle. A separate battery for control and lighting is a possible idea. There could also be an ambient light sensor to keep the system off when there's already enough light available. If it was possible to detect movement or person in or near the space and use that as a trigger in a power economical way, that would be even better.

Initial plan would be to use msp430 LP to test components and set up some firmware logic and then move to a smaller SMD 430 and switch on a custom PCB for delivery.

I might be able to use several of these in some places, eventually.

MQTT

Allen key

Tailstock allen key that's possibly easier to use than an L key. Cut and faced a small rectangular piece of Al. Center drilled to 4 mm. Sawed off a piece from an allen key and hammered it in.

The flat sides would be a nice candidate for some engraving practice.

Spring loaded center / alignment pin

I saw this project somewhere and thought I could do that without a milling machine. Probably not the most elegant thing, but should be working and certainly simple. This can be used to align or hold up a tap when starting threads. There might be other opportunities to use one.

The fit was severely limited by my ability to drill a hole suitable for the pin. I could have gone around that by filing or sanding or otherwise slimming the pin down to fit the next smaller drill, but it was too late for that once I'd tried this hole size. I could still have made the hole even bigger and used a brass bushing to fit and slide on the pin. That would have probably been a better sliding bearing anyway.

8 mm steel drilled hollow most of the way. The cavity is 6 mm and has a spring that I had that fit that size and fit around the 4 mm stainless steel pin that I have a massive supply of. Other end has a (loose) sliding fit hole and there's a brass piston/collar pressed on the pin to prevent it slipping out and to push the spring inside.

The top cap is a tight bit of brass pressed (hammered) on as I couldn't make a thread in the remaining steel shell without making the bore smaller and having to hunt for a narrower spring and possibly narrower pin.

The pin was ground to a point with a cordless drill and a bench grinder just before final assembly.

I also made a brass screw sort of accidentally on the side and decided to finish it for practice. I don't have any use for one, the slot is off center and the thread isn't perfect but it's mine and it's just lovely.

I have used this on the lathe to push bits into the jaws while centering and for aligning bigger taps. Smaller taps have points in the back end instead of divots, so I'd actually need a female center for those.

These are sold in a set, but can be quite fun to make. I should make another (pair) and see if I can do tighter now.

Printed thermometer holders

Bought some cheap ebay thermometers earlier. On 2018-03-05, I printed a few holders that I drew up in FreeCAD earlier. One was a flat plate with a suitable hole. 26 x 46 mm maybe. Other was a shelf with a coule of small posts that a meter with a remote sensor should drop onto.

I could also make something that would make these more friendly for on-desk use.

The design is quite trivial, so some freeish license for the files available and a few shots would be nice to have here.

STM3ef motor driver

Some small projects, possibly Tarlab. Install froth on an stm8 board. Blink an IO. Use the compiler. Then do something more interesting like step a stepper or pwm a dc motor or dim something. Or direct a 9g servo. Have a pulse wheel interface. Have a servo. Add communication of some sort. Or just control pins. Power parts. Add voltage and current sense. Add current limitation to DC servo.

Rust on stm32

Another potential lab project. Set up rust to build stm32 target code.

Might be possible to go for Tiva instead.

Make a rust page. Mention Rust book from o'reilly and other resources. Rust has lately started to look attractive with more resources coming up and the compilers finally looking usable. Rust would in fact be a competitor or an augmentation to C. The possibility that it might also be usable for bare iron embedded is very interesting.

Sadly, it seems that embedded is still in the nightly territory.