Closed vanvught closed 1 year ago
Just an observation when working with the MCP3424 board from https://www.abelectronics.co.uk/p/69/adc-pi-raspberry-pi-analogue-to-digital-converter
The 5V on that board can only be used when the Raspberry Pi connected to a perfectly 5.0V power supply. Please be aware that the original USB power supply from the foundation has an output > 5.1 Volt. As there is not voltage generator on the board, this > 5.1 voltage is used as input. Therefore the thermistor reading will be wrong.
There is a sample program here -> https://github.com/vanvught/linux_rpi_artnet_l6470/tree/main/lib-device/examples
Build:
make clean -j && make -j && sudo ./mcp3424
Channel configuration for testing:
Channel 1 -> 12K -> 5V0
Channel 2 -> 10K -> 5V0
Channel 3 -> 8K2 -> 5V0
Channel 4 -> 4K7 -> 5V0
Channel 5 -> floating
Channel 6 -> 3V3
Channel 7 -> floating
Channel 8 -> 5V0
Output:
Note: The 5.0V is a perfectly regulated power supply used for the Raspberry Pi. The 3.3V is the regulated voltage from the Raspberry Pi.
@parabolic333
Example sensors.txt
for https://www.abelectronics.co.uk/p/69/adc-pi-raspberry-pi-analogue-to-digital-converter
#sensors.txt
mcp3424=68
mcp3424=69
@parabolic333
+8 sensors.
pi@raspberrypi-3:/development/workspace/linux_rpi_artnet_l6470 $ sudo ./linux_rpi_artnet_l6470 bond0
gpio
m_tBoardType=2
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- 68 69 -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
No display found
[V0.1] Raspberry Pi 3 Model B Plus V1.3 Compiled on Mar 15 202
Art-Net 4 Stepper L6470
Network init
Network
Hostname : raspberrypi-3
Domain :
If : 4: bond0
Inet : 192.168.2.121/24
Netmask : 255.255.255.0
Gateway : 192.168.2.1
Broadcast : 192.168.2.255
Mac : b8:27:eb:96:9e:69
Mode : S
Network::TcpBegin -> i=0
SparkFun init
--> src/dmxslotinfo.cpp:DmxSlotInfo:46
<-- src/dmxslotinfo.cpp:DmxSlotInfo:56
FromString() src/dmxslotinfo.cpp, line 94: nMask=0x1
Motor 0 - Communication issues! Check SPI configuration and cables
Skipping Motor 1
Skipping Motor 2
Skipping Motor 3
Skipping Motor 4
Skipping Motor 5
Skipping Motor 6
Skipping Motor 7
InitSwitch()
busyCheck()
InitPos()
src/tlc59711dmxparams.cpp::Dump 'devices.txt':
led_type=TLC59711 [0]
led_count=4
--> src/lightsetchain.cpp:Add:143
m_nDmxStartAddress=65535, m_nDmxFootprint=0
m_nDmxStartAddress=65535, m_nDmxFootprint=0
<-- src/lightsetchain.cpp:Add:171
--> src/lightsetchain.cpp:Add:143
m_nDmxStartAddress=65535, m_nDmxFootprint=0
m_nDmxStartAddress=1, m_nDmxFootprint=12
<-- src/lightsetchain.cpp:Add:171
Max size = 16, Current size = 1
Index Pointer Type
0 0x174a0b8 1
Configuring Art-Net
RDM Device configuration
Manufacturer Name : www.orangepi-dmx.org
Manufacturer ID : 5000
Serial Number : C0A80279
Root label : Raspberry Pi RDM Device
Product Category : 7FFF
Product Detail : 7FFF
RDM Responder configuration
Protocol Version 1.0
DMX Address : 1
DMX Footprint : 12
Personality 1 of 1 [Sparkfun [0] with TLC59711 [4]]
Sub Devices : 0
Sensors : 9
Art-Net 4 [1]
Firmware : 1.57
Short name : 192.168.2.121
Long name : Sparkfun [0] with TLC59711 [4]
Output
Port 0 1 HTP Art-Net
Bridge
Firmware : 1.26
CID : 74e2d98b-f247-49e9-87f7-215d9c6fb82b
PWM parameters
Type : TLC59711 [0]
Count : 4 RGB
Clock : 0 Hz Default {Default: 5000000 Hz, Maximum 10000000 Hz}
DMX : StartAddress=1, FootPrint=12
Starting Art-Net
timer
SetMode() src/hardware.cpp, line 80: Mode=2
Art-Net started
@parabolic333
Hi Arjan
Fabulous!! you are a Genius! Thank you Simon
From: Arjan @.> Sent: 15 March 2023 14:16 To: vanvught/linux_rpi_artnet_l6470 @.> Cc: parabolic333 @.>; Mention @.> Subject: Re: [vanvught/linux_rpi_artnet_l6470] Add RDM Sensor TEMPERATURE based on MCP3424 with 10K Precision Epoxy Thermistor - 3950 NTC (Issue #1)
Closed #1https://github.com/vanvught/linux_rpi_artnet_l6470/issues/1 as completed via 08b0154576e409f6353ab0ebfe2f2759574bbcbb.
— Reply to this email directly, view it on GitHubhttps://github.com/vanvught/linux_rpi_artnet_l6470/issues/1#event-8756004383, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHUIVQDZQQ6ECJR5FWEBGJTW4HFKDANCNFSM6AAAAAAVYC3RVI. You are receiving this because you were mentioned.Message ID: @.***>
Datasheet MCP3424 https://ww1.microchip.com/downloads/en/devicedoc/22088c.pdf
@parabolic333