If you’d like the code please comment below and I’ll upload it.
The sawtable uses linear actuators that you can buy from ebay to raise and lower the router, and raise, lower and tilt the saw. Mostly I use the button panel for control but sometimes fire up the bluetooth app. The app lets me stand away from the button pad to make adjustments. It also has speed control through the motor drivers (L298N) to allow for finer, slower motor control.
A home built saw table allowed me to get the exact height I wanted (105cm) and also the larger work area. The total cost for this project was around $AUD500 plus the cost of the saw and the router. I already had these tools so it was no extra cost.
There are 2 files, one for the Android app that works through Basic4Android, one that works with Basic3Arduino. Please note that the Arduino board is Genuino/101
I got stuck with a legacy board that used relays to switch between 2 analog inputs. Sometimes the relays got stuck and provided a false reading. In my search for a quick solution I came across multiplexers. These allow you to switch between inputs using an output from your microchip. The bog standard multiplexers are the 4051, 4052 and 4053 series. Download the multiplexer datasheets here.
4051 – Uses up to 3 outputs to switch 8 inputs to 1 channel
4052 – Uses up to 2 outputs to switch 4 input pairs to 2 channels
4053 – Uses 1 output to switch 2 input triplets
Some things I found out using the 4052:
Pull inhibit, Vss and Vee to ground, not through resistors but direct to gnd
Pull Vdd high
Pull the unused input pins high or low as require.
There is internal resistance in the multiplexer that can affect sensitive analog signals
The internal resistance can change with the temperature of the chip (I’d love more info on this if anyone wants to contact me)
Shown is the small strip / vero board I built to solve my switching problem. There’s a voltage divider in the middle to pull a pin high / low with 10k to ground and 1k to the microchip output. So in this case I only needed one microchip output to switch between 2 analog inputs and get rid of the dodgy relays.
This is a small breakout board to measure the temperature from a thermocouple. Photo’s and sample code below.
Some background on Thermocouples
Thermocouples generate a tiny voltage that is non-linearly proportional to the temperature difference between the tip and the rest of the thermocouple. There are different types of thermocouple, but J and K types are the most common. On Ebay the K types are available and cheap, so this board works with K type thermocouples. The voltage is tiny so needs amplification. It’s non-linear so needs to be processed. It’s also generating a voltage difference across the length of the thermocouple, so this board to also measure the temperature at the base (cold junction) and compare it against the tip voltage.
The AD 8495 amplifies K types, cold junction offsets and has a simple linear output. The voltage out is simply 5mV / degree Celsius. So 20 degrees is 100mV and 100 degrees is 500mV. Nice and simple. This also reduces the number of connections from a microchip or development board as we only need ground, input voltage (3v to 18v) and the output reading. At the other end of the board we insert the thermocouple (ensuring it’s the right way around)
Simple output 5mV / degree Celsius, no need for libraries
3v to 18v input
Thermocouple +/- input
Tiny current draw of 0.18mA (you can power it from a microchip pin)
19mm x 27mm
Accurate to +/- 2 Celsius
Ambient (the board) temperature 0-50 degrees Celsius
K Type Thermocouple 0 to 400 degrees Celsius
// Arduino Leonardo example code
int analogPin = 0;
int val = 0; // variable to store the value read
float temperature; // Allow to play with the values
Serial.begin(9600); // setup serial
val = analogRead(analogPin); // read the input pin
temperature = float(val);
temperature = temperature * 1024 / 1000; // convert the 1024 bit ADC
Serial.println(val); // debug value
delay(500); // slow it down a bit
'Picaxe example code for thermocouple breakout
'Running from 5V supply
'Each increment = 5 / 1024 = 0.00488v
readadc10 c.2, w1 'Read the current ADC into w1
w2 = w1 * 488 / 500 'Convert w2 to temperature
debug 'View the value on the debug screen
I’ve had to trawl the net to get this info about the HC-05 Bluetooth module so I’ll put as much as I’ve learned. Let me know if I’ve missed anything. Test code, schematic, photos and datasheets are at the end of this post.
About KEY and RESET on the HC-05
Putting the HC-05 into “AT” mode allows you to set parameters like baud rate and the PIN to access the Bluetooth. You can do this through Arduino or Picaxe code easily and don’t need an external reset button or serial terminal. Key is on pin 34 and Reset is on pin 11 (see datasheets). You simply enter AT mode and then send serial strings to the HC05 through software. To enter AT and check the version here are the steps:
Pull KEY high (so on your Arduino set that pin high)
My first chicken gate worked, but I forgot to check the power draw – not very clever when you rely on batteries. After the battery went flat I measured the idle current at 65 mA. That’s a whopping 1560 mA hours over a single day giving me 20 days usage from 2 x 6V lantern batteries.
After some investigation I found 2 major causes of power drain. Firstly the motor driver circuit sucked 30mA of current when idle unless you disconnected both the 12V for the motor and also the 5V for the enable. Secondly the 7805 voltage regulator burnt off heat to reduce power, using 22mA to power a 5mA chip. Not very efficient.
After rebuilding a new board I reduced the current to 9mA which means my batteries last 7 times as long. Here’s the bits I changed shown on the diagram:
Buck mode power supply $1.65 – this used 6mA when idle and 9mA when also powering the 5V microchip. A huge drop from the original 22mA.
Relay – this double pole relay physically disconnects both the 12V and the 5V from the motor driver board. Reducing 30mA to zero. A couple of FETs would also work but wouldn’t have a physical disconnection.
Motor Driver $2.65 – cheaper than buying the components and much faster than rebuilding myself. Plenty of grunt for the 300mA that the motor uses.
Capacitors – on the back of this board (where you can’t see it) is a small ceramic 100nF capacitor directly between the GND and +5V of the chip. This is a bypass capacitor(essential) which smooths power fluctuations and stopped the uChip rebooting that was occurring when I activated the relay. The large chunky capacitors on the front further assist the power smoothing.
AXE029 – a genius component from Picaxe that lets you put header pins on your board and plug in the AXE029 for easy (really easy) programming and debugging.
If I had my time again I’d choose a 5V or even 6V gear motor to operate with this board. The closer voltage would mean easier power control and less wastage converting voltages.
All Hail Picaxe
Again my experience with Picaxe was flawless. The guys on the forum were more than helpful and very patient (thanks people). The documentation is accurate and helpful. The programming and debugging is the best I’ve seen. I work with a few development environments and this is by far the easiest and the most fun.
We all have a mess of USB plugs going to various high current fast chargers. Wires everywhere coming out of the wide spaced power boards with multiple chargers plugged in. Pics at the bottom.
I decided to build a 5 port high power USB charger for our tablets and phones. Each USB provides up to 3 Amps so they have plenty of grunt. The 2 middle pins of the USB port D+ and D- are connected to indicate to the device that high power charging is available. Total build time around 2 hours.
10 Amp 12V power supply
5 x USB 5V buck converter 3 Amp OR Apple friendly buck converter
Mini 12V fan(Now removed on mine – too noisy and not needed)
Plastic enclosure 140mm x 110mm x 35mm
Various connectors, glue and bits
Once you have these off the shelf bits it’s pretty easy to cut the holes in the front for the USB slots. I made sure that I glued a piece of wood in place behind the USB boards to prevent them getting pushed back when people plugged in USB cables.
And… it works great. Just wish I’d made space for 8 charging ports. I can still see the nice shiny red LEDs through the USB ports