-
My robot made in the news
08/15/2023 at 14:56 • 0 commentsHeise Online, a German IT news magazine reported today about my robot.
An article in the German Make Magazine will probably follow in October.
-
Hackaday Prize 2023
07/20/2023 at 16:00 • 0 commentsA big thank you goes out to the judges. I've been participating in the Hackaday Prize since 2015, and this is the first time I've made it to the finals. It makes me happy and means a lot to me.
-
Initial code and field testing
05/28/2023 at 11:28 • 0 commentsIn an initial code (see FILES section), I modeled my current medication. I take 100 mg of sertraline at 10:00 in the morning and 600 mg of quetiapine at 20:00 in the evening. Each Sunday evening after taking quetiapine, I refill the pill organizer for the next week.
At the moment I am doing a field test to identify possible bugs and improve the source code.
Meanwhile I have been using the robot for two months and it has fundamentally changed my medication and thus my everyday life. And if it helps me, it can also help many others.
-
Daylight saving time and standard time
05/16/2023 at 08:46 • 0 commentsSince I live in Europe, we have daylight saving time and standard time. The clocks are mostly synchronized by the longwave time signal DCF77. Since we use the high-precision RTC DS3231 and a microcontroller, this is not necessary. For daylight saving time, the time change takes place on the last Sunday in March. Thereby at 2:00 a.m., the clock is advanced by one hour. For the winter time (standard time) the time change takes place on the last Sunday in October. At 3:00 a.m. the clock is set back by one hour.
-
Speech synthesis
05/03/2023 at 09:42 • 8 commentsI bought the Chinese XFS5152CE Speech Synthesis Module on eBay. It supports TTS in Chinese and English language and has some sound effects. Also, speech recognition of up to 30 commands should be possible. The module supports UART, I2C, and SPI communication. There is no datasheet for the module itself, only for the processor XFS5152CEA. A translation can be found under FILES. The DFRobot Gravity - Speech Synthesis Module uses the same processor. Fortunately, user iforce2d on youtube has already done some preliminary work: XFS5152 speech synthesis module.
I have also collected some useful information in advance:
As expected, only the RX pin on the XFS5152CE Speech Synthesis Module works with hardware serial. This is the same for the EMIC-2 module. Since I want to use an Arduino Due, software serial is out of the question. We actually only need RX and the status indicator output of the speech Synthesis Module, which we can monitor with an interrupt routine. I used the following wiring and components for testing:
Test code:
const byte ledPin = 13; const byte interruptPin = 2; volatile byte state = LOW; void speak(char* msg) { Serial1.write(0xFD); Serial1.write((byte)0x0); Serial1.write(2 + strlen(msg)); Serial1.write(0x01); Serial1.write((byte)0x0); Serial1.write(msg); } void busy() { state = !state; digitalWrite(ledPin, state); } void setup() { pinMode(ledPin, OUTPUT); pinMode(interruptPin, INPUT_PULLUP); attachInterrupt(digitalPinToInterrupt(interruptPin), busy, CHANGE); Serial.begin(9600); Serial1.begin(9600); } void loop() { speak("[x0][t6][v5][s6][m51][g2][h2][n1]Please take your medicine now."); while(state == HIGH); }
Video (the first one in my new youtube channel):
-
PCBs
05/02/2023 at 16:34 • 0 commentsThe first PCB I had to design is the one for the touch sensor. I use an AT42QT1011, which is a capacitive sensor. The wiring is very simple.
The board design is just as simple. To not interfere with the touch sensor, I did not use a ground plane. The datasheet states in this regard: Metal areas near the electrodes will reduce the field strength and increase Cx loading and should be avoided, if possible. Keep ground away from the electrodes and traces.
The only component that is a bit difficult to solder by hand is the AT42QT1011. You need a magnifying glass and backlight to find the pin 1 ID.
The second PCB for the robot that I designed is the one for the three push buttons.
The touch sensor is very sensitive. When I get closer than 2cm with my finger, the circuit already reacts. I also put my pills on the touchpad. Fortunately, they contain too little water to react. By decreasing the value for C1 we can make the sensor less sensitive if need to. In my case, I had to change the value of C1 to 4.7nF.
The third and last PCB we need is a shield for the Arduino Due. All connections are broken out, it supplies 5V with up to 1.5A for the servos and has a DS3231 Precision RTC and a backup battery on board.
For the shield, the LDO was first soldered using solder paste and a hot air gun, since the GND solder area of the LDO in the D2P package is not accessible in any other way. The remaining components were soldered by hand.
On the bottom side, you can see the female pin header for the SPI connection. There is no other way to make the SPI pins accessible on the Arduino Due.
Finally, the PCB was cleaned of flux residues using isopropanol and a discarded toothbrush.
-
Minimizing redraw flicker
05/01/2023 at 16:55 • 0 commentsRedraw flicker is mostly an issue with color LCD or OLED screens, where graphics are rendered with every function call. To minimize the effect I had to use an offscreen canvas, respectively the 1-bit canvas type for the animated robot face. You can think of it as all the graphics primitives or text that are on the canvas are converted to a bitmap and then drawn on the OLED.
// Screen dimensions #define SCREEN_WIDTH 128 #define SCREEN_HEIGHT 128 // Use HW SPI (MOSI, SCK, MISO) and those pins #define DC_PIN 4 #define CS_PIN 5 #define RST_PIN 6 // Color definitions #define BLACK 0x0000 #define BLUE 0x001F #define RED 0xF800 #define GREEN 0x07E0 #define CYAN 0x07FF #define MAGENTA 0xF81F #define YELLOW 0xFFE0 #define WHITE 0xFFFF #include <Adafruit_GFX.h> #include <Adafruit_SSD1351.h> #include <SPI.h> Adafruit_SSD1351 tft = Adafruit_SSD1351(SCREEN_WIDTH, SCREEN_HEIGHT, &SPI, CS_PIN, DC_PIN, RST_PIN); GFXcanvas1 canvas(126, 58); bool MAGENTA_prim = true; void setup(void) { tft.begin(); randomSeed(analogRead(0)); tft.fillScreen(WHITE); } void loop() { // Only draw once and not on the canvas if(MAGENTA_prim == true) { tft.fillRoundRect(10, 59, 22, 10, 5, MAGENTA); tft.fillRoundRect(98, 59, 22, 10, 5, MAGENTA); MAGENTA_prim = false; } canvas.fillScreen(0); // Clear canvas (not display) int randmouth1 = random(-4, 4); canvas.fillCircle(20, 27, 18, WHITE); canvas.fillCircle(17 + randmouth1, 24 + randmouth1, 4, BLACK); canvas.fillCircle(107, 27, 18, WHITE); canvas.fillCircle(104 + randmouth1, 24 + randmouth1, 4, BLACK); // Talking int randmouth2 = random(7, 22); canvas.fillCircle(64, 41, 16, WHITE); canvas.fillRect(48, randmouth2, 33, 32, BLACK); tft.drawBitmap(0, 0, canvas.getBuffer(), canvas.width(), canvas.height(), BLACK, WHITE); }
-
Laser cutting and engraving
04/28/2023 at 15:54 • 1 commentSince I wanted the front of the tablet drum to be transparent, I had a corresponding disc laser cut from 3mm acrylic glass. I also had the symbols for the day and evening laser engraved.