ESP32 E‑Paper Status Display

ESP32 E‑Paper Status Display

Using an ESP-32 board with an embed­ded E‑Paper dis­play, I cre­at­ed a gad­get that shows sta­tus infor­ma­tion from my web server.

E‑Paper, also known as E‑Ink, only needs pow­er when being updat­ed, and uses no pow­er between updates. This means that the gad­get can be pow­ered for weeks from a recharge­able battery.

The pur­pose of this gad­get is to put on my wall or desk, and show reg­u­lar­ly updat­ed impor­tant infor­ma­tion on my web serv­er, to keep informed of web site prob­lems and sta­tis­tics. The infor­ma­tion dis­played can be eas­i­ly changed, for exam­ple to the lat­est weath­er, news, cur­ren­cy prices or any­thing that can be accessed via the inter­net. E‑Paper means it uses a very small amount of pow­er and heat, com­pared to a com­put­er dis­play or television.

You can view my code on GitHub if you are inter­est­ed in mak­ing your own.

ESP32 E-Paper Display
ESP32 E-Paper Display
ESP32 E-Paper Display
A HTML/JavaScript web interface and a Node/Express server, to control the robot drawing machine over the Internet.

A HTML/JavaScript web interface and a Node/Express server, to control the robot drawing machine over the Internet.

Using Node­JS and Express, I cre­at­ed a web inter­face to remote­ly con­trol the pen draw­ing robot ‘Line-Us.’ Avail­able from Cool Com­po­nents.

Line-Us robot
Line-Us robot

You can watch a video of it func­tion­ing here:

And my pro­jec­t’s source code is avail­able on GitHub:
 
 
The robot is avail­able to pur­chase here:
 
Open Bionics robotic hand for amputees

Open Bionics robotic hand for amputees

“A pro­to­type 3D-print­ed robot­ic hand that can be made faster and more cheap­ly than cur­rent alter­na­tives is this year’s UK win­ner of the James Dyson Award.” (BBC News link)

This is a fan­tas­tic idea, which has so much val­ue to peo­ple with­out limbs. Bion­ic pros­thet­ics can cost up to £100,000, and £30,000 for a sin­gle hand.

The 3D-print­ed robot­ic hand in the arti­cle costs £2,000, which is the same price as a pros­thet­ic hook, and offers sim­i­lar func­tion­al­i­ty to the top-of-the-range options.

The design­er gets to devel­op his inter­est in cre­at­ing a prod­uct, while help­ing the esti­mat­ed 11 mil­lion peo­ple who are hand amputees worldwide.

Open Bionics

Using a Cellular/Mobile Phone Network to Send Data with Arduino/Embedded

Using a Cellular/Mobile Phone Network to Send Data with Arduino/Embedded

Today I used an Arduino repro­gram­ma­ble elec­tron­ics board and a GSM/GPRS modem to send data to the Inter­net. This will be use­ful for the sen­sors I intend to build.

You can see a video of it oper­at­ing below. One win­dow shows the out­put from the ser­i­al inter­face as it makes a request to my web serv­er and out­puts the response, and the oth­er win­dow dis­plays the access logs on my web server.

I used a soft­ware UART (par­al­lel and ser­i­al data con­vert­er), as using the Arduino’s built-in ser­i­al inter­face caused con­flicts. Learn­ing to use a soft­ware UART is going to be very use­ful for the next step in the project.

I did con­sid­er mak­ing a Cat Facts for Arduino, but I resist­ed the distraction.

I did­n’t have any issues with pow­er spikes caus­ing a reset (the GSM board uses a lot of pow­er) as this is a ver­sion 2 board with soft start circuitry:

Soft Start Circuitry
Soft Start Cir­cuit­ry (Source)

I also used AT codes to send SMS text mes­sages. A full list of AT codes are avail­able here, and I used these:

Send a text

Set to human read­able text mode:
AT+CMGF=1

Set phone number:
AT+CMGS=“447944581307”

Enter the message

Send hex 1A to escape message.

List texts

AT+CMGL

Read a text

AT+CMGR=<index> (index­es start at 1)

Delete a text

AT+CMGD=<index>

 

The only stum­bling point I had was when the GSM modem was set to a dif­fer­ent baud rate than my soft­ware ser­i­al inter­face. To change this, I sent the AT com­mand AT+IPR=9600 to recon­fig­ure the modem.

I learnt that AT com­mands are also used to send and receive via TCP/UDP. This made it much more straight­for­ward than some kind of low lev­el sys­tem I had imag­ined. All that is required from the Arduino is to send AT com­mands (e.g. AT+CIPSEND=) and lis­ten for incom­ing responses.

Explanation for non-techies:

I made an elec­tron­ic cir­cuit that can send infor­ma­tion to the Inter­net. This will be use­ful for mak­ing a sen­sor e.g. a tem­per­a­ture sen­sor for an office that is acces­si­ble on any computer/smartphone.

Arduino for Atmel Studio

Arduino for Atmel Studio

Atmel Stu­dio now has an exten­sion designed as a sim­ple alter­na­tive to the Arduino IDE.

The Arduino IDE is rel­a­tive­ly sim­ple. It is great to get start­ed with AVR pro­gram­ming, and has some use­ful exam­ples to get you start­ed, but lacks many of the fea­tures that expe­ri­enced pro­gram­mers call for like detailed com­pil­er warn­ings, debug­ging capa­bil­i­ties, auto-com­ple­tion and unit testing.

Arduino IDE
Arduino IDE

Pro­gram­ming for AVR at a low­er lev­el in Atmel Stu­dio can also have per­for­mance improve­ments. Shift­ing bits rather than using Arduino IDE’s ‘dig­i­tal­write’ can have a 10x speed improve­ment for example.

Atmel Stu­dio sup­ports a wider range of AVR microchips. This can be use­ful if you aim to pro­gram one of Atmel’s huge range of microchips. I have a ATtiny13A, which uses con­sid­er­ably less pow­er than the ATMega328 in my Arduino board (190 µA in active mode, and 24 µA vs. 0.2 mA in active mode, 0.1 µA in pow­er-down mode, and 0.75 µA in pow­er-save mode).

Atmel Studio

So if you feel you are out­grow­ing the Arduino IDE, give Atmel Stu­dio a try. You may find this tuto­r­i­al use­ful: Using Atmel Stu­dio 6 with Arduino projects, or How to Set­up Atmel Stu­dio for Arduino Devel­op­ment.

Sim­plic­i­ty can be more impor­tant though, and the Arduino IDE may be more suit­able for your appli­ca­tion. After all, projects are gen­er­al­ly rel­a­tive­ly sim­ple when you have less than 16 KB of mem­o­ry to play with. I expect I will con­tin­ue using the Arduino IDE pri­mar­i­ly, and Atmel Stu­dio for any par­tic­u­lar­ly chal­leng­ing projects.

Simple explanation for non-techies

Arduino refers to a few types of tiny elec­tron­ic board with a repro­gram­ma­ble microchip. Pro­grams can be sent from a com­put­er to this microchip to per­form what­ev­er task is required.

A fun exam­ple is Leah Buech­ley’s Turn Sig­nal Bik­ing Jack­et project, shown in the video below:

Software Defined Radio (SDR) and Field-Programmable Gate Arrays (FPGA) — A Free Radio Scanner

Software Defined Radio (SDR) and Field-Programmable Gate Arrays (FPGA) — A Free Radio Scanner

When I was grow­ing up, one of my favourite birth­day presents was a Uniden UBC3000XLT radio scan­ner. I enjoyed find­ing and lis­ten­ing to var­i­ous radio trans­mis­sions, and I had some suc­cess decod­ing data trans­mis­sions and morse code using my PC and Sound Blaster soundcard.

Uniden UBC-3000XLT Radio Scanner
Uniden UBC-3000XLT Radio Scanner

I was inter­est­ed to read about a tech­nique called Soft­ware Defined Radio (SDR), which can sam­ple the entire short­wave spec­trum, and use the pro­cess­ing pow­er of a com­put­er to vir­tu­al­ly ‘tune’ in to transmissions.

A home-built SDR board oper­at­ing at the Uni­ver­si­ty of Twente in the Nether­lands (pic­tured below) and a receiv­ing ele­ment around 5cm x 10cm is capa­ble of receiv­ing a fre­quen­cy range of 0 — 29.160 MHz.

It uses a Spar­tan XC3S500E Field-Pro­gram­ma­ble Gate Array. FPGAs can be pro­grammed using a hard­ware descrip­tion lan­guage, and arrays of pro­gram­ma­ble log­ic blocks which can be vir­tu­al­ly inter-wired. The most impor­tant advan­tage over a micro­con­troller like a Atmel/Arduino, is these oper­a­tions can hap­pen in par­al­lel, which is crit­i­cal to cre­at­ing a soft­ware defined radio, as a typ­i­cal AVR micro­proces­sor sim­ply does­n’t have the nec­es­sary clock speed. The sam­ple rate must be at least twice the max­i­mum fre­quen­cy of the sig­nal (Nyquist theorem).

PA3FWM Software Defined Radio
Soft­ware Defined Radio at the Uni­ver­si­ty of Twente

Tak­ing this a step fur­ther, Soft­ware Defined Radio can allow mul­ti­ple users to share the same receiv­er. At time of writ­ing, 184 users are lis­ten­ing to dif­fer­ent fre­quen­cies using the receiv­er at the University.

You can lis­ten for your­self at the Wide-band Web­S­DR at Uni­ver­si­ty of Twente. It’s essen­tial­ly a free radio scan­ner any­one can access for free. You might enjoy stum­bling upon a vari­ety of trans­mis­sions from all over the world, and you may have suc­cess using tools like Sor­cer­er to decode data trans­mis­sions, weath­er fax trans­mis­sions, and morse code.

With the ever-con­tin­u­ing advances in data stor­age capac­i­ties and scal­able clouds, one day it may be a triv­ial mat­ter to archive the entire radio fre­quen­cy spectrum.