Monday 19 October 2020

Factory Reset A Citaq H10

 So, I had one of these Citaq H10 EPOS Machines...


Unfortunately it was locked and stuck with the 'Just Eat' POS software.
This machine runs android and on taking the back off there is a button marked 'recover'.  Pressing this and resetting the unit gets the usual android recovery menu, but the unit has no volume up / down buttons to navigate the menu.

The processor inside the unit is a Rockchip RK3368.  On their website is an example circuit of how to use this chip.  It is very similar to the EPOS unit!
This bit...
...shows the recover button is read by an A/D converter and checking the linux device tree file (from the github repository for the RK3368 evaluation board) we find ADC values corresponding to the different buttons which can be on this pin....

Volume Up - 1
Volume Down - 170
Menu Key - 355
Home key - 746
Back key - 560
Camera key - 450

So I tacked wire across the recover switch which led to the outside of the unit...


The voltage across these wires measures 1.8V and is pulled up via a 10K resistor, like the schematic shows.
The ADC inside this chip is 10 bits so to get a value of 170 (Volume down) I need a resistor to pull the ADC pin down to 0.3V ( ((1.8V / 1023) * 170) = 0.299V )

A 2k resistor will do this, so booting into the recovery menu and using the 2k resistor to move the menu down to 'factory reset' and then selecting, does a factory reset :)

After rebooting, the unit boots into android with no Just Eat !


After installing YouTube from the Play Store...


I don't know if there was a software way of doing this, but now I can add volume buttons to the EPOS unit.  I can't get the printer to work yet, since it is a serial printer and doesn't expose its self to the android OS as a printer.


Thursday 24 September 2020

Replacement bandsaw switch

 So, I switches on my bandsaw and BANG! This thing...


explodes.  Inspecting the switch reveals it had shorted out.  Googling around provided plenty of replacements at cheap prices.  The replacement switches were all of a similar quality, so if I replaced like for like, is it going to go BANG! again in a few months?


So I'm not replacing like for like.  I designed a simple push button operated relay which requires a long, one second push to switch on the saw and any push, while the saw is on, will switch it off.

I initially disregarded a microcontroller for this simple task and came up with...


Powered directly off mains supply using a capacitive dropper.  It was going back in the saw so the circuit was going to be encased safely.

Works fine if your supply voltage comes up quickly, doesn't work so well if the supply is slow.  So it would require various reset circuitry adding etc, etc... Sometimes its just easier to go with a £0.50 microcontroller from the start.  It simplified down to this...


Works great.  Now that ATtiny44 is in there I think I might make it periodically 'beep' while the mains is on, to remind me to switch it off at the plug.  I used an ATtiny44 because that's what I had in the drawer.

Here it is working...