For VAT-registered market stalls, craft fairs and farm shops in the UK and EU. Type the cart below and you get the exact 32-column receipt the Arduino Mega sketches print on a 58 mm thermal printer. VAT is worked out per rate in whole pence, and the page tells you whether a simplified invoice is still allowed.
Full version — $44 once: the 6 Arduino Mega sketches that print this on your printer with numbering that survives a power cut, plus daily Z totals. Get the sketches
Why not a free tutorial? On AVR boards, double is a 32-bit float. Add 0.10 a thousand times and (long)(total*100) gives 9999 pence, not 10000. Tutorials also restart the invoice counter at every reboot. Limits: UK VAT Regulations 1995 reg 16A (£250 incl VAT); EU Directive 2006/112/EC art 220a (100 euros). Above the limit, a full invoice needs a sequential number and the customer's name and address.
The 6 compiled Arduino Mega sketches that print that receipt on your thermal printer at the stall, every sale, with sequential numbers kept in EEPROM through power cuts and daily Z totals per VAT rate.
One payment, one licence key for this tool. The key is shown right after payment.
Adafruit Mini Thermal Receipt Printer (product 597): $49.95 list on adafruit.com, 19200 baud TTL, 58 mm paper. These sketches are what turns it into a VAT till printer.
Buy the full version — $44I have a keyPaste this code into your page. It runs in your visitor’s browser and stays up to date. Nothing your visitors type is stored.
For businesses: your name and logo instead of ours, and each visitor’s result + e-mail in your inbox (only when they tick consent) — Pro from $19/month. See Pro →
· ReadyStack
Real numbers from this tool, line by line.
VAT £4.12 on £45.69 is what our Arduino Mega sketch prints for a UK market stall that sells 3 candles, 2 soap bars, a gift card, 4 jam jars and a kids tee. That is VAT at 20% on £24.70 of standard-rated goods and nothing on £20.99 of zero-rated ones, on one 58 mm thermal receipt.
| Line | Amount |
|---|---|
| 3 Candle 20% | 14.97 |
| 2 Soap bar 20% | 6.98 |
| 1 Gift card 20% | 2.75 |
| 4 Jam jar 0% | 13.00 |
| 1 Kids tee 0% | 7.99 |
| 20% gross / VAT at 20% | 24.70 / 4.12 |
| 0% gross | 20.99 |
| TOTAL incl VAT | 45.69 |
We ran the till sketch against a host mock and its printer output matched that table line for line. Our free web page prints the same 32 columns.
VAT-registered sellers at markets, craft fairs and farm shops in the UK or the EU, and the makers who build their tills. You already own an Arduino Mega 2560 and a 58 mm TTL thermal printer (Adafruit product 597 runs at 19200 baud).
First, money in float. On AVR boards, double is a 32-bit float. The VatInvoiceMath sketch adds 0.10 a thousand times as a float and as whole pence and prints both: 9999 pence against 10000. Every sketch in the pack keeps money in long pence and rounds VAT half-up once per rate.
Second, the invoice counter. A counter in RAM restarts at 1 after every reboot. SequentialInvoiceNumber keeps two checksummed copies in EEPROM and writes the next number before anything prints. A power cut can leave a gap but cannot print the same number twice, and the series refuses to go backwards.
In the UK, VAT Regulations 1995 regulation 16A allows a less detailed invoice when the supply is £250 or less including VAT. It shows the supplier, time of supply, a description, and the gross amount and rate for each VAT rate. In the EU, Directive 2006/112/EC article 220a sets the line at 100 euros. Above it, a full invoice needs a sequential number and the customer's name and address.
SimplifiedLimitTill checks the total. With an oak bench at £249.00 and 4 jam jars the total is £262.00. The sketch refuses to print until you send the customer's name and address, then prints VAT INVOICE 000001 with net, rate and VAT per line (VAT at 20% = £41.50). Set SIMPLIFIED_LIMIT to 10000 and the same logic applies the EU 100-euro line: a cart of 4 lamps at 24.99 and 4 jam jars comes to 112.96 and needs a full invoice.
6 sketches, 15 wiring-table rows, 0 libraries:
Install in 4 steps: unzip as-is, open in Arduino IDE, choose Arduino Mega 2560 and the port, upload.
The free page takes your own cart lines, date, VAT rules and last invoice number, and shows the receipt and the simplified-or-full verdict. The sketches are a one-time payment, not a subscription.
Six Arduino Mega sketches print VAT receipts on a 58 mm ESC/POS thermal printer. They work out VAT per rate in whole pence, number full invoices from EEPROM so a power cut cannot repeat a number, switch to a full invoice above £250 (UK) or 100 euros (EU), and keep daily Z totals per VAT rate.
VAT-registered market-stall, craft-fair and farm-shop sellers in the UK or the EU, and the makers who build their tills. You need an Arduino Mega 2560, a 58 mm TTL thermal printer such as Adafruit #597, and for the button till six push buttons. No libraries to install, only the Arduino AVR core.
On AVR boards, double is a 32-bit float. In VatInvoiceMath, 1000 x 0.10 added as a float and cast with (long)(total*100) gives 9999 pence instead of 10000. Tutorials also restart the invoice counter at every reboot and print a simplified receipt whatever the total. These sketches use whole pence, an EEPROM series and a limit check.
On the web page, type your own cart lines, VAT rates, date and last invoice number. It shows the exact 32-column receipt the sketches print, the VAT per rate, and whether this sale still fits a simplified invoice or needs full invoice number N with the customer's name and address. It is free with no limit.
The sketches are 44 dollars, paid once, not a subscription. The printer they drive, Adafruit Mini Thermal Receipt Printer product 597, lists at 49.95 dollars on adafruit.com. Before you pay, check your own cart on the free page and see the receipt it will print.
One question, answered by the person who built it. Your email only if you want the answer sent.